diff --git a/.gitignore b/.gitignore index d8f22de..f947678 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.vscode + # Temp inst/temp diff --git a/DESCRIPTION b/DESCRIPTION index ccc4be1..cde0753 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -14,7 +14,8 @@ Imports: dplyr, igraph, jsonlite, - shiny + shiny, + tidyselect Suggests: testthat (>= 3.0.0) Config/testthat/edition: 3 diff --git a/R/app.R b/R/app.R index 93edb98..80c6016 100644 --- a/R/app.R +++ b/R/app.R @@ -91,9 +91,19 @@ start_app <- function(graph, layout) { igraph::V(graph)$component <- flag_for_grouping + selected_node_cols <- graph |> + igraph::as_data_frame("vertices") |> + dplyr::select( + id = name, + initialX = x, + initialY = y, + component, + tidyselect::any_of(c("color", "size")) + ) + graph_json <- jsonlite::toJSON(list( - nodes = igraph::as_data_frame(graph, "vertices"), - links = igraph::as_data_frame(graph, "edges") + nodes = selected_node_cols, + links = igraph::as_data_frame(graph, "edges")[, 1:2] )) server <- function(input, output, session) { @@ -155,7 +165,7 @@ precompute_layout <- function(graph, cols) { similarity_layout <- igraph::layout_with_fr( graph = similarity_graph, - niter = 1000 + niter = 500 ) * LAYOUT_SIZE_FACTOR # Centers layout around origin = [0, 0] diff --git a/README.Rmd b/README.Rmd index f189881..864912a 100644 --- a/README.Rmd +++ b/README.Rmd @@ -19,18 +19,21 @@ knitr::opts_chunk$set( [![R-CMD-check](https://github.com/dalmolingroup/easylayout/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dalmolingroup/easylayout/actions/workflows/R-CMD-check.yaml) -easylayout is an R package that seamlessly bridges manipulation and -visualization by leveraging the user's IDE itself (e.g., RStudio, VSCode). It -is **not** yet another visualization library, but instead aims to interconnect -existing libraries and streamline their usage into the R ecosystem. easylayout -takes an igraph object and serializes it into a web application integrated with -the IDE's interface through a Shiny server. The web application lays out the -network by simulating attraction and repulsion forces. Simulation parameters -can be adjusted in real-time. An editing mode allows moving and rotating nodes. -The implementation aims for performance, so that even lower-end devices are -able to work with relatively large networks. Once the user finishes tinkering -the layout, it is sent back to the R session to be plotted through popular -libraries like ggplot2 or even the base package itself. +easylayout is an R package that leverages interactive force simulations within +the IDE itself (e.g., RStudio, VSCode). It is **not** yet another visualization +library, but instead aims to interconnect existing libraries and streamline +their usage into the R ecosystem. + +![](https://github.com/user-attachments/assets/1b91cb11-77ef-47a5-b529-3805a9785a76) + +easylayout takes an igraph object and serializes it into a web application +integrated with the IDE's interface through a Shiny server. The web application +lays out the network by simulating attraction and repulsion forces. Simulation +parameters can be adjusted in real-time. An editing mode allows moving and +rotating nodes. The implementation aims for performance, so that even lower-end +devices are able to work with relatively large networks. Once the user finishes +tinkering the layout, it is sent back to the R session to be plotted through +popular libraries like ggplot2 or even the base package itself. ## Installation @@ -57,7 +60,7 @@ igraph::V(g)$label <- NA igraph::V(g)$size <- sample(1:5, number_of_vertices, replace = TRUE) igraph::V(g)$color <- sample(rainbow(5), number_of_vertices, replace = TRUE) -plot(g, layout = easylayout) +plot(g, layout = easylayout, vertex.label = NA, margin = 0) ``` ## Future work diff --git a/README.md b/README.md index 008eb89..987fdf2 100644 --- a/README.md +++ b/README.md @@ -8,19 +8,22 @@ [![R-CMD-check](https://github.com/dalmolingroup/easylayout/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dalmolingroup/easylayout/actions/workflows/R-CMD-check.yaml) -easylayout is an R package that seamlessly bridges manipulation and -visualization by leveraging the user’s IDE itself (e.g., RStudio, -VSCode). It is **not** yet another visualization library, but instead -aims to interconnect existing libraries and streamline their usage into -the R ecosystem. easylayout takes an igraph object and serializes it -into a web application integrated with the IDE’s interface through a -Shiny server. The web application lays out the network by simulating -attraction and repulsion forces. Simulation parameters can be adjusted -in real-time. An editing mode allows moving and rotating nodes. The -implementation aims for performance, so that even lower-end devices are -able to work with relatively large networks. Once the user finishes -tinkering the layout, it is sent back to the R session to be plotted -through popular libraries like ggplot2 or even the base package itself. +easylayout is an R package that leverages interactive force simulations +within the IDE itself (e.g., RStudio, VSCode). It is **not** yet another +visualization library, but instead aims to interconnect existing +libraries and streamline their usage into the R ecosystem. + +![](https://github.com/user-attachments/assets/1b91cb11-77ef-47a5-b529-3805a9785a76) + +easylayout takes an igraph object and serializes it into a web +application integrated with the IDE’s interface through a Shiny server. +The web application lays out the network by simulating attraction and +repulsion forces. Simulation parameters can be adjusted in real-time. An +editing mode allows moving and rotating nodes. The implementation aims +for performance, so that even lower-end devices are able to work with +relatively large networks. Once the user finishes tinkering the layout, +it is sent back to the R session to be plotted through popular libraries +like ggplot2 or even the base package itself. ## Installation @@ -48,7 +51,7 @@ igraph::V(g)$label <- NA igraph::V(g)$size <- sample(1:5, number_of_vertices, replace = TRUE) igraph::V(g)$color <- sample(rainbow(5), number_of_vertices, replace = TRUE) -plot(g, layout = easylayout) +plot(g, layout = easylayout, vertex.label = NA, margin = 0) ``` ## Future work diff --git a/inst/www/assets/index.css b/inst/www/assets/index.css index 7dc98f8..b792e50 100644 --- a/inst/www/assets/index.css +++ b/inst/www/assets/index.css @@ -1 +1 @@ -*,: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]{display:none}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-style:solid;border-color:#e5e7eb}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-top-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-top-width:1px;border-right-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{position:absolute;width:8px;height:8px;background:inherit}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:before{content:"";visibility:visible;transform:rotate(45deg)}[data-popper-arrow]:after{content:"";visibility:visible;transform:rotate(45deg);position:absolute;width:9px;height:9px;background:inherit}[role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#4b5563}[role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#4b5563}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--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);border-color:#1c64f2}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}input[type=time]::-webkit-calendar-picker-indicator{background:none}select:not([size]){background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}:is([dir=rtl]) select:not([size]){background-position:left .75rem center;padding-right:.75rem;padding-left:0}[multiple]{background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#1c64f2;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--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)}[type=checkbox]:checked,[type=radio]:checked,.dark [type=checkbox]:checked,.dark [type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:.55em .55em;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}.dark [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M0.5 6h14'/%3e %3c/svg%3e");background-color:currentColor;border-color:transparent;background-position:center;background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{color:#fff;background:#1f2937;border:0;font-weight:500;font-size:.875rem;cursor:pointer;padding:.625rem 1rem .625rem 2rem;margin-inline-start:-1rem;margin-inline-end:1rem}input[type=file]::file-selector-button:hover{background:#374151}:is([dir=rtl]) input[type=file]::file-selector-button{padding-right:2rem;padding-left:1rem}.dark input[type=file]::file-selector-button{color:#fff;background:#4b5563}.dark input[type=file]::file-selector-button:hover{background:#6b7280}input[type=range]::-webkit-slider-thumb{height:1.25rem;width:1.25rem;background:#1c64f2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-webkit-slider-thumb{background:#9ca3af}.dark input[type=range]:disabled::-webkit-slider-thumb{background:#6b7280}input[type=range]:focus::-webkit-slider-thumb{outline:2px solid transparent;outline-offset:2px;--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(4px + 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);--tw-ring-opacity: 1px;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}input[type=range]::-moz-range-thumb{height:1.25rem;width:1.25rem;background:#1c64f2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-moz-range-thumb{background:#9ca3af}.dark input[type=range]:disabled::-moz-range-thumb{background:#6b7280}input[type=range]::-moz-range-progress{background:#3f83f8}input[type=range]::-ms-fill-lower{background:#3f83f8}input[type=range].range-sm::-webkit-slider-thumb{height:1rem;width:1rem}input[type=range].range-lg::-webkit-slider-thumb{height:1.5rem;width:1.5rem}input[type=range].range-sm::-moz-range-thumb{height:1rem;width:1rem}input[type=range].range-lg::-moz-range-thumb{height:1.5rem;width:1.5rem}*,: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(63 131 248 / .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(63 131 248 / .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: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.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}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-inset-1{inset:-.25rem}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-left-\[17px\]{left:-17px}.-right-\[16px\]{right:-16px}.-right-\[17px\]{right:-17px}.-start-1\.5{inset-inline-start:-.375rem}.-start-14{inset-inline-start:-3.5rem}.-start-3{inset-inline-start:-.75rem}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.bottom-5{bottom:1.25rem}.bottom-6{bottom:1.5rem}.end-0{inset-inline-end:0px}.end-2\.5{inset-inline-end:.625rem}.end-5{inset-inline-end:1.25rem}.end-6{inset-inline-end:1.5rem}.left-0{left:0}.left-1\/2{left:50%}.start-0{inset-inline-start:0px}.start-1{inset-inline-start:.25rem}.start-1\/2{inset-inline-start:50%}.start-2\.5{inset-inline-start:.625rem}.start-5{inset-inline-start:1.25rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.top-5{top:1.25rem}.top-6{top:1.5rem}.top-\[124px\]{top:124px}.top-\[142px\]{top:142px}.top-\[178px\]{top:178px}.top-\[40px\]{top:40px}.top-\[72px\]{top:72px}.top-\[88px\]{top:88px}.top-\[calc\(100\%\+1rem\)\]{top:calc(100% + 1rem)}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.m-0\.5{margin:.125rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-8{margin-top:2rem;margin-bottom:2rem}.-mb-px{margin-bottom:-1px}.-me-1\.5{margin-inline-end:-.375rem}.-ms-4{margin-inline-start:-1rem}.-mt-px{margin-top:-1px}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-px{margin-bottom:1px}.me-1{margin-inline-end:.25rem}.me-2{margin-inline-end:.5rem}.me-3{margin-inline-end:.75rem}.me-4{margin-inline-end:1rem}.ms-1{margin-inline-start:.25rem}.ms-1\.5{margin-inline-start:.375rem}.ms-2{margin-inline-start:.5rem}.ms-3{margin-inline-start:.75rem}.ms-4{margin-inline-start:1rem}.ms-6{margin-inline-start:1.5rem}.ms-auto{margin-inline-start:auto}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.\!hidden{display:none!important}.hidden{display:none}.h-1{height:.25rem}.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-36{height:9rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-80{height:20rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[10px\]{height:10px}.h-\[140px\]{height:140px}.h-\[156px\]{height:156px}.h-\[172px\]{height:172px}.h-\[17px\]{height:17px}.h-\[18px\]{height:18px}.h-\[193px\]{height:193px}.h-\[213px\]{height:213px}.h-\[24px\]{height:24px}.h-\[32px\]{height:32px}.h-\[41px\]{height:41px}.h-\[426px\]{height:426px}.h-\[454px\]{height:454px}.h-\[46px\]{height:46px}.h-\[52px\]{height:52px}.h-\[55px\]{height:55px}.h-\[572px\]{height:572px}.h-\[5px\]{height:5px}.h-\[600px\]{height:600px}.h-\[63px\]{height:63px}.h-\[64px\]{height:64px}.h-auto{height:auto}.h-full{height:100%}.h-modal{height:calc(100% - 2rem)}.h-px{height:1px}.h-screen{height:100vh}.max-h-64{max-height:16rem}.max-h-full{max-height:100%}.min-h-\[2\.4rem\]{min-height:2.4rem}.min-h-\[2\.7rem\]{min-height:2.7rem}.min-h-\[3\.2rem\]{min-height:3.2rem}.\!w-full{width:100%!important}.w-1{width:.25rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-10\/12{width:83.333333%}.w-11{width:2.75rem}.w-11\/12{width:91.666667%}.w-12{width:3rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-2\/4{width:50%}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-8\/12{width:66.666667%}.w-80{width:20rem}.w-9{width:2.25rem}.w-9\/12{width:75%}.w-\[10px\]{width:10px}.w-\[148px\]{width:148px}.w-\[188px\]{width:188px}.w-\[1px\]{width:1px}.w-\[208px\]{width:208px}.w-\[272px\]{width:272px}.w-\[300px\]{width:300px}.w-\[3px\]{width:3px}.w-\[52px\]{width:52px}.w-\[56px\]{width:56px}.w-\[6px\]{width:6px}.w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.w-full{width:100%}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-60{max-width:15rem}.max-w-7xl{max-width:80rem}.max-w-\[133px\]{max-width:133px}.max-w-\[301px\]{max-width:301px}.max-w-\[341px\]{max-width:341px}.max-w-\[351px\]{max-width:351px}.max-w-\[540px\]{max-width:540px}.max-w-\[640px\]{max-width:640px}.max-w-\[83px\]{max-width:83px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-screen-md{max-width:768px}.max-w-screen-xl{max-width:1280px}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.origin-left{transform-origin:left}.-translate-x-1\/2{--tw-translate-x: -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))}.-translate-x-1\/3{--tw-translate-x: -33.333333%;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))}.-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))}.-translate-y-1\/3{--tw-translate-y: -33.333333%;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))}.-translate-y-4{--tw-translate-y: -1rem;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))}.-translate-y-6{--tw-translate-y: -1.5rem;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))}.translate-x-1\/3{--tw-translate-x: 33.333333%;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))}.translate-y-1\/3{--tw-translate-y: 33.333333%;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-45{--tw-rotate: 45deg;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-75{--tw-scale-x: .75;--tw-scale-y: .75;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-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-flow-row{grid-auto-flow:row}.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-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-8{gap:2rem}.gap-y-4{row-gap:1rem}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.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-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * 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-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-blue-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(164 202 254 / var(--tw-divide-opacity))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.divide-gray-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(209 213 219 / var(--tw-divide-opacity))}.divide-gray-500>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(107 114 128 / var(--tw-divide-opacity))}.divide-gray-700>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}.divide-green-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(132 225 188 / var(--tw-divide-opacity))}.divide-indigo-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(180 198 252 / var(--tw-divide-opacity))}.divide-orange-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(253 186 140 / var(--tw-divide-opacity))}.divide-pink-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(248 180 217 / var(--tw-divide-opacity))}.divide-primary-500>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(254 121 93 / var(--tw-divide-opacity))}.divide-purple-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(202 191 253 / var(--tw-divide-opacity))}.divide-red-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(248 180 180 / var(--tw-divide-opacity))}.divide-yellow-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(250 202 21 / var(--tw-divide-opacity))}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.overscroll-contain{overscroll-behavior:contain}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.\!rounded-md{border-radius:.375rem!important}.rounded{border-radius:.25rem}.rounded-\[2\.5rem\]{border-radius:2.5rem}.rounded-\[2rem\]{border-radius:2rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b-\[1rem\]{border-bottom-right-radius:1rem;border-bottom-left-radius:1rem}.rounded-b-\[2\.5rem\]{border-bottom-right-radius:2.5rem;border-bottom-left-radius:2.5rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-b-xl{border-bottom-right-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-e-full{border-start-end-radius:9999px;border-end-end-radius:9999px}.rounded-e-lg{border-start-end-radius:.5rem;border-end-end-radius:.5rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-s-full{border-start-start-radius:9999px;border-end-start-radius:9999px}.rounded-s-lg{border-start-start-radius:.5rem;border-end-start-radius:.5rem}.rounded-t-\[2\.5rem\]{border-top-left-radius:2.5rem;border-top-right-radius:2.5rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.rounded-t-sm{border-top-left-radius:.125rem;border-top-right-radius:.125rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.\!border-0{border-width:0px!important}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-\[10px\]{border-width:10px}.border-\[14px\]{border-width:14px}.border-\[16px\]{border-width:16px}.border-\[8px\]{border-width:8px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-e{border-inline-end-width:1px}.border-s{border-inline-start-width:1px}.border-s-4{border-inline-start-width:4px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.border-blue-400{--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.border-gray-900{--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.border-green-300{--tw-border-opacity: 1;border-color:rgb(132 225 188 / var(--tw-border-opacity))}.border-green-400{--tw-border-opacity: 1;border-color:rgb(49 196 141 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(5 122 85 / var(--tw-border-opacity))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity))}.border-indigo-300{--tw-border-opacity: 1;border-color:rgb(180 198 252 / var(--tw-border-opacity))}.border-indigo-400{--tw-border-opacity: 1;border-color:rgb(141 162 251 / var(--tw-border-opacity))}.border-inherit{border-color:inherit}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 140 / var(--tw-border-opacity))}.border-pink-300{--tw-border-opacity: 1;border-color:rgb(248 180 217 / var(--tw-border-opacity))}.border-pink-400{--tw-border-opacity: 1;border-color:rgb(241 126 184 / var(--tw-border-opacity))}.border-primary-400{--tw-border-opacity: 1;border-color:rgb(255 188 173 / var(--tw-border-opacity))}.border-primary-500{--tw-border-opacity: 1;border-color:rgb(254 121 93 / var(--tw-border-opacity))}.border-primary-600{--tw-border-opacity: 1;border-color:rgb(239 86 47 / var(--tw-border-opacity))}.border-primary-700{--tw-border-opacity: 1;border-color:rgb(235 79 39 / var(--tw-border-opacity))}.border-purple-300{--tw-border-opacity: 1;border-color:rgb(202 191 253 / var(--tw-border-opacity))}.border-purple-400{--tw-border-opacity: 1;border-color:rgb(172 148 250 / var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity: 1;border-color:rgb(108 43 217 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(248 180 180 / var(--tw-border-opacity))}.border-red-400{--tw-border-opacity: 1;border-color:rgb(249 128 128 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(224 36 36 / var(--tw-border-opacity))}.border-red-700{--tw-border-opacity: 1;border-color:rgb(200 30 30 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(250 202 21 / var(--tw-border-opacity))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(227 160 8 / var(--tw-border-opacity))}.\!bg-gray-50{--tw-bg-opacity: 1 !important;background-color:rgb(249 250 251 / var(--tw-bg-opacity))!important}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.bg-blue-800{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(222 247 236 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(243 250 247 / var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.bg-green-800{--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(229 237 255 / var(--tw-bg-opacity))}.bg-indigo-50{--tw-bg-opacity: 1;background-color:rgb(240 245 255 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(88 80 236 / var(--tw-bg-opacity))}.bg-indigo-800{--tw-bg-opacity: 1;background-color:rgb(66 56 157 / var(--tw-bg-opacity))}.bg-inherit{background-color:inherit}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 248 241 / var(--tw-bg-opacity))}.bg-orange-600{--tw-bg-opacity: 1;background-color:rgb(208 56 1 / var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 232 243 / var(--tw-bg-opacity))}.bg-pink-50{--tw-bg-opacity: 1;background-color:rgb(253 242 248 / var(--tw-bg-opacity))}.bg-pink-500{--tw-bg-opacity: 1;background-color:rgb(231 70 148 / var(--tw-bg-opacity))}.bg-pink-800{--tw-bg-opacity: 1;background-color:rgb(153 21 75 / var(--tw-bg-opacity))}.bg-primary-100{--tw-bg-opacity: 1;background-color:rgb(255 241 238 / var(--tw-bg-opacity))}.bg-primary-200{--tw-bg-opacity: 1;background-color:rgb(255 228 222 / var(--tw-bg-opacity))}.bg-primary-400{--tw-bg-opacity: 1;background-color:rgb(255 188 173 / var(--tw-bg-opacity))}.bg-primary-50{--tw-bg-opacity: 1;background-color:rgb(255 245 242 / var(--tw-bg-opacity))}.bg-primary-500{--tw-bg-opacity: 1;background-color:rgb(254 121 93 / var(--tw-bg-opacity))}.bg-primary-600{--tw-bg-opacity: 1;background-color:rgb(239 86 47 / var(--tw-bg-opacity))}.bg-primary-700{--tw-bg-opacity: 1;background-color:rgb(235 79 39 / var(--tw-bg-opacity))}.bg-primary-800{--tw-bg-opacity: 1;background-color:rgb(204 69 34 / var(--tw-bg-opacity))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(237 235 254 / var(--tw-bg-opacity))}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(172 148 250 / var(--tw-bg-opacity))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(246 245 255 / var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.bg-purple-800{--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(249 128 128 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(253 242 242 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.bg-red-900{--tw-bg-opacity: 1;background-color:rgb(119 29 29 / var(--tw-bg-opacity))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.bg-teal-500{--tw-bg-opacity: 1;background-color:rgb(6 148 162 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/30{background-color:#ffffff4d}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(253 246 178 / var(--tw-bg-opacity))}.bg-yellow-300{--tw-bg-opacity: 1;background-color:rgb(250 202 21 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(253 253 234 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(194 120 3 / var(--tw-bg-opacity))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(159 88 10 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-75{--tw-bg-opacity: .75}.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))}.from-blue-500{--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-400{--tw-gradient-from: #22d3ee var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 211 238 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-lime-200{--tw-gradient-from: #d9f99d var(--tw-gradient-from-position);--tw-gradient-to: rgb(217 249 157 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-400{--tw-gradient-from: #F17EB8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(241 126 184 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-400{--tw-gradient-from: #F98080 var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 128 128 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-sky-400{--tw-gradient-from: #38bdf8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(56 189 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-200{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-400{--tw-gradient-from: #16BDCA var(--tw-gradient-from-position);--tw-gradient-to: rgb(22 189 202 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-blue-600{--tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #1C64F2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cyan-500{--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #06b6d4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-green-500{--tw-gradient-to: rgb(14 159 110 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #0E9F6E var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-lime-400{--tw-gradient-to: rgb(163 230 53 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #a3e635 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-500{--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #E74694 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-600{--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #7E3AF2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-500{--tw-gradient-to: rgb(240 82 82 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F05252 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-teal-500{--tw-gradient-to: rgb(6 148 162 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #0694A2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.to-blue-700{--tw-gradient-to: #1A56DB var(--tw-gradient-to-position)}.to-cyan-600{--tw-gradient-to: #0891b2 var(--tw-gradient-to-position)}.to-emerald-600{--tw-gradient-to: #059669 var(--tw-gradient-to-position)}.to-green-600{--tw-gradient-to: #057A55 var(--tw-gradient-to-position)}.to-lime-200{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.to-lime-500{--tw-gradient-to: #84cc16 var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.to-pink-600{--tw-gradient-to: #D61F69 var(--tw-gradient-to-position)}.to-purple-700{--tw-gradient-to: #6C2BD9 var(--tw-gradient-to-position)}.to-red-600{--tw-gradient-to: #E02424 var(--tw-gradient-to-position)}.to-teal-600{--tw-gradient-to: #047481 var(--tw-gradient-to-position)}.to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-blue-600{fill:#1c64f2}.fill-gray-600{fill:#4b5563}.fill-green-500{fill:#0e9f6e}.fill-pink-600{fill:#d61f69}.fill-primary-600{fill:#ef562f}.fill-purple-600{fill:#7e3af2}.fill-red-600{fill:#e02424}.fill-white{fill:#fff}.fill-yellow-400{fill:#e3a008}.object-cover{-o-object-fit:cover;object-fit:cover}.\!p-0{padding:0!important}.\!p-2{padding:.5rem!important}.\!p-3{padding:.75rem!important}.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-4{padding:1rem}.p-5{padding:1.25rem}.\!px-0{padding-left:0!important;padding-right:0!important}.px-0{padding-left:0;padding-right:0}.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-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-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-1\.5{padding-bottom:.375rem}.pb-2\.5{padding-bottom:.625rem}.pe-10{padding-inline-end:2.5rem}.pe-11{padding-inline-end:2.75rem}.pe-2\.5{padding-inline-end:.625rem}.pe-4{padding-inline-end:1rem}.pe-9{padding-inline-end:2.25rem}.ps-10{padding-inline-start:2.5rem}.ps-11{padding-inline-start:2.75rem}.ps-2\.5{padding-inline-start:.625rem}.ps-3{padding-inline-start:.75rem}.ps-4{padding-inline-start:1rem}.ps-9{padding-inline-start:2.25rem}.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}.text-justify{text-align:justify}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-7xl{font-size:4.5rem;line-height:1}.text-8xl{font-size:6rem;line-height:1}.text-9xl{font-size:8rem;line-height:1}.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-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-extralight{font-weight:200}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-loose{line-height:2}.leading-none{line-height:1}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.tracking-normal{letter-spacing:0em}.tracking-tight{letter-spacing:-.025em}.tracking-tighter{letter-spacing:-.05em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.\!text-gray-900{--tw-text-opacity: 1 !important;color:rgb(17 24 39 / var(--tw-text-opacity))!important}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-100{--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.text-blue-50{--tw-text-opacity: 1;color:rgb(235 245 255 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.text-blue-900{--tw-text-opacity: 1;color:rgb(35 56 118 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-100{--tw-text-opacity: 1;color:rgb(222 247 236 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(4 108 78 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.text-green-900{--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.text-indigo-100{--tw-text-opacity: 1;color:rgb(229 237 255 / var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(66 56 157 / var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity: 1;color:rgb(255 90 31 / var(--tw-text-opacity))}.text-orange-800{--tw-text-opacity: 1;color:rgb(138 44 13 / var(--tw-text-opacity))}.text-pink-100{--tw-text-opacity: 1;color:rgb(252 232 243 / var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.text-pink-800{--tw-text-opacity: 1;color:rgb(153 21 75 / var(--tw-text-opacity))}.text-primary-100{--tw-text-opacity: 1;color:rgb(255 241 238 / var(--tw-text-opacity))}.text-primary-500{--tw-text-opacity: 1;color:rgb(254 121 93 / var(--tw-text-opacity))}.text-primary-600{--tw-text-opacity: 1;color:rgb(239 86 47 / var(--tw-text-opacity))}.text-primary-700{--tw-text-opacity: 1;color:rgb(235 79 39 / var(--tw-text-opacity))}.text-primary-800{--tw-text-opacity: 1;color:rgb(204 69 34 / var(--tw-text-opacity))}.text-primary-900{--tw-text-opacity: 1;color:rgb(165 55 27 / var(--tw-text-opacity))}.text-purple-100{--tw-text-opacity: 1;color:rgb(237 235 254 / var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(108 43 217 / var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity: 1;color:rgb(85 33 181 / var(--tw-text-opacity))}.text-purple-900{--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.text-red-100{--tw-text-opacity: 1;color:rgb(253 232 232 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(4 116 129 / var(--tw-text-opacity))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-100{--tw-text-opacity: 1;color:rgb(253 246 178 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(227 160 8 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.decoration-blue-400{text-decoration-color:#76a9fa}.decoration-2{text-decoration-thickness:2px}.placeholder-green-700::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(4 108 78 / var(--tw-placeholder-opacity))}.placeholder-green-700::placeholder{--tw-placeholder-opacity: 1;color:rgb(4 108 78 / var(--tw-placeholder-opacity))}.placeholder-red-700::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(200 30 30 / var(--tw-placeholder-opacity))}.placeholder-red-700::placeholder{--tw-placeholder-opacity: 1;color:rgb(200 30 30 / var(--tw-placeholder-opacity))}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.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-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 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-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-500\/50{--tw-shadow-color: rgb(63 131 248 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-700{--tw-shadow-color: #1A56DB;--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-500\/50{--tw-shadow-color: rgb(6 182 212 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-gray-300{--tw-shadow-color: #D1D5DB;--tw-shadow: var(--tw-shadow-colored)}.shadow-gray-500\/50{--tw-shadow-color: rgb(107 114 128 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-gray-800{--tw-shadow-color: #1F2937;--tw-shadow: var(--tw-shadow-colored)}.shadow-green-500\/50{--tw-shadow-color: rgb(14 159 110 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-700{--tw-shadow-color: #046C4E;--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-500\/50{--tw-shadow-color: rgb(132 204 22 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-500\/50{--tw-shadow-color: rgb(231 70 148 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-primary-500\/50{--tw-shadow-color: rgb(254 121 93 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-primary-700{--tw-shadow-color: #EB4F27;--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-500\/50{--tw-shadow-color: rgb(144 97 249 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-700{--tw-shadow-color: #6C2BD9;--tw-shadow: var(--tw-shadow-colored)}.shadow-red-500\/50{--tw-shadow-color: rgb(240 82 82 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-700{--tw-shadow-color: #C81E1E;--tw-shadow: var(--tw-shadow-colored)}.shadow-teal-500\/50{--tw-shadow-color: rgb(6 148 162 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-yellow-500{--tw-shadow-color: #C27803;--tw-shadow: var(--tw-shadow-colored)}.shadow-yellow-500\/50{--tw-shadow-color: rgb(194 120 3 / .5);--tw-shadow: var(--tw-shadow-colored)}.\!outline{outline-style:solid!important}.outline{outline-style:solid}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-8{--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(8px + 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-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-primary-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(254 121 93 / var(--tw-ring-opacity))}.ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.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)}.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,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-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-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.first-letter\:float-left:first-letter{float:left}.first-letter\:me-3:first-letter{margin-inline-end:.75rem}.first-letter\:text-7xl:first-letter{font-size:4.5rem;line-height:1}.first-letter\:font-bold:first-letter{font-weight:700}.first-letter\:text-gray-900:first-letter{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.first-line\:uppercase:first-line{text-transform:uppercase}.first-line\:tracking-widest:first-line{letter-spacing:.1em}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:end-0:before{content:var(--tw-content);inset-inline-end:0px}.before\:z-10:before{content:var(--tw-content);z-index:10}.before\:block:before{content:var(--tw-content);display:block}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:shadow-\[-10px_0_50px_65px_rgba\(256\,256\,256\,1\)\]:before{content:var(--tw-content);--tw-shadow: -10px 0 50px 65px rgba(256,256,256,1);--tw-shadow-colored: -10px 0 50px 65px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.before\:content-\[\'\'\]:before{--tw-content: "";content:var(--tw-content)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:start-\[2px\]:after{content:var(--tw-content);inset-inline-start:2px}.after\:start-\[4px\]:after{content:var(--tw-content);inset-inline-start:4px}.after\:top-0\.5:after{content:var(--tw-content);top:.125rem}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:z-10:after{content:var(--tw-content);z-index:10}.after\:block:after{content:var(--tw-content);display:block}.after\:h-4:after{content:var(--tw-content);height:1rem}.after\:h-5:after{content:var(--tw-content);height:1.25rem}.after\:h-6:after{content:var(--tw-content);height:1.5rem}.after\:h-full:after{content:var(--tw-content);height:100%}.after\:w-4:after{content:var(--tw-content);width:1rem}.after\:w-5:after{content:var(--tw-content);width:1.25rem}.after\:w-6:after{content:var(--tw-content);width:1.5rem}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:border:after{content:var(--tw-content);border-width:1px}.after\:border-gray-300:after{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.after\:shadow-\[10px_0_50px_65px_rgba\(256\,256\,256\,1\)\]:after{content:var(--tw-content);--tw-shadow: 10px 0 50px 65px rgba(256,256,256,1);--tw-shadow-colored: 10px 0 50px 65px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.first\:rounded-s-full:first-child{border-start-start-radius:9999px;border-end-start-radius:9999px}.first\:rounded-s-lg:first-child{border-start-start-radius:.5rem;border-end-start-radius:.5rem}.first\:rounded-t-lg:first-child{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.last\:me-0:last-child{margin-inline-end:0px}.last\:rounded-b-lg:last-child{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.last\:rounded-e-full:last-child{border-start-end-radius:9999px;border-end-end-radius:9999px}.last\:rounded-e-lg:last-child{border-start-end-radius:.5rem;border-end-end-radius:.5rem}.last\:border-b-0:last-child{border-bottom-width:0px}.odd\:bg-blue-800:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.odd\:bg-green-800:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.odd\:bg-purple-800:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.odd\:bg-red-800:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.odd\:bg-white:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.odd\:bg-yellow-800:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(114 59 19 / var(--tw-bg-opacity))}.even\:bg-blue-700:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.even\:bg-gray-50:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.even\:bg-green-700:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.even\:bg-purple-700:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.even\:bg-red-700:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.even\:bg-yellow-700:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(142 75 16 / var(--tw-bg-opacity))}.focus-within\:z-10:focus-within{z-index:10}.focus-within\:border-primary-500:focus-within{--tw-border-opacity: 1;border-color:rgb(254 121 93 / var(--tw-border-opacity))}.focus-within\:bg-gray-900:focus-within{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.focus-within\:text-primary-700:focus-within{--tw-text-opacity: 1;color:rgb(235 79 39 / var(--tw-text-opacity))}.focus-within\:text-white:focus-within{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus-within\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}.focus-within\:ring-1:focus-within{--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-within\:ring-2:focus-within{--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-within\:ring-4:focus-within{--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(4px + 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-within\:ring-blue-300:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.focus-within\:ring-gray-200:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.focus-within\:ring-gray-300:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus-within\:ring-green-300:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.focus-within\:ring-primary-300:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 213 204 / var(--tw-ring-opacity))}.focus-within\:ring-purple-300:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.focus-within\:ring-red-300:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.focus-within\:ring-yellow-300:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity))}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.hover\:bg-blue-400:hover{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.hover\:bg-green-400:hover{--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.hover\:bg-indigo-200:hover{--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.hover\:bg-pink-200:hover{--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.hover\:bg-primary-100:hover{--tw-bg-opacity: 1;background-color:rgb(255 241 238 / var(--tw-bg-opacity))}.hover\:bg-primary-200:hover{--tw-bg-opacity: 1;background-color:rgb(255 228 222 / var(--tw-bg-opacity))}.hover\:bg-primary-700:hover{--tw-bg-opacity: 1;background-color:rgb(235 79 39 / var(--tw-bg-opacity))}.hover\:bg-primary-800:hover{--tw-bg-opacity: 1;background-color:rgb(204 69 34 / var(--tw-bg-opacity))}.hover\:bg-purple-200:hover{--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.hover\:bg-purple-400:hover{--tw-bg-opacity: 1;background-color:rgb(172 148 250 / var(--tw-bg-opacity))}.hover\:bg-purple-800:hover{--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.hover\:bg-red-400:hover{--tw-bg-opacity: 1;background-color:rgb(249 128 128 / var(--tw-bg-opacity))}.hover\:bg-red-800:hover{--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.hover\:bg-transparent:hover{background-color:transparent}.hover\:bg-yellow-200:hover{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.hover\:bg-yellow-400:hover{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity: 1;background-color:rgb(194 120 3 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-bl:hover{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-br:hover{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.hover\:bg-gradient-to-l:hover{background-image:linear-gradient(to left,var(--tw-gradient-stops))}.hover\:\!text-inherit:hover{color:inherit!important}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-primary-600:hover{--tw-text-opacity: 1;color:rgb(239 86 47 / var(--tw-text-opacity))}.hover\:text-primary-700:hover{--tw-text-opacity: 1;color:rgb(235 79 39 / var(--tw-text-opacity))}.hover\:text-primary-900:hover{--tw-text-opacity: 1;color:rgb(165 55 27 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.focus\:z-40:focus{z-index:40}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.focus\:border-gray-200:focus{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.focus\:border-green-500:focus{--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.focus\:border-green-600:focus{--tw-border-opacity: 1;border-color:rgb(5 122 85 / var(--tw-border-opacity))}.focus\:border-primary-500:focus{--tw-border-opacity: 1;border-color:rgb(254 121 93 / var(--tw-border-opacity))}.focus\:border-primary-600:focus{--tw-border-opacity: 1;border-color:rgb(239 86 47 / var(--tw-border-opacity))}.focus\:border-red-500:focus{--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.focus\:border-red-600:focus{--tw-border-opacity: 1;border-color:rgb(224 36 36 / var(--tw-border-opacity))}.focus\:text-primary-700:focus{--tw-text-opacity: 1;color:rgb(235 79 39 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0: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(0px + 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-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-4: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(4px + 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-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.focus\:ring-blue-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.focus\:ring-cyan-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(103 232 249 / var(--tw-ring-opacity))}.focus\:ring-gray-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.focus\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus\:ring-green-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(188 240 218 / var(--tw-ring-opacity))}.focus\:ring-green-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.focus\:ring-green-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(49 196 141 / var(--tw-ring-opacity))}.focus\:ring-green-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(14 159 110 / var(--tw-ring-opacity))}.focus\:ring-indigo-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(141 162 251 / var(--tw-ring-opacity))}.focus\:ring-lime-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(217 249 157 / var(--tw-ring-opacity))}.focus\:ring-lime-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(190 242 100 / var(--tw-ring-opacity))}.focus\:ring-orange-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 90 31 / var(--tw-ring-opacity))}.focus\:ring-pink-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 209 232 / var(--tw-ring-opacity))}.focus\:ring-pink-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 217 / var(--tw-ring-opacity))}.focus\:ring-pink-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(241 126 184 / var(--tw-ring-opacity))}.focus\:ring-primary-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 213 204 / var(--tw-ring-opacity))}.focus\:ring-primary-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 188 173 / var(--tw-ring-opacity))}.focus\:ring-primary-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(254 121 93 / var(--tw-ring-opacity))}.focus\:ring-primary-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(235 79 39 / var(--tw-ring-opacity))}.focus\:ring-purple-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 215 254 / var(--tw-ring-opacity))}.focus\:ring-purple-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.focus\:ring-purple-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(172 148 250 / var(--tw-ring-opacity))}.focus\:ring-purple-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(144 97 249 / var(--tw-ring-opacity))}.focus\:ring-red-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 232 232 / var(--tw-ring-opacity))}.focus\:ring-red-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(240 82 82 / var(--tw-ring-opacity))}.focus\:ring-teal-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity))}.focus\:ring-teal-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(6 148 162 / var(--tw-ring-opacity))}.focus\:ring-yellow-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(227 160 8 / var(--tw-ring-opacity))}.focus\:ring-yellow-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(194 120 3 / var(--tw-ring-opacity))}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:text-gray-400:disabled{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.disabled\:opacity-50:disabled{opacity:.5}.group:first-child .group-first\:rounded-s-lg{border-start-start-radius:.5rem;border-end-start-radius:.5rem}.group:first-child .group-first\:rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.group:first-child .group-first\:border-t{border-top-width:1px}.group:last-child .group-last\:rounded-e-lg{border-start-end-radius:.5rem;border-end-end-radius:.5rem}.group:hover .group-hover\:rotate-45{--tw-rotate: 45deg;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-white\/50{background-color:#ffffff80}.group:hover .group-hover\:\!bg-opacity-0{--tw-bg-opacity: 0 !important}.group:hover .group-hover\:\!text-inherit{color:inherit!important}.group:hover .group-hover\:text-primary-600{--tw-text-opacity: 1;color:rgb(239 86 47 / var(--tw-text-opacity))}.group:focus .group-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.group:focus .group-focus\:ring-4{--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(4px + 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)}.group:focus .group-focus\:ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.peer:checked~.peer-checked\:bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-green-600{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(255 90 31 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-primary-600{--tw-bg-opacity: 1;background-color:rgb(239 86 47 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-red-600{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-teal-600{--tw-bg-opacity: 1;background-color:rgb(4 116 129 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:after\:translate-x-full:after{content:var(--tw-content);--tw-translate-x: 100%;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))}.peer:checked~.peer-checked\:after\:border-white:after{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:top-1\/2{top:50%}.peer:placeholder-shown~.peer-placeholder-shown\:top-1\/2{top:50%}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:-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))}.peer:placeholder-shown~.peer-placeholder-shown\:-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))}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:translate-y-0{--tw-translate-y: 0px;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))}.peer:placeholder-shown~.peer-placeholder-shown\:translate-y-0{--tw-translate-y: 0px;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))}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;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))}.peer:placeholder-shown~.peer-placeholder-shown\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;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))}.peer:focus~.peer-focus\:start-0{inset-inline-start:0px}.peer:focus~.peer-focus\:top-2{top:.5rem}.peer:focus~.peer-focus\:-translate-y-4{--tw-translate-y: -1rem;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))}.peer:focus~.peer-focus\:-translate-y-6{--tw-translate-y: -1.5rem;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))}.peer:focus~.peer-focus\:scale-75{--tw-scale-x: .75;--tw-scale-y: .75;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))}.peer:focus~.peer-focus\:px-2{padding-left:.5rem;padding-right:.5rem}.peer:focus~.peer-focus\:text-primary-600{--tw-text-opacity: 1;color:rgb(239 86 47 / var(--tw-text-opacity))}.peer:focus~.peer-focus\:ring-4{--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(4px + 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)}.peer:focus~.peer-focus\:ring-blue-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-green-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-orange-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 186 140 / var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-primary-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 213 204 / var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-purple-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-red-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-teal-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-yellow-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity))}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}.dark\:divide-blue-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(30 66 159 / var(--tw-divide-opacity))}.dark\:divide-gray-600:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(75 85 99 / var(--tw-divide-opacity))}.dark\:divide-gray-700:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}.dark\:divide-gray-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(31 41 55 / var(--tw-divide-opacity))}.dark\:divide-green-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(3 84 63 / var(--tw-divide-opacity))}.dark\:divide-indigo-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(66 56 157 / var(--tw-divide-opacity))}.dark\:divide-orange-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(138 44 13 / var(--tw-divide-opacity))}.dark\:divide-pink-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(153 21 75 / var(--tw-divide-opacity))}.dark\:divide-primary-200:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(255 228 222 / var(--tw-divide-opacity))}.dark\:divide-purple-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(85 33 181 / var(--tw-divide-opacity))}.dark\:divide-red-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(155 28 28 / var(--tw-divide-opacity))}.dark\:divide-yellow-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(114 59 19 / var(--tw-divide-opacity))}.dark\:\!border-gray-600:is(.dark *){--tw-border-opacity: 1 !important;border-color:rgb(75 85 99 / var(--tw-border-opacity))!important}.dark\:border-blue-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.dark\:border-blue-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.dark\:border-blue-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 66 159 / var(--tw-border-opacity))}.dark\:border-gray-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity))}.dark\:border-gray-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.dark\:border-gray-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\:border-gray-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.dark\:border-gray-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.dark\:border-green-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(49 196 141 / var(--tw-border-opacity))}.dark\:border-green-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.dark\:border-green-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(3 84 63 / var(--tw-border-opacity))}.dark\:border-indigo-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(141 162 251 / var(--tw-border-opacity))}.dark\:border-indigo-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(66 56 157 / var(--tw-border-opacity))}.dark\:border-orange-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(138 44 13 / var(--tw-border-opacity))}.dark\:border-pink-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(241 126 184 / var(--tw-border-opacity))}.dark\:border-pink-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(153 21 75 / var(--tw-border-opacity))}.dark\:border-primary-200:is(.dark *){--tw-border-opacity: 1;border-color:rgb(255 228 222 / var(--tw-border-opacity))}.dark\:border-primary-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(255 188 173 / var(--tw-border-opacity))}.dark\:border-primary-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(254 121 93 / var(--tw-border-opacity))}.dark\:border-purple-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(172 148 250 / var(--tw-border-opacity))}.dark\:border-purple-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(85 33 181 / var(--tw-border-opacity))}.dark\:border-red-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(249 128 128 / var(--tw-border-opacity))}.dark\:border-red-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.dark\:border-red-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(155 28 28 / var(--tw-border-opacity))}.dark\:border-white:is(.dark *){--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.dark\:border-yellow-300:is(.dark *){--tw-border-opacity: 1;border-color:rgb(250 202 21 / var(--tw-border-opacity))}.dark\:border-yellow-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(114 59 19 / var(--tw-border-opacity))}.dark\:border-e-gray-600:is(.dark *){--tw-border-opacity: 1;border-inline-end-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:border-e-gray-700:is(.dark *){--tw-border-opacity: 1;border-inline-end-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\:\!bg-gray-700:is(.dark *){--tw-bg-opacity: 1 !important;background-color:rgb(55 65 81 / var(--tw-bg-opacity))!important}.dark\:bg-blue-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.dark\:bg-blue-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.dark\:bg-blue-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.dark\:bg-blue-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.dark\:bg-gray-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.dark\:bg-gray-300:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.dark\:bg-gray-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.dark\:bg-gray-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:bg-gray-800\/30:is(.dark *){background-color:#1f29374d}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\:bg-green-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.dark\:bg-green-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.dark\:bg-green-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.dark\:bg-green-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.dark\:bg-green-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(1 71 55 / var(--tw-bg-opacity))}.dark\:bg-indigo-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(141 162 251 / var(--tw-bg-opacity))}.dark\:bg-indigo-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.dark\:bg-indigo-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(66 56 157 / var(--tw-bg-opacity))}.dark\:bg-indigo-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(54 47 120 / var(--tw-bg-opacity))}.dark\:bg-inherit:is(.dark *){background-color:inherit}.dark\:bg-orange-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(138 44 13 / var(--tw-bg-opacity))}.dark\:bg-pink-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(241 126 184 / var(--tw-bg-opacity))}.dark\:bg-pink-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.dark\:bg-pink-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(117 26 61 / var(--tw-bg-opacity))}.dark\:bg-primary-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(255 228 222 / var(--tw-bg-opacity))}.dark\:bg-primary-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(255 188 173 / var(--tw-bg-opacity))}.dark\:bg-primary-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(254 121 93 / var(--tw-bg-opacity))}.dark\:bg-primary-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(239 86 47 / var(--tw-bg-opacity))}.dark\:bg-primary-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(204 69 34 / var(--tw-bg-opacity))}.dark\:bg-primary-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(165 55 27 / var(--tw-bg-opacity))}.dark\:bg-purple-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(172 148 250 / var(--tw-bg-opacity))}.dark\:bg-purple-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.dark\:bg-purple-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.dark\:bg-purple-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.dark\:bg-purple-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(74 29 150 / var(--tw-bg-opacity))}.dark\:bg-red-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.dark\:bg-red-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.dark\:bg-red-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.dark\:bg-red-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(119 29 29 / var(--tw-bg-opacity))}.dark\:bg-transparent:is(.dark *){background-color:transparent}.dark\:bg-yellow-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.dark\:bg-yellow-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(159 88 10 / var(--tw-bg-opacity))}.dark\:bg-yellow-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(114 59 19 / var(--tw-bg-opacity))}.dark\:bg-yellow-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(99 49 18 / var(--tw-bg-opacity))}.dark\:bg-opacity-80:is(.dark *){--tw-bg-opacity: .8}.dark\:fill-gray-300:is(.dark *){fill:#d1d5db}.dark\:\!text-white:is(.dark *){--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.dark\:text-blue-100:is(.dark *){--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.dark\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.dark\:text-blue-300:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.dark\:text-blue-500:is(.dark *){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.dark\:text-gray-700:is(.dark *){--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.dark\:text-gray-900:is(.dark *){--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.dark\:text-green-100:is(.dark *){--tw-text-opacity: 1;color:rgb(222 247 236 / var(--tw-text-opacity))}.dark\:text-green-200:is(.dark *){--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.dark\:text-green-300:is(.dark *){--tw-text-opacity: 1;color:rgb(132 225 188 / var(--tw-text-opacity))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity))}.dark\:text-green-500:is(.dark *){--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.dark\:text-indigo-100:is(.dark *){--tw-text-opacity: 1;color:rgb(229 237 255 / var(--tw-text-opacity))}.dark\:text-indigo-200:is(.dark *){--tw-text-opacity: 1;color:rgb(205 219 254 / var(--tw-text-opacity))}.dark\:text-indigo-300:is(.dark *){--tw-text-opacity: 1;color:rgb(180 198 252 / var(--tw-text-opacity))}.dark\:text-indigo-400:is(.dark *){--tw-text-opacity: 1;color:rgb(141 162 251 / var(--tw-text-opacity))}.dark\:text-orange-400:is(.dark *){--tw-text-opacity: 1;color:rgb(255 138 76 / var(--tw-text-opacity))}.dark\:text-pink-100:is(.dark *){--tw-text-opacity: 1;color:rgb(252 232 243 / var(--tw-text-opacity))}.dark\:text-pink-200:is(.dark *){--tw-text-opacity: 1;color:rgb(250 209 232 / var(--tw-text-opacity))}.dark\:text-pink-300:is(.dark *){--tw-text-opacity: 1;color:rgb(248 180 217 / var(--tw-text-opacity))}.dark\:text-pink-400:is(.dark *){--tw-text-opacity: 1;color:rgb(241 126 184 / var(--tw-text-opacity))}.dark\:text-primary-100:is(.dark *){--tw-text-opacity: 1;color:rgb(255 241 238 / var(--tw-text-opacity))}.dark\:text-primary-200:is(.dark *){--tw-text-opacity: 1;color:rgb(255 228 222 / var(--tw-text-opacity))}.dark\:text-primary-300:is(.dark *){--tw-text-opacity: 1;color:rgb(255 213 204 / var(--tw-text-opacity))}.dark\:text-primary-400:is(.dark *){--tw-text-opacity: 1;color:rgb(255 188 173 / var(--tw-text-opacity))}.dark\:text-primary-500:is(.dark *){--tw-text-opacity: 1;color:rgb(254 121 93 / var(--tw-text-opacity))}.dark\:text-primary-700:is(.dark *){--tw-text-opacity: 1;color:rgb(235 79 39 / var(--tw-text-opacity))}.dark\:text-primary-800:is(.dark *){--tw-text-opacity: 1;color:rgb(204 69 34 / var(--tw-text-opacity))}.dark\:text-primary-900:is(.dark *){--tw-text-opacity: 1;color:rgb(165 55 27 / var(--tw-text-opacity))}.dark\:text-purple-100:is(.dark *){--tw-text-opacity: 1;color:rgb(237 235 254 / var(--tw-text-opacity))}.dark\:text-purple-200:is(.dark *){--tw-text-opacity: 1;color:rgb(220 215 254 / var(--tw-text-opacity))}.dark\:text-purple-300:is(.dark *){--tw-text-opacity: 1;color:rgb(202 191 253 / var(--tw-text-opacity))}.dark\:text-purple-400:is(.dark *){--tw-text-opacity: 1;color:rgb(172 148 250 / var(--tw-text-opacity))}.dark\:text-red-100:is(.dark *){--tw-text-opacity: 1;color:rgb(253 232 232 / var(--tw-text-opacity))}.dark\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(248 180 180 / var(--tw-text-opacity))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.dark\:text-red-500:is(.dark *){--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:text-yellow-100:is(.dark *){--tw-text-opacity: 1;color:rgb(253 246 178 / var(--tw-text-opacity))}.dark\:text-yellow-200:is(.dark *){--tw-text-opacity: 1;color:rgb(252 233 106 / var(--tw-text-opacity))}.dark\:text-yellow-300:is(.dark *){--tw-text-opacity: 1;color:rgb(250 202 21 / var(--tw-text-opacity))}.dark\:decoration-blue-600:is(.dark *){text-decoration-color:#1c64f2}.dark\:placeholder-gray-400:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-400:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-green-500:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(14 159 110 / var(--tw-placeholder-opacity))}.dark\:placeholder-green-500:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(14 159 110 / var(--tw-placeholder-opacity))}.dark\:placeholder-red-500:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(240 82 82 / var(--tw-placeholder-opacity))}.dark\:placeholder-red-500:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(240 82 82 / var(--tw-placeholder-opacity))}.dark\:opacity-25:is(.dark *){opacity:.25}.dark\:shadow-blue-800:is(.dark *){--tw-shadow-color: #1E429F;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-blue-800\/80:is(.dark *){--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-cyan-800\/80:is(.dark *){--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-gray-700:is(.dark *){--tw-shadow-color: #374151;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-gray-800:is(.dark *){--tw-shadow-color: #1F2937;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-gray-800\/80:is(.dark *){--tw-shadow-color: rgb(31 41 55 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-gray-900:is(.dark *){--tw-shadow-color: #111827;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-green-800:is(.dark *){--tw-shadow-color: #03543F;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-green-800\/80:is(.dark *){--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-lime-800\/80:is(.dark *){--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-pink-800\/80:is(.dark *){--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-primary-800:is(.dark *){--tw-shadow-color: #CC4522;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-primary-800\/80:is(.dark *){--tw-shadow-color: rgb(204 69 34 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-purple-800:is(.dark *){--tw-shadow-color: #5521B5;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-purple-800\/80:is(.dark *){--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-red-800:is(.dark *){--tw-shadow-color: #9B1C1C;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-red-800\/80:is(.dark *){--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-teal-800\/80:is(.dark *){--tw-shadow-color: rgb(5 80 92 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-yellow-700:is(.dark *){--tw-shadow-color: #8E4B10;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-yellow-800\/80:is(.dark *){--tw-shadow-color: rgb(114 59 19 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:ring-gray-500:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.dark\:ring-gray-900:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(17 24 39 / var(--tw-ring-opacity))}.dark\:ring-primary-500:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(254 121 93 / var(--tw-ring-opacity))}.dark\:ring-offset-gray-800:is(.dark *){--tw-ring-offset-color: #1F2937}.dark\:first-letter\:text-gray-100:is(.dark *):first-letter{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.dark\:before\:shadow-\[-10px_0_50px_65px_rgba\(16\,24\,39\,1\)\]:is(.dark *):before{content:var(--tw-content);--tw-shadow: -10px 0 50px 65px rgba(16,24,39,1);--tw-shadow-colored: -10px 0 50px 65px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:after\:shadow-\[10px_0_50px_65px_rgba\(16\,24\,39\,1\)\]:is(.dark *):after{content:var(--tw-content);--tw-shadow: 10px 0 50px 65px rgba(16,24,39,1);--tw-shadow-colored: 10px 0 50px 65px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:last\:border-e-gray-500:last-child:is(.dark *){--tw-border-opacity: 1;border-inline-end-color:rgb(107 114 128 / var(--tw-border-opacity))}.dark\:last\:border-e-gray-600:last-child:is(.dark *){--tw-border-opacity: 1;border-inline-end-color:rgb(75 85 99 / var(--tw-border-opacity))}.odd\:dark\:bg-blue-800:is(.dark *):nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.odd\:dark\:bg-gray-800:is(.dark *):nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.odd\:dark\:bg-green-800:is(.dark *):nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.odd\:dark\:bg-purple-800:is(.dark *):nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.odd\:dark\:bg-red-800:is(.dark *):nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.odd\:dark\:bg-yellow-800:is(.dark *):nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(114 59 19 / var(--tw-bg-opacity))}.even\:dark\:bg-blue-700:is(.dark *):nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.even\:dark\:bg-gray-700:is(.dark *):nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.even\:dark\:bg-green-700:is(.dark *):nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.even\:dark\:bg-purple-700:is(.dark *):nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.even\:dark\:bg-red-700:is(.dark *):nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.even\:dark\:bg-yellow-700:is(.dark *):nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(142 75 16 / var(--tw-bg-opacity))}.dark\:focus-within\:border-primary-500:focus-within:is(.dark *){--tw-border-opacity: 1;border-color:rgb(254 121 93 / var(--tw-border-opacity))}.dark\:focus-within\:text-white:focus-within:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:focus-within\:ring-blue-800:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.dark\:focus-within\:ring-gray-700:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}.dark\:focus-within\:ring-gray-800:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.dark\:focus-within\:ring-green-800:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.dark\:focus-within\:ring-primary-800:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(204 69 34 / var(--tw-ring-opacity))}.dark\:focus-within\:ring-purple-900:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.dark\:focus-within\:ring-red-900:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.dark\:focus-within\:ring-yellow-900:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(99 49 18 / var(--tw-ring-opacity))}.dark\:hover\:border-gray-500:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.dark\:hover\:border-gray-600:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:hover\:bg-blue-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.dark\:hover\:bg-indigo-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(66 56 157 / var(--tw-bg-opacity))}.dark\:hover\:bg-pink-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(153 21 75 / var(--tw-bg-opacity))}.dark\:hover\:bg-primary-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(254 121 93 / var(--tw-bg-opacity))}.dark\:hover\:bg-primary-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(239 86 47 / var(--tw-bg-opacity))}.dark\:hover\:bg-primary-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(235 79 39 / var(--tw-bg-opacity))}.dark\:hover\:bg-primary-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(204 69 34 / var(--tw-bg-opacity))}.dark\:hover\:bg-purple-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.dark\:hover\:bg-purple-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.dark\:hover\:bg-purple-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.dark\:hover\:bg-yellow-400:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.dark\:hover\:bg-yellow-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(114 59 19 / var(--tw-bg-opacity))}.hover\:dark\:bg-gray-800:is(.dark *):hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:hover\:text-blue-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.dark\:hover\:text-gray-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:hover\:text-green-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(132 225 188 / var(--tw-text-opacity))}.dark\:hover\:text-indigo-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(180 198 252 / var(--tw-text-opacity))}.dark\:hover\:text-pink-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(248 180 217 / var(--tw-text-opacity))}.dark\:hover\:text-primary-100:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 241 238 / var(--tw-text-opacity))}.dark\:hover\:text-primary-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 213 204 / var(--tw-text-opacity))}.dark\:hover\:text-primary-900:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(165 55 27 / var(--tw-text-opacity))}.dark\:hover\:text-purple-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(202 191 253 / var(--tw-text-opacity))}.dark\:hover\:text-red-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(248 180 180 / var(--tw-text-opacity))}.dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:hover\:text-yellow-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(250 202 21 / var(--tw-text-opacity))}.dark\:focus\:border-blue-500:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.dark\:focus\:border-green-500:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.dark\:focus\:border-primary-500:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(254 121 93 / var(--tw-border-opacity))}.dark\:focus\:border-red-500:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.dark\:focus\:text-white:focus:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:focus\:ring-blue-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.dark\:focus\:ring-blue-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}.dark\:focus\:ring-blue-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.dark\:focus\:ring-cyan-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.dark\:focus\:ring-green-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(14 159 110 / var(--tw-ring-opacity))}.dark\:focus\:ring-green-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 122 85 / var(--tw-ring-opacity))}.dark\:focus\:ring-green-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.dark\:focus\:ring-lime-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 98 18 / var(--tw-ring-opacity))}.dark\:focus\:ring-orange-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(208 56 1 / var(--tw-ring-opacity))}.dark\:focus\:ring-pink-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.dark\:focus\:ring-primary-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(254 121 93 / var(--tw-ring-opacity))}.dark\:focus\:ring-primary-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(239 86 47 / var(--tw-ring-opacity))}.dark\:focus\:ring-purple-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(126 58 242 / var(--tw-ring-opacity))}.dark\:focus\:ring-purple-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-400:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(240 82 82 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(224 36 36 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity))}.dark\:focus\:ring-teal-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(4 116 129 / var(--tw-ring-opacity))}.dark\:focus\:ring-teal-700:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 102 114 / var(--tw-ring-opacity))}.dark\:focus\:ring-teal-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity))}.dark\:focus\:ring-yellow-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(159 88 10 / var(--tw-ring-opacity))}.dark\:disabled\:text-gray-500:disabled:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.group:hover .dark\:group-hover\:bg-gray-800\/60:is(.dark *){background-color:#1f293799}.group:hover .dark\:group-hover\:text-primary-500:is(.dark *){--tw-text-opacity: 1;color:rgb(254 121 93 / var(--tw-text-opacity))}.group:focus .dark\:group-focus\:ring-gray-800\/70:is(.dark *){--tw-ring-color: rgb(31 41 55 / .7)}.peer:focus~.peer-focus\:dark\:text-primary-500:is(.dark *){--tw-text-opacity: 1;color:rgb(254 121 93 / var(--tw-text-opacity))}.peer:focus~.dark\:peer-focus\:ring-blue-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.peer:focus~.dark\:peer-focus\:ring-green-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.peer:focus~.dark\:peer-focus\:ring-orange-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(138 44 13 / var(--tw-ring-opacity))}.peer:focus~.dark\:peer-focus\:ring-primary-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(204 69 34 / var(--tw-ring-opacity))}.peer:focus~.dark\:peer-focus\:ring-purple-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.peer:focus~.dark\:peer-focus\:ring-red-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity))}.peer:focus~.dark\:peer-focus\:ring-teal-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity))}.peer:focus~.dark\:peer-focus\:ring-yellow-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(114 59 19 / var(--tw-ring-opacity))}@media (min-width: 640px){.sm\:order-last{order:9999}.sm\:mb-0{margin-bottom:0}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:h-10{height:2.5rem}.sm\:h-6{height:1.5rem}.sm\:h-64{height:16rem}.sm\:h-7{height:1.75rem}.sm\:w-10{width:2.5rem}.sm\:w-6{width:1.5rem}.sm\:w-96{width:24rem}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.sm\:rounded-lg{border-radius:.5rem}.sm\:p-5{padding:1.25rem}.sm\:p-6{padding:1.5rem}.sm\:p-8{padding:2rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:pe-4{padding-inline-end:1rem}.sm\:ps-4{padding-inline-start:1rem}.sm\:text-center{text-align:center}.sm\:text-base{font-size:1rem;line-height:1.5rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}.first\:sm\:ps-0:first-child{padding-inline-start:0px}.last\:sm\:pe-0:last-child{padding-inline-end:0px}}@media (min-width: 768px){.md\:inset-0{inset:0}.md\:mb-0{margin-bottom:0}.md\:me-6{margin-inline-end:1.5rem}.md\:ms-2{margin-inline-start:.5rem}.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:flex{display:flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:h-\[21px\]{height:21px}.md\:h-\[262px\]{height:262px}.md\:h-\[278px\]{height:278px}.md\:h-\[294px\]{height:294px}.md\:h-\[42px\]{height:42px}.md\:h-\[654px\]{height:654px}.md\:h-\[682px\]{height:682px}.md\:h-\[8px\]{height:8px}.md\:h-\[95px\]{height:95px}.md\:h-auto{height:auto}.md\:h-full{height:100%}.md\:w-1\/3{width:33.333333%}.md\:w-2\/3{width:66.666667%}.md\:w-48{width:12rem}.md\:w-\[96px\]{width:96px}.md\:w-auto{width:auto}.md\:max-w-\[142px\]{max-width:142px}.md\:max-w-\[512px\]{max-width:512px}.md\:max-w-\[597px\]{max-width:597px}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:flex-row-reverse{flex-direction:row-reverse}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:gap-8{gap:2rem}.md\:gap-x-0{-moz-column-gap:0px;column-gap:0px}.md\: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)))}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.md\:divide-y-0>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(0px * var(--tw-divide-y-reverse))}.md\:rounded-none{border-radius:0}.md\:rounded-e-lg{border-start-end-radius:.5rem;border-end-end-radius:.5rem}.md\:rounded-s-lg{border-start-start-radius:.5rem;border-end-start-radius:.5rem}.md\:border-0{border-width:0px}.md\:bg-transparent{background-color:transparent}.md\:p-0{padding:0}.md\:p-5{padding:1.25rem}.md\:p-6{padding:1.5rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-8{padding-top:2rem;padding-bottom:2rem}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:font-medium{font-weight:500}.md\:text-primary-700{--tw-text-opacity: 1;color:rgb(235 79 39 / var(--tw-text-opacity))}.md\:hover\:bg-transparent:hover{background-color:transparent}.md\:hover\:text-primary-700:hover{--tw-text-opacity: 1;color:rgb(235 79 39 / var(--tw-text-opacity))}.md\:dark\:bg-transparent:is(.dark *){background-color:transparent}.md\:dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.md\:dark\:hover\:bg-transparent:hover:is(.dark *){background-color:transparent}.md\:dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}}@media (min-width: 1024px){.lg\:max-w-7xl{max-width:80rem}}@media (min-width: 1280px){.xl\:h-80{height:20rem}}@media (min-width: 1536px){.\32xl\:h-96{height:24rem}}.rtl\:origin-right:where([dir=rtl],[dir=rtl] *){transform-origin:right}.rtl\:-translate-x-1\/3:where([dir=rtl],[dir=rtl] *){--tw-translate-x: -33.333333%;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))}.rtl\:translate-x-1\/2:where([dir=rtl],[dir=rtl] *){--tw-translate-x: 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))}.rtl\:translate-x-1\/3:where([dir=rtl],[dir=rtl] *){--tw-translate-x: 33.333333%;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))}.rtl\:-scale-x-100:where([dir=rtl],[dir=rtl] *){--tw-scale-x: -1;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))}.rtl\:space-x-reverse:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}.rtl\:divide-x-reverse:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 1}.rtl\:text-right:where([dir=rtl],[dir=rtl] *){text-align:right}.peer:checked~.rtl\:peer-checked\:after\:-translate-x-full:where([dir=rtl],[dir=rtl] *):after{content:var(--tw-content);--tw-translate-x: -100%;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))}.\[\&\:not\(\:first-child\)\]\:-ms-px:not(:first-child){margin-inline-start:-1px} +*,: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(63 131 248 / .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(63 131 248 / .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]{display:none}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-style:solid;border-color:#e5e7eb}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-top-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-top-width:1px;border-right-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{position:absolute;width:8px;height:8px;background:inherit}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:before{content:"";visibility:visible;transform:rotate(45deg)}[data-popper-arrow]:after{content:"";visibility:visible;transform:rotate(45deg);position:absolute;width:9px;height:9px;background:inherit}[role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#4b5563}[role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#4b5563}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--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);border-color:#1c64f2}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}input[type=time]::-webkit-calendar-picker-indicator{background:none}select:not([size]){background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}:is([dir=rtl]) select:not([size]){background-position:left .75rem center;padding-right:.75rem;padding-left:0}[multiple]{background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#1c64f2;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--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)}[type=checkbox]:checked,[type=radio]:checked,.dark [type=checkbox]:checked,.dark [type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:.55em .55em;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}.dark [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M0.5 6h14'/%3e %3c/svg%3e");background-color:currentColor;border-color:transparent;background-position:center;background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{color:#fff;background:#1f2937;border:0;font-weight:500;font-size:.875rem;cursor:pointer;padding:.625rem 1rem .625rem 2rem;margin-inline-start:-1rem;margin-inline-end:1rem}input[type=file]::file-selector-button:hover{background:#374151}:is([dir=rtl]) input[type=file]::file-selector-button{padding-right:2rem;padding-left:1rem}.dark input[type=file]::file-selector-button{color:#fff;background:#4b5563}.dark input[type=file]::file-selector-button:hover{background:#6b7280}input[type=range]::-webkit-slider-thumb{height:1.25rem;width:1.25rem;background:#1c64f2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-webkit-slider-thumb{background:#9ca3af}.dark input[type=range]:disabled::-webkit-slider-thumb{background:#6b7280}input[type=range]:focus::-webkit-slider-thumb{outline:2px solid transparent;outline-offset:2px;--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(4px + 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);--tw-ring-opacity: 1px;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}input[type=range]::-moz-range-thumb{height:1.25rem;width:1.25rem;background:#1c64f2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-moz-range-thumb{background:#9ca3af}.dark input[type=range]:disabled::-moz-range-thumb{background:#6b7280}input[type=range]::-moz-range-progress{background:#3f83f8}input[type=range]::-ms-fill-lower{background:#3f83f8}input[type=range].range-sm::-webkit-slider-thumb{height:1rem;width:1rem}input[type=range].range-lg::-webkit-slider-thumb{height:1.5rem;width:1.5rem}input[type=range].range-sm::-moz-range-thumb{height:1rem;width:1rem}input[type=range].range-lg::-moz-range-thumb{height:1.5rem;width:1.5rem}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.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}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-inset-1{inset:-.25rem}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-left-\[17px\]{left:-17px}.-right-\[16px\]{right:-16px}.-right-\[17px\]{right:-17px}.-start-1\.5{inset-inline-start:-.375rem}.-start-14{inset-inline-start:-3.5rem}.-start-3{inset-inline-start:-.75rem}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.bottom-5{bottom:1.25rem}.bottom-6{bottom:1.5rem}.end-0{inset-inline-end:0px}.end-2\.5{inset-inline-end:.625rem}.end-5{inset-inline-end:1.25rem}.end-6{inset-inline-end:1.5rem}.left-0{left:0}.left-1\/2{left:50%}.start-0{inset-inline-start:0px}.start-1{inset-inline-start:.25rem}.start-1\/2{inset-inline-start:50%}.start-2\.5{inset-inline-start:.625rem}.start-5{inset-inline-start:1.25rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.top-5{top:1.25rem}.top-6{top:1.5rem}.top-\[124px\]{top:124px}.top-\[142px\]{top:142px}.top-\[178px\]{top:178px}.top-\[40px\]{top:40px}.top-\[72px\]{top:72px}.top-\[88px\]{top:88px}.top-\[calc\(100\%\+1rem\)\]{top:calc(100% + 1rem)}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.m-0\.5{margin:.125rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-8{margin-top:2rem;margin-bottom:2rem}.-mb-px{margin-bottom:-1px}.-me-1\.5{margin-inline-end:-.375rem}.-ms-4{margin-inline-start:-1rem}.-mt-px{margin-top:-1px}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-px{margin-bottom:1px}.me-1{margin-inline-end:.25rem}.me-2{margin-inline-end:.5rem}.me-3{margin-inline-end:.75rem}.me-4{margin-inline-end:1rem}.ms-1{margin-inline-start:.25rem}.ms-1\.5{margin-inline-start:.375rem}.ms-2{margin-inline-start:.5rem}.ms-3{margin-inline-start:.75rem}.ms-4{margin-inline-start:1rem}.ms-6{margin-inline-start:1.5rem}.ms-auto{margin-inline-start:auto}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.\!hidden{display:none!important}.hidden{display:none}.h-1{height:.25rem}.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-36{height:9rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-80{height:20rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[10px\]{height:10px}.h-\[140px\]{height:140px}.h-\[156px\]{height:156px}.h-\[172px\]{height:172px}.h-\[17px\]{height:17px}.h-\[18px\]{height:18px}.h-\[193px\]{height:193px}.h-\[213px\]{height:213px}.h-\[24px\]{height:24px}.h-\[32px\]{height:32px}.h-\[41px\]{height:41px}.h-\[426px\]{height:426px}.h-\[454px\]{height:454px}.h-\[46px\]{height:46px}.h-\[52px\]{height:52px}.h-\[55px\]{height:55px}.h-\[572px\]{height:572px}.h-\[5px\]{height:5px}.h-\[600px\]{height:600px}.h-\[63px\]{height:63px}.h-\[64px\]{height:64px}.h-auto{height:auto}.h-full{height:100%}.h-modal{height:calc(100% - 2rem)}.h-px{height:1px}.h-screen{height:100vh}.max-h-64{max-height:16rem}.max-h-full{max-height:100%}.min-h-\[2\.4rem\]{min-height:2.4rem}.min-h-\[2\.7rem\]{min-height:2.7rem}.min-h-\[3\.2rem\]{min-height:3.2rem}.\!w-full{width:100%!important}.w-1{width:.25rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-10\/12{width:83.333333%}.w-11{width:2.75rem}.w-11\/12{width:91.666667%}.w-12{width:3rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-2\/4{width:50%}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-8\/12{width:66.666667%}.w-80{width:20rem}.w-9{width:2.25rem}.w-9\/12{width:75%}.w-\[10px\]{width:10px}.w-\[148px\]{width:148px}.w-\[188px\]{width:188px}.w-\[1px\]{width:1px}.w-\[208px\]{width:208px}.w-\[272px\]{width:272px}.w-\[300px\]{width:300px}.w-\[3px\]{width:3px}.w-\[52px\]{width:52px}.w-\[56px\]{width:56px}.w-\[6px\]{width:6px}.w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.w-full{width:100%}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-60{max-width:15rem}.max-w-7xl{max-width:80rem}.max-w-\[133px\]{max-width:133px}.max-w-\[301px\]{max-width:301px}.max-w-\[341px\]{max-width:341px}.max-w-\[351px\]{max-width:351px}.max-w-\[540px\]{max-width:540px}.max-w-\[640px\]{max-width:640px}.max-w-\[83px\]{max-width:83px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-screen-md{max-width:768px}.max-w-screen-xl{max-width:1280px}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.origin-left{transform-origin:left}.-translate-x-1\/2{--tw-translate-x: -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))}.-translate-x-1\/3{--tw-translate-x: -33.333333%;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))}.-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))}.-translate-y-1\/3{--tw-translate-y: -33.333333%;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))}.-translate-y-4{--tw-translate-y: -1rem;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))}.-translate-y-6{--tw-translate-y: -1.5rem;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))}.translate-x-1\/3{--tw-translate-x: 33.333333%;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))}.translate-y-1\/3{--tw-translate-y: 33.333333%;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-45{--tw-rotate: 45deg;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-75{--tw-scale-x: .75;--tw-scale-y: .75;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-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-flow-row{grid-auto-flow:row}.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-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-8{gap:2rem}.gap-y-4{row-gap:1rem}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.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-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * 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-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-blue-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(164 202 254 / var(--tw-divide-opacity))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.divide-gray-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(209 213 219 / var(--tw-divide-opacity))}.divide-gray-500>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(107 114 128 / var(--tw-divide-opacity))}.divide-gray-700>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}.divide-green-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(132 225 188 / var(--tw-divide-opacity))}.divide-indigo-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(180 198 252 / var(--tw-divide-opacity))}.divide-orange-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(253 186 140 / var(--tw-divide-opacity))}.divide-pink-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(248 180 217 / var(--tw-divide-opacity))}.divide-primary-500>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(254 121 93 / var(--tw-divide-opacity))}.divide-purple-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(202 191 253 / var(--tw-divide-opacity))}.divide-red-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(248 180 180 / var(--tw-divide-opacity))}.divide-yellow-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(250 202 21 / var(--tw-divide-opacity))}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.overscroll-contain{overscroll-behavior:contain}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.\!rounded-md{border-radius:.375rem!important}.rounded{border-radius:.25rem}.rounded-\[2\.5rem\]{border-radius:2.5rem}.rounded-\[2rem\]{border-radius:2rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b-\[1rem\]{border-bottom-right-radius:1rem;border-bottom-left-radius:1rem}.rounded-b-\[2\.5rem\]{border-bottom-right-radius:2.5rem;border-bottom-left-radius:2.5rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-b-xl{border-bottom-right-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-e-full{border-start-end-radius:9999px;border-end-end-radius:9999px}.rounded-e-lg{border-start-end-radius:.5rem;border-end-end-radius:.5rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-s-full{border-start-start-radius:9999px;border-end-start-radius:9999px}.rounded-s-lg{border-start-start-radius:.5rem;border-end-start-radius:.5rem}.rounded-t-\[2\.5rem\]{border-top-left-radius:2.5rem;border-top-right-radius:2.5rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.rounded-t-sm{border-top-left-radius:.125rem;border-top-right-radius:.125rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.\!border-0{border-width:0px!important}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-\[10px\]{border-width:10px}.border-\[14px\]{border-width:14px}.border-\[16px\]{border-width:16px}.border-\[8px\]{border-width:8px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-e{border-inline-end-width:1px}.border-s{border-inline-start-width:1px}.border-s-4{border-inline-start-width:4px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.border-blue-400{--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.border-gray-900{--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.border-green-300{--tw-border-opacity: 1;border-color:rgb(132 225 188 / var(--tw-border-opacity))}.border-green-400{--tw-border-opacity: 1;border-color:rgb(49 196 141 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(5 122 85 / var(--tw-border-opacity))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity))}.border-indigo-300{--tw-border-opacity: 1;border-color:rgb(180 198 252 / var(--tw-border-opacity))}.border-indigo-400{--tw-border-opacity: 1;border-color:rgb(141 162 251 / var(--tw-border-opacity))}.border-inherit{border-color:inherit}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 140 / var(--tw-border-opacity))}.border-pink-300{--tw-border-opacity: 1;border-color:rgb(248 180 217 / var(--tw-border-opacity))}.border-pink-400{--tw-border-opacity: 1;border-color:rgb(241 126 184 / var(--tw-border-opacity))}.border-primary-400{--tw-border-opacity: 1;border-color:rgb(255 188 173 / var(--tw-border-opacity))}.border-primary-500{--tw-border-opacity: 1;border-color:rgb(254 121 93 / var(--tw-border-opacity))}.border-primary-600{--tw-border-opacity: 1;border-color:rgb(239 86 47 / var(--tw-border-opacity))}.border-primary-700{--tw-border-opacity: 1;border-color:rgb(235 79 39 / var(--tw-border-opacity))}.border-purple-300{--tw-border-opacity: 1;border-color:rgb(202 191 253 / var(--tw-border-opacity))}.border-purple-400{--tw-border-opacity: 1;border-color:rgb(172 148 250 / var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity: 1;border-color:rgb(108 43 217 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(248 180 180 / var(--tw-border-opacity))}.border-red-400{--tw-border-opacity: 1;border-color:rgb(249 128 128 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(224 36 36 / var(--tw-border-opacity))}.border-red-700{--tw-border-opacity: 1;border-color:rgb(200 30 30 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(250 202 21 / var(--tw-border-opacity))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(227 160 8 / var(--tw-border-opacity))}.\!bg-gray-50{--tw-bg-opacity: 1 !important;background-color:rgb(249 250 251 / var(--tw-bg-opacity))!important}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.bg-blue-800{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(222 247 236 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(243 250 247 / var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.bg-green-800{--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(229 237 255 / var(--tw-bg-opacity))}.bg-indigo-50{--tw-bg-opacity: 1;background-color:rgb(240 245 255 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(88 80 236 / var(--tw-bg-opacity))}.bg-indigo-800{--tw-bg-opacity: 1;background-color:rgb(66 56 157 / var(--tw-bg-opacity))}.bg-inherit{background-color:inherit}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 248 241 / var(--tw-bg-opacity))}.bg-orange-600{--tw-bg-opacity: 1;background-color:rgb(208 56 1 / var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 232 243 / var(--tw-bg-opacity))}.bg-pink-50{--tw-bg-opacity: 1;background-color:rgb(253 242 248 / var(--tw-bg-opacity))}.bg-pink-500{--tw-bg-opacity: 1;background-color:rgb(231 70 148 / var(--tw-bg-opacity))}.bg-pink-800{--tw-bg-opacity: 1;background-color:rgb(153 21 75 / var(--tw-bg-opacity))}.bg-primary-100{--tw-bg-opacity: 1;background-color:rgb(255 241 238 / var(--tw-bg-opacity))}.bg-primary-200{--tw-bg-opacity: 1;background-color:rgb(255 228 222 / var(--tw-bg-opacity))}.bg-primary-400{--tw-bg-opacity: 1;background-color:rgb(255 188 173 / var(--tw-bg-opacity))}.bg-primary-50{--tw-bg-opacity: 1;background-color:rgb(255 245 242 / var(--tw-bg-opacity))}.bg-primary-500{--tw-bg-opacity: 1;background-color:rgb(254 121 93 / var(--tw-bg-opacity))}.bg-primary-600{--tw-bg-opacity: 1;background-color:rgb(239 86 47 / var(--tw-bg-opacity))}.bg-primary-700{--tw-bg-opacity: 1;background-color:rgb(235 79 39 / var(--tw-bg-opacity))}.bg-primary-800{--tw-bg-opacity: 1;background-color:rgb(204 69 34 / var(--tw-bg-opacity))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(237 235 254 / var(--tw-bg-opacity))}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(172 148 250 / var(--tw-bg-opacity))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(246 245 255 / var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.bg-purple-800{--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(249 128 128 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(253 242 242 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.bg-red-900{--tw-bg-opacity: 1;background-color:rgb(119 29 29 / var(--tw-bg-opacity))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.bg-teal-500{--tw-bg-opacity: 1;background-color:rgb(6 148 162 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/30{background-color:#ffffff4d}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(253 246 178 / var(--tw-bg-opacity))}.bg-yellow-300{--tw-bg-opacity: 1;background-color:rgb(250 202 21 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(253 253 234 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(194 120 3 / var(--tw-bg-opacity))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(159 88 10 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-75{--tw-bg-opacity: .75}.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))}.from-blue-500{--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-400{--tw-gradient-from: #22d3ee var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 211 238 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-lime-200{--tw-gradient-from: #d9f99d var(--tw-gradient-from-position);--tw-gradient-to: rgb(217 249 157 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-400{--tw-gradient-from: #F17EB8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(241 126 184 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-400{--tw-gradient-from: #F98080 var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 128 128 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-sky-400{--tw-gradient-from: #38bdf8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(56 189 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-200{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-400{--tw-gradient-from: #16BDCA var(--tw-gradient-from-position);--tw-gradient-to: rgb(22 189 202 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-blue-600{--tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #1C64F2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cyan-500{--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #06b6d4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-green-500{--tw-gradient-to: rgb(14 159 110 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #0E9F6E var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-lime-400{--tw-gradient-to: rgb(163 230 53 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #a3e635 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-500{--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #E74694 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-600{--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #7E3AF2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-500{--tw-gradient-to: rgb(240 82 82 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F05252 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-teal-500{--tw-gradient-to: rgb(6 148 162 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #0694A2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.to-blue-700{--tw-gradient-to: #1A56DB var(--tw-gradient-to-position)}.to-cyan-600{--tw-gradient-to: #0891b2 var(--tw-gradient-to-position)}.to-emerald-600{--tw-gradient-to: #059669 var(--tw-gradient-to-position)}.to-green-600{--tw-gradient-to: #057A55 var(--tw-gradient-to-position)}.to-lime-200{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.to-lime-500{--tw-gradient-to: #84cc16 var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.to-pink-600{--tw-gradient-to: #D61F69 var(--tw-gradient-to-position)}.to-purple-700{--tw-gradient-to: #6C2BD9 var(--tw-gradient-to-position)}.to-red-600{--tw-gradient-to: #E02424 var(--tw-gradient-to-position)}.to-teal-600{--tw-gradient-to: #047481 var(--tw-gradient-to-position)}.to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-blue-600{fill:#1c64f2}.fill-gray-600{fill:#4b5563}.fill-green-500{fill:#0e9f6e}.fill-pink-600{fill:#d61f69}.fill-primary-600{fill:#ef562f}.fill-purple-600{fill:#7e3af2}.fill-red-600{fill:#e02424}.fill-white{fill:#fff}.fill-yellow-400{fill:#e3a008}.object-cover{-o-object-fit:cover;object-fit:cover}.\!p-0{padding:0!important}.\!p-2{padding:.5rem!important}.\!p-3{padding:.75rem!important}.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-4{padding:1rem}.p-5{padding:1.25rem}.\!px-0{padding-left:0!important;padding-right:0!important}.px-0{padding-left:0;padding-right:0}.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-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-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-1\.5{padding-bottom:.375rem}.pb-2\.5{padding-bottom:.625rem}.pe-10{padding-inline-end:2.5rem}.pe-11{padding-inline-end:2.75rem}.pe-2\.5{padding-inline-end:.625rem}.pe-4{padding-inline-end:1rem}.pe-9{padding-inline-end:2.25rem}.ps-10{padding-inline-start:2.5rem}.ps-11{padding-inline-start:2.75rem}.ps-2\.5{padding-inline-start:.625rem}.ps-3{padding-inline-start:.75rem}.ps-4{padding-inline-start:1rem}.ps-9{padding-inline-start:2.25rem}.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}.text-justify{text-align:justify}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-7xl{font-size:4.5rem;line-height:1}.text-8xl{font-size:6rem;line-height:1}.text-9xl{font-size:8rem;line-height:1}.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-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-extralight{font-weight:200}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-loose{line-height:2}.leading-none{line-height:1}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.tracking-normal{letter-spacing:0em}.tracking-tight{letter-spacing:-.025em}.tracking-tighter{letter-spacing:-.05em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.\!text-gray-900{--tw-text-opacity: 1 !important;color:rgb(17 24 39 / var(--tw-text-opacity))!important}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-100{--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.text-blue-50{--tw-text-opacity: 1;color:rgb(235 245 255 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.text-blue-900{--tw-text-opacity: 1;color:rgb(35 56 118 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-100{--tw-text-opacity: 1;color:rgb(222 247 236 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(4 108 78 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.text-green-900{--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.text-indigo-100{--tw-text-opacity: 1;color:rgb(229 237 255 / var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(66 56 157 / var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity: 1;color:rgb(255 90 31 / var(--tw-text-opacity))}.text-orange-800{--tw-text-opacity: 1;color:rgb(138 44 13 / var(--tw-text-opacity))}.text-pink-100{--tw-text-opacity: 1;color:rgb(252 232 243 / var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.text-pink-800{--tw-text-opacity: 1;color:rgb(153 21 75 / var(--tw-text-opacity))}.text-primary-100{--tw-text-opacity: 1;color:rgb(255 241 238 / var(--tw-text-opacity))}.text-primary-500{--tw-text-opacity: 1;color:rgb(254 121 93 / var(--tw-text-opacity))}.text-primary-600{--tw-text-opacity: 1;color:rgb(239 86 47 / var(--tw-text-opacity))}.text-primary-700{--tw-text-opacity: 1;color:rgb(235 79 39 / var(--tw-text-opacity))}.text-primary-800{--tw-text-opacity: 1;color:rgb(204 69 34 / var(--tw-text-opacity))}.text-primary-900{--tw-text-opacity: 1;color:rgb(165 55 27 / var(--tw-text-opacity))}.text-purple-100{--tw-text-opacity: 1;color:rgb(237 235 254 / var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(108 43 217 / var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity: 1;color:rgb(85 33 181 / var(--tw-text-opacity))}.text-purple-900{--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.text-red-100{--tw-text-opacity: 1;color:rgb(253 232 232 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(4 116 129 / var(--tw-text-opacity))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-100{--tw-text-opacity: 1;color:rgb(253 246 178 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(227 160 8 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.decoration-blue-400{text-decoration-color:#76a9fa}.decoration-2{text-decoration-thickness:2px}.placeholder-green-700::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(4 108 78 / var(--tw-placeholder-opacity))}.placeholder-green-700::placeholder{--tw-placeholder-opacity: 1;color:rgb(4 108 78 / var(--tw-placeholder-opacity))}.placeholder-red-700::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(200 30 30 / var(--tw-placeholder-opacity))}.placeholder-red-700::placeholder{--tw-placeholder-opacity: 1;color:rgb(200 30 30 / var(--tw-placeholder-opacity))}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.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-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 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-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-500\/50{--tw-shadow-color: rgb(63 131 248 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-700{--tw-shadow-color: #1A56DB;--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-500\/50{--tw-shadow-color: rgb(6 182 212 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-gray-300{--tw-shadow-color: #D1D5DB;--tw-shadow: var(--tw-shadow-colored)}.shadow-gray-500\/50{--tw-shadow-color: rgb(107 114 128 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-gray-800{--tw-shadow-color: #1F2937;--tw-shadow: var(--tw-shadow-colored)}.shadow-green-500\/50{--tw-shadow-color: rgb(14 159 110 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-700{--tw-shadow-color: #046C4E;--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-500\/50{--tw-shadow-color: rgb(132 204 22 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-500\/50{--tw-shadow-color: rgb(231 70 148 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-primary-500\/50{--tw-shadow-color: rgb(254 121 93 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-primary-700{--tw-shadow-color: #EB4F27;--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-500\/50{--tw-shadow-color: rgb(144 97 249 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-700{--tw-shadow-color: #6C2BD9;--tw-shadow: var(--tw-shadow-colored)}.shadow-red-500\/50{--tw-shadow-color: rgb(240 82 82 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-700{--tw-shadow-color: #C81E1E;--tw-shadow: var(--tw-shadow-colored)}.shadow-teal-500\/50{--tw-shadow-color: rgb(6 148 162 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-yellow-500{--tw-shadow-color: #C27803;--tw-shadow: var(--tw-shadow-colored)}.shadow-yellow-500\/50{--tw-shadow-color: rgb(194 120 3 / .5);--tw-shadow: var(--tw-shadow-colored)}.\!outline{outline-style:solid!important}.outline{outline-style:solid}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-8{--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(8px + 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-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-primary-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(254 121 93 / var(--tw-ring-opacity))}.ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.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)}.contrast-50{--tw-contrast: contrast(.5);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)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-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-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.first-letter\:float-left:first-letter{float:left}.first-letter\:me-3:first-letter{margin-inline-end:.75rem}.first-letter\:text-7xl:first-letter{font-size:4.5rem;line-height:1}.first-letter\:font-bold:first-letter{font-weight:700}.first-letter\:text-gray-900:first-letter{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.first-line\:uppercase:first-line{text-transform:uppercase}.first-line\:tracking-widest:first-line{letter-spacing:.1em}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:end-0:before{content:var(--tw-content);inset-inline-end:0px}.before\:z-10:before{content:var(--tw-content);z-index:10}.before\:block:before{content:var(--tw-content);display:block}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:shadow-\[-10px_0_50px_65px_rgba\(256\,256\,256\,1\)\]:before{content:var(--tw-content);--tw-shadow: -10px 0 50px 65px rgba(256,256,256,1);--tw-shadow-colored: -10px 0 50px 65px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.before\:content-\[\'\'\]:before{--tw-content: "";content:var(--tw-content)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:start-\[2px\]:after{content:var(--tw-content);inset-inline-start:2px}.after\:start-\[4px\]:after{content:var(--tw-content);inset-inline-start:4px}.after\:top-0\.5:after{content:var(--tw-content);top:.125rem}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:z-10:after{content:var(--tw-content);z-index:10}.after\:block:after{content:var(--tw-content);display:block}.after\:h-4:after{content:var(--tw-content);height:1rem}.after\:h-5:after{content:var(--tw-content);height:1.25rem}.after\:h-6:after{content:var(--tw-content);height:1.5rem}.after\:h-full:after{content:var(--tw-content);height:100%}.after\:w-4:after{content:var(--tw-content);width:1rem}.after\:w-5:after{content:var(--tw-content);width:1.25rem}.after\:w-6:after{content:var(--tw-content);width:1.5rem}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:border:after{content:var(--tw-content);border-width:1px}.after\:border-gray-300:after{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.after\:pl-3:after{content:var(--tw-content);padding-left:.75rem}.after\:shadow-\[10px_0_50px_65px_rgba\(256\,256\,256\,1\)\]:after{content:var(--tw-content);--tw-shadow: 10px 0 50px 65px rgba(256,256,256,1);--tw-shadow-colored: 10px 0 50px 65px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:content-\[\"▲\"\]:after{--tw-content: "▲";content:var(--tw-content)}.after\:content-\[\"▼\"\]:after{--tw-content: "▼";content:var(--tw-content)}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.first\:rounded-s-full:first-child{border-start-start-radius:9999px;border-end-start-radius:9999px}.first\:rounded-s-lg:first-child{border-start-start-radius:.5rem;border-end-start-radius:.5rem}.first\:rounded-t-lg:first-child{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.last\:me-0:last-child{margin-inline-end:0px}.last\:rounded-b-lg:last-child{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.last\:rounded-e-full:last-child{border-start-end-radius:9999px;border-end-end-radius:9999px}.last\:rounded-e-lg:last-child{border-start-end-radius:.5rem;border-end-end-radius:.5rem}.last\:border-b-0:last-child{border-bottom-width:0px}.odd\:bg-blue-800:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.odd\:bg-green-800:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.odd\:bg-purple-800:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.odd\:bg-red-800:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.odd\:bg-white:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.odd\:bg-yellow-800:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(114 59 19 / var(--tw-bg-opacity))}.even\:bg-blue-700:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.even\:bg-gray-50:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.even\:bg-green-700:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.even\:bg-purple-700:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.even\:bg-red-700:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.even\:bg-yellow-700:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(142 75 16 / var(--tw-bg-opacity))}.focus-within\:z-10:focus-within{z-index:10}.focus-within\:border-primary-500:focus-within{--tw-border-opacity: 1;border-color:rgb(254 121 93 / var(--tw-border-opacity))}.focus-within\:bg-gray-900:focus-within{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.focus-within\:text-primary-700:focus-within{--tw-text-opacity: 1;color:rgb(235 79 39 / var(--tw-text-opacity))}.focus-within\:text-white:focus-within{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus-within\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}.focus-within\:ring-1:focus-within{--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-within\:ring-2:focus-within{--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-within\:ring-4:focus-within{--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(4px + 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-within\:ring-blue-300:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.focus-within\:ring-gray-200:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.focus-within\:ring-gray-300:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus-within\:ring-green-300:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.focus-within\:ring-primary-300:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 213 204 / var(--tw-ring-opacity))}.focus-within\:ring-purple-300:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.focus-within\:ring-red-300:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.focus-within\:ring-yellow-300:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity))}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.hover\:bg-blue-400:hover{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.hover\:bg-green-400:hover{--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.hover\:bg-indigo-200:hover{--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.hover\:bg-pink-200:hover{--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.hover\:bg-primary-100:hover{--tw-bg-opacity: 1;background-color:rgb(255 241 238 / var(--tw-bg-opacity))}.hover\:bg-primary-200:hover{--tw-bg-opacity: 1;background-color:rgb(255 228 222 / var(--tw-bg-opacity))}.hover\:bg-primary-700:hover{--tw-bg-opacity: 1;background-color:rgb(235 79 39 / var(--tw-bg-opacity))}.hover\:bg-primary-800:hover{--tw-bg-opacity: 1;background-color:rgb(204 69 34 / var(--tw-bg-opacity))}.hover\:bg-purple-200:hover{--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.hover\:bg-purple-400:hover{--tw-bg-opacity: 1;background-color:rgb(172 148 250 / var(--tw-bg-opacity))}.hover\:bg-purple-800:hover{--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.hover\:bg-red-400:hover{--tw-bg-opacity: 1;background-color:rgb(249 128 128 / var(--tw-bg-opacity))}.hover\:bg-red-800:hover{--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.hover\:bg-transparent:hover{background-color:transparent}.hover\:bg-yellow-200:hover{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.hover\:bg-yellow-400:hover{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity: 1;background-color:rgb(194 120 3 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-bl:hover{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-br:hover{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.hover\:bg-gradient-to-l:hover{background-image:linear-gradient(to left,var(--tw-gradient-stops))}.hover\:\!text-inherit:hover{color:inherit!important}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-primary-600:hover{--tw-text-opacity: 1;color:rgb(239 86 47 / var(--tw-text-opacity))}.hover\:text-primary-700:hover{--tw-text-opacity: 1;color:rgb(235 79 39 / var(--tw-text-opacity))}.hover\:text-primary-900:hover{--tw-text-opacity: 1;color:rgb(165 55 27 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.focus\:z-40:focus{z-index:40}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.focus\:border-gray-200:focus{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.focus\:border-green-500:focus{--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.focus\:border-green-600:focus{--tw-border-opacity: 1;border-color:rgb(5 122 85 / var(--tw-border-opacity))}.focus\:border-primary-500:focus{--tw-border-opacity: 1;border-color:rgb(254 121 93 / var(--tw-border-opacity))}.focus\:border-primary-600:focus{--tw-border-opacity: 1;border-color:rgb(239 86 47 / var(--tw-border-opacity))}.focus\:border-red-500:focus{--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.focus\:border-red-600:focus{--tw-border-opacity: 1;border-color:rgb(224 36 36 / var(--tw-border-opacity))}.focus\:text-primary-700:focus{--tw-text-opacity: 1;color:rgb(235 79 39 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0: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(0px + 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-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-4: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(4px + 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-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.focus\:ring-blue-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.focus\:ring-cyan-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(103 232 249 / var(--tw-ring-opacity))}.focus\:ring-gray-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.focus\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus\:ring-green-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(188 240 218 / var(--tw-ring-opacity))}.focus\:ring-green-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.focus\:ring-green-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(49 196 141 / var(--tw-ring-opacity))}.focus\:ring-green-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(14 159 110 / var(--tw-ring-opacity))}.focus\:ring-indigo-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(141 162 251 / var(--tw-ring-opacity))}.focus\:ring-lime-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(217 249 157 / var(--tw-ring-opacity))}.focus\:ring-lime-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(190 242 100 / var(--tw-ring-opacity))}.focus\:ring-orange-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 90 31 / var(--tw-ring-opacity))}.focus\:ring-pink-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 209 232 / var(--tw-ring-opacity))}.focus\:ring-pink-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 217 / var(--tw-ring-opacity))}.focus\:ring-pink-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(241 126 184 / var(--tw-ring-opacity))}.focus\:ring-primary-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 213 204 / var(--tw-ring-opacity))}.focus\:ring-primary-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 188 173 / var(--tw-ring-opacity))}.focus\:ring-primary-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(254 121 93 / var(--tw-ring-opacity))}.focus\:ring-primary-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(235 79 39 / var(--tw-ring-opacity))}.focus\:ring-purple-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 215 254 / var(--tw-ring-opacity))}.focus\:ring-purple-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.focus\:ring-purple-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(172 148 250 / var(--tw-ring-opacity))}.focus\:ring-purple-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(144 97 249 / var(--tw-ring-opacity))}.focus\:ring-red-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 232 232 / var(--tw-ring-opacity))}.focus\:ring-red-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(240 82 82 / var(--tw-ring-opacity))}.focus\:ring-teal-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity))}.focus\:ring-teal-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(6 148 162 / var(--tw-ring-opacity))}.focus\:ring-yellow-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(227 160 8 / var(--tw-ring-opacity))}.focus\:ring-yellow-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(194 120 3 / var(--tw-ring-opacity))}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:text-gray-400:disabled{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.disabled\:opacity-50:disabled{opacity:.5}.group:first-child .group-first\:rounded-s-lg{border-start-start-radius:.5rem;border-end-start-radius:.5rem}.group:first-child .group-first\:rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.group:first-child .group-first\:border-t{border-top-width:1px}.group:last-child .group-last\:rounded-e-lg{border-start-end-radius:.5rem;border-end-end-radius:.5rem}.group:hover .group-hover\:rotate-45{--tw-rotate: 45deg;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-white\/50{background-color:#ffffff80}.group:hover .group-hover\:\!bg-opacity-0{--tw-bg-opacity: 0 !important}.group:hover .group-hover\:\!text-inherit{color:inherit!important}.group:hover .group-hover\:text-primary-600{--tw-text-opacity: 1;color:rgb(239 86 47 / var(--tw-text-opacity))}.group:focus .group-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.group:focus .group-focus\:ring-4{--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(4px + 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)}.group:focus .group-focus\:ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.peer:checked~.peer-checked\:bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-green-600{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(255 90 31 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-primary-600{--tw-bg-opacity: 1;background-color:rgb(239 86 47 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-red-600{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-teal-600{--tw-bg-opacity: 1;background-color:rgb(4 116 129 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:after\:translate-x-full:after{content:var(--tw-content);--tw-translate-x: 100%;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))}.peer:checked~.peer-checked\:after\:border-white:after{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:top-1\/2{top:50%}.peer:placeholder-shown~.peer-placeholder-shown\:top-1\/2{top:50%}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:-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))}.peer:placeholder-shown~.peer-placeholder-shown\:-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))}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:translate-y-0{--tw-translate-y: 0px;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))}.peer:placeholder-shown~.peer-placeholder-shown\:translate-y-0{--tw-translate-y: 0px;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))}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;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))}.peer:placeholder-shown~.peer-placeholder-shown\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;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))}.peer:focus~.peer-focus\:start-0{inset-inline-start:0px}.peer:focus~.peer-focus\:top-2{top:.5rem}.peer:focus~.peer-focus\:-translate-y-4{--tw-translate-y: -1rem;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))}.peer:focus~.peer-focus\:-translate-y-6{--tw-translate-y: -1.5rem;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))}.peer:focus~.peer-focus\:scale-75{--tw-scale-x: .75;--tw-scale-y: .75;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))}.peer:focus~.peer-focus\:px-2{padding-left:.5rem;padding-right:.5rem}.peer:focus~.peer-focus\:text-primary-600{--tw-text-opacity: 1;color:rgb(239 86 47 / var(--tw-text-opacity))}.peer:focus~.peer-focus\:ring-4{--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(4px + 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)}.peer:focus~.peer-focus\:ring-blue-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-green-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-orange-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 186 140 / var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-primary-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 213 204 / var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-purple-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-red-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-teal-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-yellow-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity))}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}.dark\:divide-blue-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(30 66 159 / var(--tw-divide-opacity))}.dark\:divide-gray-600:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(75 85 99 / var(--tw-divide-opacity))}.dark\:divide-gray-700:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}.dark\:divide-gray-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(31 41 55 / var(--tw-divide-opacity))}.dark\:divide-green-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(3 84 63 / var(--tw-divide-opacity))}.dark\:divide-indigo-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(66 56 157 / var(--tw-divide-opacity))}.dark\:divide-orange-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(138 44 13 / var(--tw-divide-opacity))}.dark\:divide-pink-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(153 21 75 / var(--tw-divide-opacity))}.dark\:divide-primary-200:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(255 228 222 / var(--tw-divide-opacity))}.dark\:divide-purple-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(85 33 181 / var(--tw-divide-opacity))}.dark\:divide-red-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(155 28 28 / var(--tw-divide-opacity))}.dark\:divide-yellow-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(114 59 19 / var(--tw-divide-opacity))}.dark\:\!border-gray-600:is(.dark *){--tw-border-opacity: 1 !important;border-color:rgb(75 85 99 / var(--tw-border-opacity))!important}.dark\:border-blue-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.dark\:border-blue-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.dark\:border-blue-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 66 159 / var(--tw-border-opacity))}.dark\:border-gray-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity))}.dark\:border-gray-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.dark\:border-gray-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\:border-gray-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.dark\:border-gray-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.dark\:border-green-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(49 196 141 / var(--tw-border-opacity))}.dark\:border-green-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.dark\:border-green-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(3 84 63 / var(--tw-border-opacity))}.dark\:border-indigo-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(141 162 251 / var(--tw-border-opacity))}.dark\:border-indigo-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(66 56 157 / var(--tw-border-opacity))}.dark\:border-orange-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(138 44 13 / var(--tw-border-opacity))}.dark\:border-pink-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(241 126 184 / var(--tw-border-opacity))}.dark\:border-pink-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(153 21 75 / var(--tw-border-opacity))}.dark\:border-primary-200:is(.dark *){--tw-border-opacity: 1;border-color:rgb(255 228 222 / var(--tw-border-opacity))}.dark\:border-primary-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(255 188 173 / var(--tw-border-opacity))}.dark\:border-primary-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(254 121 93 / var(--tw-border-opacity))}.dark\:border-purple-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(172 148 250 / var(--tw-border-opacity))}.dark\:border-purple-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(85 33 181 / var(--tw-border-opacity))}.dark\:border-red-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(249 128 128 / var(--tw-border-opacity))}.dark\:border-red-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.dark\:border-red-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(155 28 28 / var(--tw-border-opacity))}.dark\:border-white:is(.dark *){--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.dark\:border-yellow-300:is(.dark *){--tw-border-opacity: 1;border-color:rgb(250 202 21 / var(--tw-border-opacity))}.dark\:border-yellow-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(114 59 19 / var(--tw-border-opacity))}.dark\:border-e-gray-600:is(.dark *){--tw-border-opacity: 1;border-inline-end-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:border-e-gray-700:is(.dark *){--tw-border-opacity: 1;border-inline-end-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\:\!bg-gray-700:is(.dark *){--tw-bg-opacity: 1 !important;background-color:rgb(55 65 81 / var(--tw-bg-opacity))!important}.dark\:bg-blue-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.dark\:bg-blue-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.dark\:bg-blue-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.dark\:bg-blue-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.dark\:bg-gray-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.dark\:bg-gray-300:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.dark\:bg-gray-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.dark\:bg-gray-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:bg-gray-800\/30:is(.dark *){background-color:#1f29374d}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\:bg-green-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.dark\:bg-green-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.dark\:bg-green-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.dark\:bg-green-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.dark\:bg-green-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(1 71 55 / var(--tw-bg-opacity))}.dark\:bg-indigo-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(141 162 251 / var(--tw-bg-opacity))}.dark\:bg-indigo-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.dark\:bg-indigo-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(66 56 157 / var(--tw-bg-opacity))}.dark\:bg-indigo-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(54 47 120 / var(--tw-bg-opacity))}.dark\:bg-inherit:is(.dark *){background-color:inherit}.dark\:bg-orange-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(138 44 13 / var(--tw-bg-opacity))}.dark\:bg-pink-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(241 126 184 / var(--tw-bg-opacity))}.dark\:bg-pink-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.dark\:bg-pink-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(117 26 61 / var(--tw-bg-opacity))}.dark\:bg-primary-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(255 228 222 / var(--tw-bg-opacity))}.dark\:bg-primary-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(255 188 173 / var(--tw-bg-opacity))}.dark\:bg-primary-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(254 121 93 / var(--tw-bg-opacity))}.dark\:bg-primary-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(239 86 47 / var(--tw-bg-opacity))}.dark\:bg-primary-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(204 69 34 / var(--tw-bg-opacity))}.dark\:bg-primary-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(165 55 27 / var(--tw-bg-opacity))}.dark\:bg-purple-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(172 148 250 / var(--tw-bg-opacity))}.dark\:bg-purple-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.dark\:bg-purple-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.dark\:bg-purple-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.dark\:bg-purple-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(74 29 150 / var(--tw-bg-opacity))}.dark\:bg-red-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.dark\:bg-red-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.dark\:bg-red-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.dark\:bg-red-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(119 29 29 / var(--tw-bg-opacity))}.dark\:bg-transparent:is(.dark *){background-color:transparent}.dark\:bg-yellow-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.dark\:bg-yellow-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(159 88 10 / var(--tw-bg-opacity))}.dark\:bg-yellow-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(114 59 19 / var(--tw-bg-opacity))}.dark\:bg-yellow-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(99 49 18 / var(--tw-bg-opacity))}.dark\:bg-opacity-80:is(.dark *){--tw-bg-opacity: .8}.dark\:fill-gray-300:is(.dark *){fill:#d1d5db}.dark\:\!text-white:is(.dark *){--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.dark\:text-blue-100:is(.dark *){--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.dark\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.dark\:text-blue-300:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.dark\:text-blue-500:is(.dark *){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.dark\:text-gray-700:is(.dark *){--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.dark\:text-gray-900:is(.dark *){--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.dark\:text-green-100:is(.dark *){--tw-text-opacity: 1;color:rgb(222 247 236 / var(--tw-text-opacity))}.dark\:text-green-200:is(.dark *){--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.dark\:text-green-300:is(.dark *){--tw-text-opacity: 1;color:rgb(132 225 188 / var(--tw-text-opacity))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity))}.dark\:text-green-500:is(.dark *){--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.dark\:text-indigo-100:is(.dark *){--tw-text-opacity: 1;color:rgb(229 237 255 / var(--tw-text-opacity))}.dark\:text-indigo-200:is(.dark *){--tw-text-opacity: 1;color:rgb(205 219 254 / var(--tw-text-opacity))}.dark\:text-indigo-300:is(.dark *){--tw-text-opacity: 1;color:rgb(180 198 252 / var(--tw-text-opacity))}.dark\:text-indigo-400:is(.dark *){--tw-text-opacity: 1;color:rgb(141 162 251 / var(--tw-text-opacity))}.dark\:text-orange-400:is(.dark *){--tw-text-opacity: 1;color:rgb(255 138 76 / var(--tw-text-opacity))}.dark\:text-pink-100:is(.dark *){--tw-text-opacity: 1;color:rgb(252 232 243 / var(--tw-text-opacity))}.dark\:text-pink-200:is(.dark *){--tw-text-opacity: 1;color:rgb(250 209 232 / var(--tw-text-opacity))}.dark\:text-pink-300:is(.dark *){--tw-text-opacity: 1;color:rgb(248 180 217 / var(--tw-text-opacity))}.dark\:text-pink-400:is(.dark *){--tw-text-opacity: 1;color:rgb(241 126 184 / var(--tw-text-opacity))}.dark\:text-primary-100:is(.dark *){--tw-text-opacity: 1;color:rgb(255 241 238 / var(--tw-text-opacity))}.dark\:text-primary-200:is(.dark *){--tw-text-opacity: 1;color:rgb(255 228 222 / var(--tw-text-opacity))}.dark\:text-primary-300:is(.dark *){--tw-text-opacity: 1;color:rgb(255 213 204 / var(--tw-text-opacity))}.dark\:text-primary-400:is(.dark *){--tw-text-opacity: 1;color:rgb(255 188 173 / var(--tw-text-opacity))}.dark\:text-primary-500:is(.dark *){--tw-text-opacity: 1;color:rgb(254 121 93 / var(--tw-text-opacity))}.dark\:text-primary-700:is(.dark *){--tw-text-opacity: 1;color:rgb(235 79 39 / var(--tw-text-opacity))}.dark\:text-primary-800:is(.dark *){--tw-text-opacity: 1;color:rgb(204 69 34 / var(--tw-text-opacity))}.dark\:text-primary-900:is(.dark *){--tw-text-opacity: 1;color:rgb(165 55 27 / var(--tw-text-opacity))}.dark\:text-purple-100:is(.dark *){--tw-text-opacity: 1;color:rgb(237 235 254 / var(--tw-text-opacity))}.dark\:text-purple-200:is(.dark *){--tw-text-opacity: 1;color:rgb(220 215 254 / var(--tw-text-opacity))}.dark\:text-purple-300:is(.dark *){--tw-text-opacity: 1;color:rgb(202 191 253 / var(--tw-text-opacity))}.dark\:text-purple-400:is(.dark *){--tw-text-opacity: 1;color:rgb(172 148 250 / var(--tw-text-opacity))}.dark\:text-red-100:is(.dark *){--tw-text-opacity: 1;color:rgb(253 232 232 / var(--tw-text-opacity))}.dark\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(248 180 180 / var(--tw-text-opacity))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.dark\:text-red-500:is(.dark *){--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:text-yellow-100:is(.dark *){--tw-text-opacity: 1;color:rgb(253 246 178 / var(--tw-text-opacity))}.dark\:text-yellow-200:is(.dark *){--tw-text-opacity: 1;color:rgb(252 233 106 / var(--tw-text-opacity))}.dark\:text-yellow-300:is(.dark *){--tw-text-opacity: 1;color:rgb(250 202 21 / var(--tw-text-opacity))}.dark\:decoration-blue-600:is(.dark *){text-decoration-color:#1c64f2}.dark\:placeholder-gray-400:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-400:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-green-500:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(14 159 110 / var(--tw-placeholder-opacity))}.dark\:placeholder-green-500:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(14 159 110 / var(--tw-placeholder-opacity))}.dark\:placeholder-red-500:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(240 82 82 / var(--tw-placeholder-opacity))}.dark\:placeholder-red-500:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(240 82 82 / var(--tw-placeholder-opacity))}.dark\:opacity-25:is(.dark *){opacity:.25}.dark\:shadow-blue-800:is(.dark *){--tw-shadow-color: #1E429F;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-blue-800\/80:is(.dark *){--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-cyan-800\/80:is(.dark *){--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-gray-700:is(.dark *){--tw-shadow-color: #374151;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-gray-800:is(.dark *){--tw-shadow-color: #1F2937;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-gray-800\/80:is(.dark *){--tw-shadow-color: rgb(31 41 55 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-gray-900:is(.dark *){--tw-shadow-color: #111827;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-green-800:is(.dark *){--tw-shadow-color: #03543F;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-green-800\/80:is(.dark *){--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-lime-800\/80:is(.dark *){--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-pink-800\/80:is(.dark *){--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-primary-800:is(.dark *){--tw-shadow-color: #CC4522;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-primary-800\/80:is(.dark *){--tw-shadow-color: rgb(204 69 34 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-purple-800:is(.dark *){--tw-shadow-color: #5521B5;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-purple-800\/80:is(.dark *){--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-red-800:is(.dark *){--tw-shadow-color: #9B1C1C;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-red-800\/80:is(.dark *){--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-teal-800\/80:is(.dark *){--tw-shadow-color: rgb(5 80 92 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-yellow-700:is(.dark *){--tw-shadow-color: #8E4B10;--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-yellow-800\/80:is(.dark *){--tw-shadow-color: rgb(114 59 19 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:ring-gray-500:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.dark\:ring-gray-900:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(17 24 39 / var(--tw-ring-opacity))}.dark\:ring-primary-500:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(254 121 93 / var(--tw-ring-opacity))}.dark\:ring-offset-gray-800:is(.dark *){--tw-ring-offset-color: #1F2937}.dark\:first-letter\:text-gray-100:is(.dark *):first-letter{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.dark\:before\:shadow-\[-10px_0_50px_65px_rgba\(16\,24\,39\,1\)\]:is(.dark *):before{content:var(--tw-content);--tw-shadow: -10px 0 50px 65px rgba(16,24,39,1);--tw-shadow-colored: -10px 0 50px 65px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:after\:shadow-\[10px_0_50px_65px_rgba\(16\,24\,39\,1\)\]:is(.dark *):after{content:var(--tw-content);--tw-shadow: 10px 0 50px 65px rgba(16,24,39,1);--tw-shadow-colored: 10px 0 50px 65px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:last\:border-e-gray-500:last-child:is(.dark *){--tw-border-opacity: 1;border-inline-end-color:rgb(107 114 128 / var(--tw-border-opacity))}.dark\:last\:border-e-gray-600:last-child:is(.dark *){--tw-border-opacity: 1;border-inline-end-color:rgb(75 85 99 / var(--tw-border-opacity))}.odd\:dark\:bg-blue-800:is(.dark *):nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.odd\:dark\:bg-gray-800:is(.dark *):nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.odd\:dark\:bg-green-800:is(.dark *):nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.odd\:dark\:bg-purple-800:is(.dark *):nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.odd\:dark\:bg-red-800:is(.dark *):nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.odd\:dark\:bg-yellow-800:is(.dark *):nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(114 59 19 / var(--tw-bg-opacity))}.even\:dark\:bg-blue-700:is(.dark *):nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.even\:dark\:bg-gray-700:is(.dark *):nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.even\:dark\:bg-green-700:is(.dark *):nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.even\:dark\:bg-purple-700:is(.dark *):nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.even\:dark\:bg-red-700:is(.dark *):nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.even\:dark\:bg-yellow-700:is(.dark *):nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(142 75 16 / var(--tw-bg-opacity))}.dark\:focus-within\:border-primary-500:focus-within:is(.dark *){--tw-border-opacity: 1;border-color:rgb(254 121 93 / var(--tw-border-opacity))}.dark\:focus-within\:text-white:focus-within:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:focus-within\:ring-blue-800:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.dark\:focus-within\:ring-gray-700:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}.dark\:focus-within\:ring-gray-800:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.dark\:focus-within\:ring-green-800:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.dark\:focus-within\:ring-primary-800:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(204 69 34 / var(--tw-ring-opacity))}.dark\:focus-within\:ring-purple-900:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.dark\:focus-within\:ring-red-900:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.dark\:focus-within\:ring-yellow-900:focus-within:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(99 49 18 / var(--tw-ring-opacity))}.dark\:hover\:border-gray-500:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.dark\:hover\:border-gray-600:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:hover\:bg-blue-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.dark\:hover\:bg-indigo-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(66 56 157 / var(--tw-bg-opacity))}.dark\:hover\:bg-pink-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(153 21 75 / var(--tw-bg-opacity))}.dark\:hover\:bg-primary-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(254 121 93 / var(--tw-bg-opacity))}.dark\:hover\:bg-primary-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(239 86 47 / var(--tw-bg-opacity))}.dark\:hover\:bg-primary-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(235 79 39 / var(--tw-bg-opacity))}.dark\:hover\:bg-primary-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(204 69 34 / var(--tw-bg-opacity))}.dark\:hover\:bg-purple-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.dark\:hover\:bg-purple-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.dark\:hover\:bg-purple-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.dark\:hover\:bg-yellow-400:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.dark\:hover\:bg-yellow-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(114 59 19 / var(--tw-bg-opacity))}.hover\:dark\:bg-gray-800:is(.dark *):hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:hover\:text-blue-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.dark\:hover\:text-gray-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:hover\:text-green-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(132 225 188 / var(--tw-text-opacity))}.dark\:hover\:text-indigo-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(180 198 252 / var(--tw-text-opacity))}.dark\:hover\:text-pink-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(248 180 217 / var(--tw-text-opacity))}.dark\:hover\:text-primary-100:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 241 238 / var(--tw-text-opacity))}.dark\:hover\:text-primary-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 213 204 / var(--tw-text-opacity))}.dark\:hover\:text-primary-900:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(165 55 27 / var(--tw-text-opacity))}.dark\:hover\:text-purple-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(202 191 253 / var(--tw-text-opacity))}.dark\:hover\:text-red-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(248 180 180 / var(--tw-text-opacity))}.dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:hover\:text-yellow-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(250 202 21 / var(--tw-text-opacity))}.dark\:focus\:border-blue-500:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.dark\:focus\:border-green-500:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.dark\:focus\:border-primary-500:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(254 121 93 / var(--tw-border-opacity))}.dark\:focus\:border-red-500:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.dark\:focus\:text-white:focus:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:focus\:ring-blue-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.dark\:focus\:ring-blue-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}.dark\:focus\:ring-blue-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.dark\:focus\:ring-cyan-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.dark\:focus\:ring-green-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(14 159 110 / var(--tw-ring-opacity))}.dark\:focus\:ring-green-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 122 85 / var(--tw-ring-opacity))}.dark\:focus\:ring-green-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.dark\:focus\:ring-lime-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 98 18 / var(--tw-ring-opacity))}.dark\:focus\:ring-orange-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(208 56 1 / var(--tw-ring-opacity))}.dark\:focus\:ring-pink-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.dark\:focus\:ring-primary-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(254 121 93 / var(--tw-ring-opacity))}.dark\:focus\:ring-primary-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(239 86 47 / var(--tw-ring-opacity))}.dark\:focus\:ring-purple-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(126 58 242 / var(--tw-ring-opacity))}.dark\:focus\:ring-purple-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-400:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(240 82 82 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(224 36 36 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity))}.dark\:focus\:ring-teal-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(4 116 129 / var(--tw-ring-opacity))}.dark\:focus\:ring-teal-700:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 102 114 / var(--tw-ring-opacity))}.dark\:focus\:ring-teal-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity))}.dark\:focus\:ring-yellow-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(159 88 10 / var(--tw-ring-opacity))}.dark\:disabled\:text-gray-500:disabled:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.group:hover .dark\:group-hover\:bg-gray-800\/60:is(.dark *){background-color:#1f293799}.group:hover .dark\:group-hover\:text-primary-500:is(.dark *){--tw-text-opacity: 1;color:rgb(254 121 93 / var(--tw-text-opacity))}.group:focus .dark\:group-focus\:ring-gray-800\/70:is(.dark *){--tw-ring-color: rgb(31 41 55 / .7)}.peer:focus~.peer-focus\:dark\:text-primary-500:is(.dark *){--tw-text-opacity: 1;color:rgb(254 121 93 / var(--tw-text-opacity))}.peer:focus~.dark\:peer-focus\:ring-blue-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.peer:focus~.dark\:peer-focus\:ring-green-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.peer:focus~.dark\:peer-focus\:ring-orange-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(138 44 13 / var(--tw-ring-opacity))}.peer:focus~.dark\:peer-focus\:ring-primary-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(204 69 34 / var(--tw-ring-opacity))}.peer:focus~.dark\:peer-focus\:ring-purple-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.peer:focus~.dark\:peer-focus\:ring-red-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity))}.peer:focus~.dark\:peer-focus\:ring-teal-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity))}.peer:focus~.dark\:peer-focus\:ring-yellow-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(114 59 19 / var(--tw-ring-opacity))}@media (min-width: 640px){.sm\:order-last{order:9999}.sm\:mb-0{margin-bottom:0}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:h-10{height:2.5rem}.sm\:h-6{height:1.5rem}.sm\:h-64{height:16rem}.sm\:h-7{height:1.75rem}.sm\:w-10{width:2.5rem}.sm\:w-6{width:1.5rem}.sm\:w-96{width:24rem}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.sm\:rounded-lg{border-radius:.5rem}.sm\:p-5{padding:1.25rem}.sm\:p-6{padding:1.5rem}.sm\:p-8{padding:2rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:pe-4{padding-inline-end:1rem}.sm\:ps-4{padding-inline-start:1rem}.sm\:text-center{text-align:center}.sm\:text-base{font-size:1rem;line-height:1.5rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}.first\:sm\:ps-0:first-child{padding-inline-start:0px}.last\:sm\:pe-0:last-child{padding-inline-end:0px}}@media (min-width: 768px){.md\:inset-0{inset:0}.md\:mb-0{margin-bottom:0}.md\:me-6{margin-inline-end:1.5rem}.md\:ms-2{margin-inline-start:.5rem}.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:flex{display:flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:h-\[21px\]{height:21px}.md\:h-\[262px\]{height:262px}.md\:h-\[278px\]{height:278px}.md\:h-\[294px\]{height:294px}.md\:h-\[42px\]{height:42px}.md\:h-\[654px\]{height:654px}.md\:h-\[682px\]{height:682px}.md\:h-\[8px\]{height:8px}.md\:h-\[95px\]{height:95px}.md\:h-auto{height:auto}.md\:h-full{height:100%}.md\:w-1\/3{width:33.333333%}.md\:w-2\/3{width:66.666667%}.md\:w-48{width:12rem}.md\:w-\[96px\]{width:96px}.md\:w-auto{width:auto}.md\:max-w-\[142px\]{max-width:142px}.md\:max-w-\[512px\]{max-width:512px}.md\:max-w-\[597px\]{max-width:597px}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:flex-row-reverse{flex-direction:row-reverse}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:gap-8{gap:2rem}.md\:gap-x-0{-moz-column-gap:0px;column-gap:0px}.md\: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)))}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.md\:divide-y-0>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(0px * var(--tw-divide-y-reverse))}.md\:rounded-none{border-radius:0}.md\:rounded-e-lg{border-start-end-radius:.5rem;border-end-end-radius:.5rem}.md\:rounded-s-lg{border-start-start-radius:.5rem;border-end-start-radius:.5rem}.md\:border-0{border-width:0px}.md\:bg-transparent{background-color:transparent}.md\:p-0{padding:0}.md\:p-5{padding:1.25rem}.md\:p-6{padding:1.5rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-8{padding-top:2rem;padding-bottom:2rem}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:font-medium{font-weight:500}.md\:text-primary-700{--tw-text-opacity: 1;color:rgb(235 79 39 / var(--tw-text-opacity))}.md\:hover\:bg-transparent:hover{background-color:transparent}.md\:hover\:text-primary-700:hover{--tw-text-opacity: 1;color:rgb(235 79 39 / var(--tw-text-opacity))}.md\:dark\:bg-transparent:is(.dark *){background-color:transparent}.md\:dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.md\:dark\:hover\:bg-transparent:hover:is(.dark *){background-color:transparent}.md\:dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}}@media (min-width: 1024px){.lg\:max-w-7xl{max-width:80rem}}@media (min-width: 1280px){.xl\:h-80{height:20rem}}@media (min-width: 1536px){.\32xl\:h-96{height:24rem}}.rtl\:origin-right:where([dir=rtl],[dir=rtl] *){transform-origin:right}.rtl\:-translate-x-1\/3:where([dir=rtl],[dir=rtl] *){--tw-translate-x: -33.333333%;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))}.rtl\:translate-x-1\/2:where([dir=rtl],[dir=rtl] *){--tw-translate-x: 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))}.rtl\:translate-x-1\/3:where([dir=rtl],[dir=rtl] *){--tw-translate-x: 33.333333%;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))}.rtl\:-scale-x-100:where([dir=rtl],[dir=rtl] *){--tw-scale-x: -1;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))}.rtl\:space-x-reverse:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}.rtl\:divide-x-reverse:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 1}.rtl\:text-right:where([dir=rtl],[dir=rtl] *){text-align:right}.peer:checked~.rtl\:peer-checked\:after\:-translate-x-full:where([dir=rtl],[dir=rtl] *):after{content:var(--tw-content);--tw-translate-x: -100%;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))}.\[\&\:not\(\:first-child\)\]\:-ms-px:not(:first-child){margin-inline-start:-1px} diff --git a/inst/www/browser.js b/inst/www/browser.js new file mode 100644 index 0000000..242a3fe --- /dev/null +++ b/inst/www/browser.js @@ -0,0 +1 @@ +import{g as e}from"./index.js";var o=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};const r=e(o),s=Object.freeze(Object.defineProperty({__proto__:null,default:r},Symbol.toStringTag,{value:"Module"}));export{s as b}; diff --git a/inst/www/index.js b/inst/www/index.js index ae55de7..89e3d30 100644 --- a/inst/www/index.js +++ b/inst/www/index.js @@ -1,88 +1,80 @@ -var Wd=Object.defineProperty,Gd=Object.defineProperties;var Hd=Object.getOwnPropertyDescriptors;var Hn=Object.getOwnPropertySymbols;var ml=Object.prototype.hasOwnProperty,pl=Object.prototype.propertyIsEnumerable;var Te=Math.pow,ws=(i,e,t)=>e in i?Wd(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,$e=(i,e)=>{for(var t in e||(e={}))ml.call(e,t)&&ws(i,t,e[t]);if(Hn)for(var t of Hn(e))pl.call(e,t)&&ws(i,t,e[t]);return i},At=(i,e)=>Gd(i,Hd(e));var Cs=(i,e)=>{var t={};for(var r in i)ml.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&Hn)for(var r of Hn(i))e.indexOf(r)<0&&pl.call(i,r)&&(t[r]=i[r]);return t};var qd=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);var xs=(i,e,t)=>ws(i,typeof e!="symbol"?e+"":e,t);var Me=(i,e,t)=>new Promise((r,n)=>{var s=l=>{try{a(t.next(l))}catch(c){n(c)}},o=l=>{try{a(t.throw(l))}catch(c){n(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,o);a((t=t.apply(i,e)).next())});var Hb=qd(Xd=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))r(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(n){if(n.ep)return;n.ep=!0;const s=t(n);fetch(n.href,s)}})();function re(){}const Ta=i=>i;function Q(i,e){for(const t in e)i[t]=e[t];return i}function Ch(i){return i()}function vl(){return Object.create(null)}function Re(i){i.forEach(Ch)}function ct(i){return typeof i=="function"}function Ee(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}function Ud(i){return Object.keys(i).length===0}function Kd(i,...e){if(i==null){for(const r of e)r(void 0);return re}const t=i.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Jo(i,e,t){i.$$.on_destroy.push(Kd(e,t))}function Ke(i,e,t,r){if(i){const n=xh(i,e,t,r);return i[0](n)}}function xh(i,e,t,r){return i[1]&&r?Q(t.ctx.slice(),i[1](r(e))):t.ctx}function Ze(i,e,t,r){if(i[2]&&r){const n=i[2](r(t));if(e.dirty===void 0)return n;if(typeof n=="object"){const s=[],o=Math.max(e.dirty.length,n.length);for(let a=0;a32){const e=[],t=i.ctx.length/32;for(let r=0;rwindow.performance.now():()=>Date.now(),Da=kh?i=>requestAnimationFrame(i):re;const Wr=new Set;function Sh(i){Wr.forEach(e=>{e.c(i)||(Wr.delete(e),e.f())}),Wr.size!==0&&Da(Sh)}function Ma(i){let e;return Wr.size===0&&Da(Sh),{promise:new Promise(t=>{Wr.add(e={c:i,f:t})}),abort(){Wr.delete(e)}}}function H(i,e){i.appendChild(e)}function Th(i){if(!i)return document;const e=i.getRootNode?i.getRootNode():i.ownerDocument;return e&&e.host?e:i.ownerDocument}function Zd(i){const e=ve("style");return e.textContent="/* empty */",Jd(Th(i),e),e.sheet}function Jd(i,e){return H(i.head||i,e),e.sheet}function Y(i,e,t){i.insertBefore(e,t||null)}function V(i){i.parentNode&&i.parentNode.removeChild(i)}function Eh(i,e){for(let t=0;ti.removeEventListener(e,t,r)}function j(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}const Qd=["width","height"];function Ot(i,e){const t=Object.getOwnPropertyDescriptors(i.__proto__);for(const r in e)e[r]==null?i.removeAttribute(r):r==="style"?i.style.cssText=e[r]:r==="__value"?i.value=i[r]=e[r]:t[r]&&t[r].set&&Qd.indexOf(r)===-1?i[r]=e[r]:j(i,r,e[r])}function _e(i,e){for(const t in e)j(i,t,e[t])}function $d(i,e){Object.keys(e).forEach(t=>{eg(i,t,e[t])})}function eg(i,e,t){const r=e.toLowerCase();r in i?i[r]=typeof i[r]=="boolean"&&t===""?!0:t:e in i?i[e]=typeof i[e]=="boolean"&&t===""?!0:t:j(i,e,t)}function Zr(i){return/-/.test(i)?$d:Ot}function tg(i){return i===""?null:+i}function rg(i){return Array.from(i.childNodes)}function ce(i,e){e=""+e,i.data!==e&&(i.data=e)}function On(i,e){i.value=e==null?"":e}function bl(i,e,t,r){i.style.setProperty(e,t,"")}function Un(i,e,t){for(let r=0;r>>0}function sg(i,e){const t={stylesheet:Zd(e),rules:{}};return Pi.set(i,t),t}function Li(i,e,t,r,n,s,o,a=0){const l=16.666/r;let c=`{ -`;for(let v=0;v<=1;v+=l){const p=e+(t-e)*s(v);c+=v*100+`%{${o(p,1-p)}} -`}const u=c+`100% {${o(t,1-t)}} -}`,h=`__svelte_${ig(u)}_${a}`,d=Th(i),{stylesheet:f,rules:g}=Pi.get(d)||sg(d,i);g[h]||(g[h]=!0,f.insertRule(`@keyframes ${h} ${u}`,f.cssRules.length));const m=i.style.animation||"";return i.style.animation=`${m?`${m}, `:""}${h} ${r}ms linear ${n}ms 1 both`,Ai+=1,h}function ji(i,e){const t=(i.style.animation||"").split(", "),r=t.filter(e?s=>s.indexOf(e)<0:s=>s.indexOf("__svelte")===-1),n=t.length-r.length;n&&(i.style.animation=r.join(", "),Ai-=n,Ai||og())}function og(){Da(()=>{Ai||(Pi.forEach(i=>{const{ownerNode:e}=i.stylesheet;e&&V(e)}),Pi.clear())})}let Dn;function wn(i){Dn=i}function Nn(){if(!Dn)throw new Error("Function called outside component initialization");return Dn}function es(i){Nn().$$.on_mount.push(i)}function Dh(i){Nn().$$.on_destroy.push(i)}function Mh(){const i=Nn();return(e,t,{cancelable:r=!1}={})=>{const n=i.$$.callbacks[e];if(n){const s=Oh(e,t,{cancelable:r});return n.slice().forEach(o=>{o.call(i,s)}),!s.defaultPrevented}return!0}}function Qo(i,e){return Nn().$$.context.set(i,e),e}function Pt(i){return Nn().$$.context.get(i)}function z(i,e){const t=i.$$.callbacks[e.type];t&&t.slice().forEach(r=>r.call(this,e))}const Ir=[],vt=[];let Gr=[];const $o=[],ag=Promise.resolve();let ea=!1;function lg(){ea||(ea=!0,ag.then(Ph))}function It(i){Gr.push(i)}function ts(i){$o.push(i)}const ks=new Set;let Lr=0;function Ph(){if(Lr!==0)return;const i=Dn;do{try{for(;Lri.indexOf(r)===-1?e.push(r):t.push(r)),t.forEach(r=>r()),Gr=e}let hn;function Pa(){return hn||(hn=Promise.resolve(),hn.then(()=>{hn=null})),hn}function Cr(i,e,t){i.dispatchEvent(Oh(`${e?"intro":"outro"}${t}`))}const xi=new Set;let jt;function qe(){jt={r:0,c:[],p:jt}}function Ue(){jt.r||Re(jt.c),jt=jt.p}function G(i,e){i&&i.i&&(xi.delete(i),i.i(e))}function U(i,e,t,r){if(i&&i.o){if(xi.has(i))return;xi.add(i),jt.c.push(()=>{xi.delete(i),r&&(t&&i.d(1),r())}),i.o(e)}else r&&r()}const Aa={duration:0};function Ah(i,e,t){const r={direction:"in"};let n=e(i,t,r),s=!1,o,a,l=0;function c(){o&&ji(i,o)}function u(){const{delay:d=0,duration:f=300,easing:g=Ta,tick:m=re,css:v}=n||Aa;v&&(o=Li(i,0,1,f,d,g,v,l++)),m(0,1);const p=Oa()+d,b=p+f;a&&a.abort(),s=!0,It(()=>Cr(i,!0,"start")),a=Ma(C=>{if(s){if(C>=b)return m(1,0),Cr(i,!0,"end"),c(),s=!1;if(C>=p){const y=g((C-p)/f);m(y,1-y)}}return s})}let h=!1;return{start(){h||(h=!0,ji(i),ct(n)?(n=n(r),Pa().then(u)):u())},invalidate(){h=!1},end(){s&&(c(),s=!1)}}}function Lh(i,e,t){const r={direction:"out"};let n=e(i,t,r),s=!0,o;const a=jt;a.r+=1;let l;function c(){const{delay:u=0,duration:h=300,easing:d=Ta,tick:f=re,css:g}=n||Aa;g&&(o=Li(i,1,0,h,u,d,g));const m=Oa()+u,v=m+h;It(()=>Cr(i,!1,"start")),"inert"in i&&(l=i.inert,i.inert=!0),Ma(p=>{if(s){if(p>=v)return f(0,1),Cr(i,!1,"end"),--a.r||Re(a.c),!1;if(p>=m){const b=d((p-m)/h);f(1-b,b)}}return s})}return ct(n)?Pa().then(()=>{n=n(r),c()}):c(),{end(u){u&&"inert"in i&&(i.inert=l),u&&n.tick&&n.tick(1,0),s&&(o&&ji(i,o),s=!1)}}}function wl(i,e,t,r){let s=e(i,t,{direction:"both"}),o=r?0:1,a=null,l=null,c=null,u;function h(){c&&ji(i,c)}function d(g,m){const v=g.b-o;return m*=Math.abs(v),{a:o,b:g.b,d:v,duration:m,start:g.start,end:g.start+m,group:g.group}}function f(g){const{delay:m=0,duration:v=300,easing:p=Ta,tick:b=re,css:C}=s||Aa,y={start:Oa()+m,b:g};g||(y.group=jt,jt.r+=1),"inert"in i&&(g?u!==void 0&&(i.inert=u):(u=i.inert,i.inert=!0)),a||l?l=y:(C&&(h(),c=Li(i,o,g,v,m,p,C)),g&&b(0,1),a=d(y,v),It(()=>Cr(i,g,"start")),Ma(w=>{if(l&&w>l.start&&(a=d(l,v),l=null,Cr(i,a.b,"start"),C&&(h(),c=Li(i,o,a.b,a.duration,0,p,s.css))),a){if(w>=a.end)b(o=a.b,1-o),Cr(i,a.b,"end"),l||(a.b?h():--a.group.r||Re(a.group.c)),a=null;else if(w>=a.start){const x=w-a.start;o=a.a+a.d*p(x/a.duration),b(o,1-o)}}return!!(a||l)}))}return{run(g){ct(s)?Pa().then(()=>{s=s({direction:g?"in":"out"}),f(g)}):f(g)},end(){h(),a=l=null}}}function Fi(i){return(i==null?void 0:i.length)!==void 0?i:Array.from(i)}function we(i,e){const t={},r={},n={$$scope:1};let s=i.length;for(;s--;){const o=i[s],a=e[s];if(a){for(const l in o)l in a||(r[l]=1);for(const l in a)n[l]||(t[l]=a[l],n[l]=1);i[s]=a}else for(const l in o)n[l]=1}for(const o in r)o in t||(t[o]=void 0);return t}function Dr(i){return typeof i=="object"&&i!==null?i:{}}function rs(i,e,t){const r=i.$$.props[e];r!==void 0&&(i.$$.bound[r]=t,t(i.$$.ctx[r]))}function xe(i){i&&i.c()}function be(i,e,t){const{fragment:r,after_update:n}=i.$$;r&&r.m(e,t),It(()=>{const s=i.$$.on_mount.map(Ch).filter(ct);i.$$.on_destroy?i.$$.on_destroy.push(...s):Re(s),i.$$.on_mount=[]}),n.forEach(It)}function ye(i,e){const t=i.$$;t.fragment!==null&&(ug(t.after_update),Re(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function hg(i,e){i.$$.dirty[0]===-1&&(Ir.push(i),lg(),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<{const g=f.length?f[0]:d;return c.ctx&&n(c.ctx[h],c.ctx[h]=g)&&(!c.skip_bound&&c.bound[h]&&c.bound[h](g),u&&hg(i,h)),d}):[],c.update(),u=!0,Re(c.before_update),c.fragment=r?r(c.ctx):!1,e.target){if(e.hydrate){const h=rg(e.target);c.fragment&&c.fragment.l(h),h.forEach(V)}else c.fragment&&c.fragment.c();e.intro&&G(i.$$.fragment),be(i,e.target,e.anchor),Ph()}wn(l)}class Ie{constructor(){xs(this,"$$");xs(this,"$$set")}$destroy(){ye(this,1),this.$destroy=re}$on(e,t){if(!ct(t))return re;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(t),()=>{const n=r.indexOf(t);n!==-1&&r.splice(n,1)}}$set(e){this.$$set&&!Ud(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const fg="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(fg);const jr=[];function jh(i,e=re){let t;const r=new Set;function n(a){if(Ee(i,a)&&(i=a,t)){const l=!jr.length;for(const c of r)c[1](),jr.push(c,i);if(l){for(let c=0;c{r.delete(c),r.size===0&&t&&(t(),t=null)}}return{set:n,update:s,subscribe:o}}const ki=jh(!1),Ss=jh(!1);var Cl=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function dg(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var In={random:Fh,randomIterator:gg};function Fh(i){var e=typeof i=="number"?i:+new Date,t=function(){return e=e+2127912214+(e<<12)&4294967295,e=(e^3345072700^e>>>19)&4294967295,e=e+374761393+(e<<5)&4294967295,e=(e+3550635116^e<<9)&4294967295,e=e+4251993797+(e<<3)&4294967295,e=(e^3042594569^e>>>16)&4294967295,(e&268435455)/268435456};return{next:function(r){return Math.floor(t()*r)},nextDouble:function(){return t()}}}function gg(i,e){var t=e||Fh();if(typeof t.next!="function")throw new Error("customRandom does not match expected API: next() function is missing");return{forEach:function(r){var n,s,o;for(n=i.length-1;n>0;--n)s=t.next(n+1),o=i[s],i[s]=i[n],i[n]=o,r(o);i.length&&r(i[0])},shuffle:function(){var r,n,s;for(r=i.length-1;r>0;--r)n=t.next(r+1),s=i[n],i[n]=i[r],i[r]=s;return i}}}var Ts,xl;function nn(){if(xl)return Ts;xl=1,Ts=i;function i(e,t){var r;if(e||(e={}),t){for(r in t)if(t.hasOwnProperty(r)){var n=e.hasOwnProperty(r),s=typeof t[r],o=!n||typeof e[r]!==s;o?e[r]=t[r]:s==="object"&&(e[r]=i(e[r],t[r]))}}return e}return Ts}var Es,kl;function Mr(){if(kl)return Es;kl=1,Es=function(t){e(t);var r=i(t);return t.on=r.on,t.off=r.off,t.fire=r.fire,t};function i(t){var r=Object.create(null);return{on:function(n,s,o){if(typeof s!="function")throw new Error("callback is expected to be a function");var a=r[n];return a||(a=r[n]=[]),a.push({callback:s,ctx:o}),t},off:function(n,s){var o=typeof n=="undefined";if(o)return r=Object.create(null),t;if(r[n]){var a=typeof s!="function";if(a)delete r[n];else for(var l=r[n],c=0;c1&&(o=Array.prototype.splice.call(arguments,1));for(var a=0;a=0&&te.links.splice(K,1)),ae&&(K=t(I,ae.links),K>=0&&ae.links.splice(K,1)),v(I,"remove"),C(),!0}function P(I,K){var te=O(I),ae;if(!te||!te.links)return null;for(ae=0;ae0&&(y.fire("changed",m),m.length=0)}function tt(){return Object.keys?Ge:Z}function Ge(I){if(typeof I=="function"){for(var K=Object.keys(l),te=0;te0?o[s]=(d-1)/f:o[s]=0}function u(h){for(e.forEachNode(f),n[h]=0,r.push(h);r.length;){var d=r.shift();e.forEachLinkedNode(d,g,t)}function f(m){var v=m.id;n[v]=-1}function g(m){var v=m.id;n[v]===-1&&(n[v]=n[d]+1,r.push(v))}}}return js}var Fs,Al;function wg(){if(Al)return Fs;Al=1,Fs=i;function i(e,t){var r=[],n=Object.create(null),s,o=Object.create(null);return e.forEachNode(a),e.forEachNode(l),o;function a(h){o[h.id]=0}function l(h){s=h.id,u(s),c()}function c(){var h=0;Object.keys(n).forEach(function(d){var f=n[d];h=0==b>=4||(u=l-o,d=s-a,g=a*o-s*l,m=u*e+d*t+g,v=u*r+d*n+g,m!==0&&v!==0&&m>=0==v>=0)||(C=c*d-u*h,C===0)?null:(y=C<0?-C/2:C/2,y=0,w=h*g-d*f,x.x=(w<0?w-y:w+y)/C,w=u*f-c*g,x.y=(w<0?w-y:w+y)/C,x)}return Is}var Bs,Nl;function Sg(){if(Nl)return Bs;Nl=1;var i=Rh();Bs=e;function e(t,r,n,s,o,a,l,c){return i(t,r,t,s,o,a,l,c)||i(t,s,n,s,o,a,l,c)||i(n,s,n,r,o,a,l,c)||i(n,r,t,r,o,a,l,c)}return Bs}var zs,Il;function ns(){if(Il)return zs;Il=1,zs=i;function i(r){return{createProgram:s,extendArray:o,copyArrayPart:e,swapArrayPart:t,getLocations:a,context:r};function n(l,c){var u=r.createShader(c);if(r.shaderSource(u,l),r.compileShader(u),!r.getShaderParameter(u,r.COMPILE_STATUS)){var h=r.getShaderInfoLog(u);throw window.alert(h),h}return u}function s(l,c){var u=r.createProgram(),h=n(l,r.VERTEX_SHADER),d=n(c,r.FRAGMENT_SHADER);if(r.attachShader(u,h),r.attachShader(u,d),r.linkProgram(u),!r.getProgramParameter(u,r.LINK_STATUS)){var f=r.getShaderInfoLog(u);throw window.alert(f),f}return u}function o(l,c,u){if((c+1)*u>l.length){var h=new Float32Array(l.length*u*2);return h.set(l),h}return l}function a(l,c){for(var u={},h=0;h=1||o===0);return a*Math.sqrt(-2*Math.log(o)/o)}function r(){var o=this.seed;return o=o+2127912214+(o<<12)&4294967295,o=(o^3345072700^o>>>19)&4294967295,o=o+374761393+(o<<5)&4294967295,o=(o+3550635116^o<<9)&4294967295,o=o+4251993797+(o<<3)&4294967295,o=(o^3042594569^o>>>16)&4294967295,this.seed=o,(o&268435455)/268435456}function n(o){return Math.floor(this.nextDouble()*o)}function s(o,a){var l=a||i();if(typeof l.next!="function")throw new Error("customRandom does not match expected API: next() function is missing");return{forEach:u,shuffle:c};function c(){var h,d,f;for(h=o.length-1;h>0;--h)d=l.next(h+1),f=o[d],o[d]=o[h],o[h]=f;return o}function u(h){var d,f,g;for(d=o.length-1;d>0;--d)f=l.next(d+1),g=o[f],o[f]=o[d],o[d]=g,h(g);o.length&&h(o[0])}}return fn.exports}var Xl;function Eg(){if(Xl)return Kn.exports;Xl=1;var i=La();Kn.exports=e(i),Kn.exports.factory=e;function e(t){return{ladder:r,complete:s,completeBipartite:o,balancedBinTree:u,path:a,circularLadder:n,grid:l,grid3:c,noLinks:h,wattsStrogatz:f,cliqueCircle:d};function r(g){if(!g||g<0)throw new Error("Invalid number of nodes");var m=t(),v;for(v=0;v0&&v.addLink(C,p-1+b*g),b>0&&v.addLink(C,p+(b-1)*g)}return v}function c(g,m,v){if(g<1||m<1||v<1)throw new Error("Invalid number of nodes in grid3 graph");var p=t(),b,C,y;if(g===1&&m===1&&v===1)return p.addNode(0),p;for(y=0;y0&&p.addLink(x,b-1+C*g+w),C>0&&p.addLink(x,b+(C-1)*g+w),y>0&&p.addLink(x,b+C*g+(y-1)*g*m)}return p}function u(g){if(g<0)throw new Error("Invalid number of nodes in balanced tree");var m=t(),v=Math.pow(2,g),p;for(g===0&&m.addNode(1),p=1;p= 0");var m=t(),v;for(v=0;v0&&v.addLink(p*m,p*m-1);return v.addLink(0,v.getNodesCount()-1),v;function b(C,y){for(var w=0;w=g)throw new Error("Choose smaller `k`. It cannot be larger than number of nodes `n`");var b=Tg().random(p||42),C=t(),y,w;for(y=0;ym&&(N=1),l(E,N,{x:E.touches[0].clientX,y:E.touches[0].clientY}),m=T,b(E),C(E)}},F=function(E){g=!1,i.off("touchmove",W),i.off("touchend",F),i.off("touchcancel",F),f=null,a&&a(E)},R=function(E,P){b(E),C(E),h=P.clientX,d=P.clientY,f=E.target||E.srcElement,s&&s(E,{x:h,y:d}),g||(g=!0,i.on("touchmove",W),i.on("touchend",F),i.on("touchcancel",F))},A=function(E){if(E.touches.length===1)return R(E,E.touches[0]);E.touches.length===2&&(b(E),C(E),m=_(E.touches[0],E.touches[1]))};return n.addEventListener("mousedown",x),n.addEventListener("touchstart",A),{onStart:function(E){return s=E,this},onDrag:function(E){return o=E,this},onStop:function(E){return a=E,this},onScroll:function(E){return O(E),this},release:function(){n.removeEventListener("mousedown",x),n.removeEventListener("touchstart",A),i.off("mousemove",w),i.off("mouseup",k),i.off("touchmove",W),i.off("touchend",F),i.off("touchcancel",F),O(null)}}}return Hs}var qs,ql;function Fa(){if(ql)return qs;ql=1,qs=e;var i=ja();function e(t,r){var n={};return{bindDragNDrop:s};function s(o,a){var l;if(a){var c=r.getNodeUI(o.id);l=i(c),typeof a.onStart=="function"&&l.onStart(a.onStart),typeof a.onDrag=="function"&&l.onDrag(a.onDrag),typeof a.onStop=="function"&&l.onStop(a.onStop),n[o.id]=l}else(l=n[o.id])&&(l.release(),delete n[o.id])}}return qs}var Us,Ul;function Yh(){if(Ul)return Us;Ul=1,Us=e;var i=Bh();function e(t,r){var n=i(r),s=null,o={},a={x:0,y:0};return n.mouseDown(function(l,c){s=l,a.x=c.clientX,a.y=c.clientY,n.mouseCapture(s);var u=o[l.id];return u&&u.onStart&&u.onStart(c,a),!0}).mouseUp(function(l){n.releaseMouseCapture(s),s=null;var c=o[l.id];return c&&c.onStop&&c.onStop(),!0}).mouseMove(function(l,c){if(s){var u=o[s.id];return u&&u.onDrag&&u.onDrag(c,{x:c.clientX-a.x,y:c.clientY-a.y}),a.x=c.clientX,a.y=c.clientY,!0}}),{bindDragNDrop:function(l,c){o[l.id]=c,c||delete o[l.id]}}}return Us}var Ks,Kl;function Xh(){if(Kl)return Ks;Kl=1,Ks=i();function i(){var t=0,r=["ms","moz","webkit","o"],n,s;for(typeof window!="undefined"?s=window:typeof Cl!="undefined"?s=Cl:s={setTimeout:e,clearTimeout:e},n=0;n0)return this.stack[--this.popIdx]},reset:function(){this.popIdx=0}};function e(t,r){this.node=t,this.body=r}return to}var ro,rc;function Ag(){return rc||(rc=1,ro=function(e,t){var r=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);return r<1e-8&&n<1e-8}),ro}var no,nc;function Lg(){if(nc)return no;nc=1,no=function(t){t=t||{},t.gravity=typeof t.gravity=="number"?t.gravity:-1,t.theta=typeof t.theta=="number"?t.theta:.8;var r=In.random(1984),n=Mg(),s=Pg(),o=Ag(),a=t.gravity,l=[],c=new s,u=t.theta,h=[],d=0,f=g();return{insertBodies:v,getRoot:function(){return f},updateBodyForce:m,options:function(b){return b?(typeof b.gravity=="number"&&(a=b.gravity),typeof b.theta=="number"&&(u=b.theta),this):{gravity:a,theta:u}}};function g(){var b=h[d];return b?(b.quad0=null,b.quad1=null,b.quad2=null,b.quad3=null,b.body=null,b.mass=b.massX=b.massY=0,b.left=b.right=b.top=b.bottom=0):(b=new n,h[d]=b),++d,b}function m(b){var C=l,y,w,x,k,S=0,O=0,_=1,W=0,F=1;for(C[0]=f;_;){var R=C[W],A=R.body;_-=1,W+=1;var E=A!==b;A&&E?(w=A.pos.x-b.pos.x,x=A.pos.y-b.pos.y,k=Math.sqrt(w*w+x*x),k===0&&(w=(r.nextDouble()-.5)/50,x=(r.nextDouble()-.5)/50,k=Math.sqrt(w*w+x*x)),y=a*A.mass*b.mass/(k*k*k),S+=y*w,O+=y*x):E&&(w=R.massX/R.mass-b.pos.x,x=R.massY/R.mass-b.pos.y,k=Math.sqrt(w*w+x*x),k===0&&(w=(r.nextDouble()-.5)/50,x=(r.nextDouble()-.5)/50,k=Math.sqrt(w*w+x*x)),(R.right-R.left)/kw&&(w=O),_x&&(x=_)}var W=w-C,F=x-y;for(W>F?x=y+W:w=C+F,d=0,f=g(),f.left=C,f.right=w,f.top=y,f.bottom=x,k=S-1,k>=0&&(f.body=b[k]);k--;)p(b[k])}function p(b){for(c.reset(),c.push(f,b);!c.isEmpty();){var C=c.pop(),y=C.node,w=C.body;if(y.body){var A=y.body;if(y.body=null,o(A.pos,w.pos)){var E=3;do{var P=r.nextDouble(),T=(y.right-y.left)*P,N=(y.bottom-y.top)*P;A.pos.x=y.left+T,A.pos.y=y.top+N,E-=1}while(E>0&&o(A.pos,w.pos));if(E===0&&o(A.pos,w.pos))return}c.push(y,A),c.push(y,w)}else{var x=w.pos.x,k=w.pos.y;y.mass=y.mass+w.mass,y.massX=y.massX+w.mass*x,y.massY=y.massY+w.mass*k;var S=0,O=y.left,_=(y.right+O)/2,W=y.top,F=(y.bottom+W)/2;x>_&&(S=S+1,O=_,_=y.right),k>F&&(S=S+2,W=F,F=y.bottom);var R=i(y,S);R?c.push(R,w):(R=g(),R.left=O,R.top=W,R.right=_,R.bottom=F,R.body=w,e(y,S,R))}}}};function i(t,r){return r===0?t.quad0:r===1?t.quad1:r===2?t.quad2:r===3?t.quad3:null}function e(t,r,n){r===0?t.quad0=n:r===1?t.quad1=n:r===2?t.quad2=n:r===3&&(t.quad3=n)}return no}var io,ic;function jg(){return ic||(ic=1,io=function(i,e){var t=In.random(42),r={x1:0,y1:0,x2:0,y2:0};return{box:r,update:n,reset:function(){r.x1=r.y1=0,r.x2=r.y2=0},getBestNewPosition:function(s){var o=r,a=0,l=0;if(s.length){for(var c=0;cl&&(l=u.pos.x),u.pos.yc&&(c=u.pos.y)}r.x1=o,r.x2=l,r.y1=a,r.y2=c}}}),io}var so,sc;function Fg(){return sc||(sc=1,so=function(i){var e=nn(),t=Ra();i=e(i,{dragCoeff:.02});var r={update:function(n){n.force.x-=i.dragCoeff*n.velocity.x,n.force.y-=i.dragCoeff*n.velocity.y}};return t(i,r,["dragCoeff"]),r}),so}var oo,oc;function Rg(){return oc||(oc=1,oo=function(i){var e=nn(),t=In.random(42),r=Ra();i=e(i,{springCoeff:2e-4,springLength:80});var n={update:function(s){var o=s.from,a=s.to,l=s.length<0?i.springLength:s.length,c=a.pos.x-o.pos.x,u=a.pos.y-o.pos.y,h=Math.sqrt(c*c+u*u);h===0&&(c=(t.nextDouble()-.5)/50,u=(t.nextDouble()-.5)/50,h=Math.sqrt(c*c+u*u));var d=h-l,f=(!s.coeff||s.coeff<0?i.springCoeff:s.coeff)*d/h*s.weight;o.force.x+=f*c,o.force.y+=f*u,a.force.x-=f*c,a.force.y-=f*u}};return r(i,n,["springCoeff","springLength"]),n}),oo}var ao,ac;function Ng(){if(ac)return ao;ac=1,ao=i;function i(e,t){var r=0,n=0,s=0,o=0,a,l=e.length;if(l===0)return 0;for(a=0;a1&&(c.velocity.x=h/f,c.velocity.y=d/f),r=t*c.velocity.x,s=t*c.velocity.y,c.pos.x+=r,c.pos.y+=s,n+=Math.abs(r),o+=Math.abs(s)}return(n*n+o*o)/l}return ao}var lo,lc;function Ig(){if(lc)return lo;lc=1,lo={Body:i,Vector2d:e,Body3d:t,Vector3d:r};function i(n,s){this.pos=new e(n,s),this.prevPos=new e(n,s),this.force=new e,this.velocity=new e,this.mass=1}i.prototype.setPosition=function(n,s){this.prevPos.x=this.pos.x=n,this.prevPos.y=this.pos.y=s};function e(n,s){n&&typeof n!="number"?(this.x=typeof n.x=="number"?n.x:0,this.y=typeof n.y=="number"?n.y:0):(this.x=typeof n=="number"?n:0,this.y=typeof s=="number"?s:0)}e.prototype.reset=function(){this.x=this.y=0};function t(n,s,o){this.pos=new r(n,s,o),this.prevPos=new r(n,s,o),this.force=new r,this.velocity=new r,this.mass=1}t.prototype.setPosition=function(n,s,o){this.prevPos.x=this.pos.x=n,this.prevPos.y=this.pos.y=s,this.prevPos.z=this.pos.z=o};function r(n,s,o){n&&typeof n!="number"?(this.x=typeof n.x=="number"?n.x:0,this.y=typeof n.y=="number"?n.y:0,this.z=typeof n.z=="number"?n.z:0):(this.x=typeof n=="number"?n:0,this.y=typeof s=="number"?s:0,this.z=typeof o=="number"?o:0)}return r.prototype.reset=function(){this.x=this.y=this.z=0},lo}var co,cc;function Bg(){if(cc)return co;cc=1;var i=Ig();return co=function(e){return new i.Body(e)},co}var uo,uc;function hc(){if(uc)return uo;uc=1,uo=i;function i(e){var t=Dg(),r=Ra(),n=nn(),s=Mr();e=n(e,{springLength:30,springCoeff:8e-4,gravity:-1.2,theta:.8,dragCoeff:.02,timeStep:20});var o=e.createQuadTree||Lg(),a=e.createBounds||jg(),l=e.createDragForce||Fg(),c=e.createSpringForce||Rg(),u=e.integrator||Ng(),h=e.createBody||Bg(),d=[],f=[],g=o(e),m=a(d,e),v=c(e),p=l(e),b=!0,C=0,y={bodies:d,quadTree:g,springs:f,settings:e,step:function(){w();var x=u(d,e.timeStep);return m.update(),x},addBody:function(x){if(!x)throw new Error("Body is required");return d.push(x),x},addBodyAt:function(x){if(!x)throw new Error("Body position is required");var k=h(x);return d.push(k),k},removeBody:function(x){if(x){var k=d.indexOf(x);if(!(k<0))return d.splice(k,1),d.length===0&&m.reset(),!0}},addSpring:function(x,k,S,O,_){if(!x||!k)throw new Error("Cannot add null spring to force simulator");typeof S!="number"&&(S=-1);var W=new t(x,k,S,_>=0?_:-1,O);return f.push(W),W},getTotalMovement:function(){return C},removeSpring:function(x){if(x){var k=f.indexOf(x);if(k>-1)return f.splice(k,1),!0}},getBestNewBodyPosition:function(x){return m.getBestNewPosition(x)},getBBox:function(){return b&&(m.update(),b=!1),m.box},invalidateBBox:function(){b=!0},gravity:function(x){return x!==void 0?(e.gravity=x,g.options({gravity:x}),this):e.gravity},theta:function(x){return x!==void 0?(e.theta=x,g.options({theta:x}),this):e.theta}};return r(e,y),s(y),y;function w(){var x,k=d.length;if(k)for(g.insertBodies(d);k--;)x=d[k],x.isPinned||(x.force.reset(),g.updateBodyForce(x),p.update(x));for(k=f.length;k--;)v.update(f[k])}}return uo}var ho,fc;function zg(){if(fc)return ho;fc=1,ho=function(t){e(t);var r=i(t);return t.on=r.on,t.off=r.off,t.fire=r.fire,t};function i(t){var r=Object.create(null);return{on:function(n,s,o){if(typeof s!="function")throw new Error("callback is expected to be a function");var a=r[n];return a||(a=r[n]=[]),a.push({callback:s,ctx:o}),t},off:function(n,s){var o=typeof n=="undefined";if(o)return r=Object.create(null),t;if(r[n]){var a=typeof s!="function";if(a)delete r[n];else for(var l=r[n],c=0;c1&&(o=Array.prototype.splice.call(arguments,1));for(var a=0;ab.x2&&(b.x2=p.x),p.yb.y2&&(b.y2=p.y)},h=typeof Object.create=="function"?Object.create(null):{},d=function(p){h[p.id]=c(p),u(h[p.id],a)},f=function(){n.getNodesCount()!==0&&(a.x1=Number.MAX_VALUE,a.y1=Number.MAX_VALUE,a.x2=Number.MIN_VALUE,a.y2=Number.MIN_VALUE,n.forEachNode(d))},g=function(p){l[p.id]=p},m=function(p){for(var b=0;b=u.length&&b();var R=u[W.textureNumber];R.ctx.drawImage(O,W.col*s,W.row*s,s,s),h[S]=O.src,a[O.src]=F,R.isDirty=!0,_(F)}function y(S){var O=S/r<<0,_=S%r,W=_/n<<0,F=_%n;return{textureNumber:O,row:W,col:F}}function w(){d.isDirty=!0,c=0,l=null}function x(){l&&(window.clearTimeout(l),c+=1,l=null),c>10?w():l=window.setTimeout(w,400)}function k(S,O){var _=u[S.textureNumber].canvas,W=u[O.textureNumber].ctx,F=O.col*s,R=O.row*s;W.drawImage(_,S.col*s,S.row*s,s,s,F,R,s,s),u[S.textureNumber].isDirty=!0,u[O.textureNumber].isDirty=!0}}function t(r){return(r&r-1)===0}return po}var vo,_c;function Yg(){if(_c)return vo;_c=1;var i=Uh(),e=ns();vo=t;function t(c){var o=18,a=r(),l=n(),c=c||1024,u,h,d,f,g,m,v=0,p=new Float32Array(64),b,C,y,w;return{load:S,position:O,createNode:_,removeNode:W,replaceProperties:F,updateTransform:R,updateSize:A,render:E};function x(P,T){P.nativeObject&&d.deleteTexture(P.nativeObject);var N=d.createTexture();d.activeTexture(d["TEXTURE"+T]),d.bindTexture(d.TEXTURE_2D,N),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,P.canvas),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR_MIPMAP_NEAREST),d.generateMipmap(d.TEXTURE_2D),d.uniform1i(m["sampler"+T],T),P.nativeObject=N}function k(){if(u.isDirty){var P=u.getTextures(),T;for(T=0;T0&&(v-=1),P.id0&&(P.src&&u.remove(P.src),g.copyArrayPart(p,P.id*o,v*o,o))}function F(P,T){T._offset=P._offset}function R(P){w=!0,y=P}function A(P,T){b=P,C=T,w=!0}function E(){d.useProgram(h),d.bindBuffer(d.ARRAY_BUFFER,f),d.bufferData(d.ARRAY_BUFFER,p,d.DYNAMIC_DRAW),w&&(w=!1,d.uniformMatrix4fv(m.transform,!1,y),d.uniform2f(m.screenSize,b,C)),d.vertexAttribPointer(m.vertexPos,2,d.FLOAT,!1,3*Float32Array.BYTES_PER_ELEMENT,0),d.vertexAttribPointer(m.customAttributes,1,d.FLOAT,!1,3*Float32Array.BYTES_PER_ELEMENT,2*4),k(),d.drawArrays(d.TRIANGLES,0,v*6)}}function r(){return["precision mediump float;","varying vec4 color;","varying vec3 vTextureCoord;","uniform sampler2D u_sampler0;","uniform sampler2D u_sampler1;","uniform sampler2D u_sampler2;","uniform sampler2D u_sampler3;","void main(void) {"," if (vTextureCoord.z == 0.) {"," gl_FragColor = texture2D(u_sampler0, vTextureCoord.xy);"," } else if (vTextureCoord.z == 1.) {"," gl_FragColor = texture2D(u_sampler1, vTextureCoord.xy);"," } else if (vTextureCoord.z == 2.) {"," gl_FragColor = texture2D(u_sampler2, vTextureCoord.xy);"," } else if (vTextureCoord.z == 3.) {"," gl_FragColor = texture2D(u_sampler3, vTextureCoord.xy);"," } else { gl_FragColor = vec4(0, 1, 0, 1); }","}"].join(` -`)}function n(){return["attribute vec2 a_vertexPos;","attribute float a_customAttributes;","uniform vec2 u_screenSize;","uniform mat4 u_transform;","uniform float u_tilesPerTexture;","varying vec3 vTextureCoord;","void main(void) {"," gl_Position = u_transform * vec4(a_vertexPos/u_screenSize, 0, 1);","float corner = mod(a_customAttributes, 4.);","float tileIndex = mod(floor(a_customAttributes / 4.), u_tilesPerTexture);","float tilesPerRow = sqrt(u_tilesPerTexture);","float tileSize = 1./tilesPerRow;","float tileColumn = mod(tileIndex, tilesPerRow);","float tileRow = floor(tileIndex/tilesPerRow);","if(corner == 0.0) {"," vTextureCoord.xy = vec2(0, 1);","} else if(corner == 1.0) {"," vTextureCoord.xy = vec2(1, 1);","} else if(corner == 2.0) {"," vTextureCoord.xy = vec2(0, 0);","} else {"," vTextureCoord.xy = vec2(1, 0);","}","vTextureCoord *= tileSize;","vTextureCoord.x += tileColumn * tileSize;","vTextureCoord.y += tileRow * tileSize;","vTextureCoord.z = floor(floor(a_customAttributes / 4.)/u_tilesPerTexture);","}"].join(` -`)}return vo}var _o,bc;function Kh(){if(bc)return _o;bc=1;var i=ns();_o=e;function e(){var t=6,r=2*(2*Float32Array.BYTES_PER_ELEMENT+Uint32Array.BYTES_PER_ELEMENT),n=["precision mediump float;","varying vec4 color;","void main(void) {"," gl_FragColor = color;","}"].join(` -`),s=["attribute vec2 a_vertexPos;","attribute vec4 a_color;","uniform vec2 u_screenSize;","uniform mat4 u_transform;","varying vec4 color;","void main(void) {"," gl_Position = u_transform * vec4(a_vertexPos/u_screenSize, 0.0, 1.0);"," color = a_color.abgr;","}"].join(` -`),o,a,l,c,u,h=0,d,f=new ArrayBuffer(16*r),g=new Float32Array(f),m=new Uint32Array(f),v,p,b,C,y=function(){if((h+1)*r>f.byteLength){var w=new ArrayBuffer(f.byteLength*2),x=new Float32Array(w),k=new Uint32Array(w);k.set(m),g=x,m=k,f=w}};return{load:function(w){a=w,c=i(w),o=c.createProgram(s,n),a.useProgram(o),u=c.getLocations(o,["a_vertexPos","a_color","u_screenSize","u_transform"]),a.enableVertexAttribArray(u.vertexPos),a.enableVertexAttribArray(u.color),l=a.createBuffer()},position:function(w,x,k){var S=w.id,O=S*t;g[O]=x.x,g[O+1]=x.y,m[O+2]=w.color,g[O+3]=k.x,g[O+4]=k.y,m[O+5]=w.color},createLink:function(w){y(),h+=1,d=w.id},removeLink:function(w){h>0&&(h-=1),w.id0&&c.copyArrayPart(m,w.id*t,h*t,t)},updateTransform:function(w){C=!0,b=w},updateSize:function(w,x){v=w,p=x,C=!0},render:function(){a.useProgram(o),a.bindBuffer(a.ARRAY_BUFFER,l),a.bufferData(a.ARRAY_BUFFER,f,a.DYNAMIC_DRAW),C&&(C=!1,a.uniformMatrix4fv(u.transform,!1,b),a.uniform2f(u.screenSize,v,p)),a.vertexAttribPointer(u.vertexPos,2,a.FLOAT,!1,3*Float32Array.BYTES_PER_ELEMENT,0),a.vertexAttribPointer(u.color,4,a.UNSIGNED_BYTE,!0,3*Float32Array.BYTES_PER_ELEMENT,2*4),a.drawArrays(a.LINES,0,h*2),d=h-1},bringToFront:function(w){d>w.id&&c.swapArrayPart(g,w.id*t,d*t,t),d>0&&(d-=1)},getFrontLinkId:function(){return d}}}return _o}var bo,yc;function Zh(){if(yc)return bo;yc=1;var i=ns();bo=e;function e(){var t=4,r=3*Float32Array.BYTES_PER_ELEMENT+Uint32Array.BYTES_PER_ELEMENT,n=["precision mediump float;","varying vec4 color;","void main(void) {"," gl_FragColor = color;","}"].join(` -`),s=["attribute vec3 a_vertexPos;","attribute vec4 a_color;","uniform vec2 u_screenSize;","uniform mat4 u_transform;","varying vec4 color;","void main(void) {"," gl_Position = u_transform * vec4(a_vertexPos.xy/u_screenSize, 0, 1);"," gl_PointSize = a_vertexPos.z * u_transform[0][0];"," color = a_color.abgr;","}"].join(` -`),o,a,l,c,u,h=new ArrayBuffer(16*r),d=new Float32Array(h),f=new Uint32Array(h),g=0,m,v,p,b;return{load:y,position:w,updateTransform:x,updateSize:k,removeNode:S,createNode:O,replaceProperties:_,render:W};function C(){if((g+1)*r>=h.byteLength){var F=new ArrayBuffer(h.byteLength*2),R=new Float32Array(F),A=new Uint32Array(F);A.set(f),d=R,f=A,h=F}}function y(F){a=F,u=i(F),o=u.createProgram(s,n),a.useProgram(o),c=u.getLocations(o,["a_vertexPos","a_color","u_screenSize","u_transform"]),a.enableVertexAttribArray(c.vertexPos),a.enableVertexAttribArray(c.color),l=a.createBuffer()}function w(F,R){var A=F.id;d[A*t]=R.x,d[A*t+1]=-R.y,d[A*t+2]=F.size,f[A*t+3]=F.color}function x(F){b=!0,p=F}function k(F,R){m=F,v=R,b=!0}function S(F){g>0&&(g-=1),F.id0&&u.copyArrayPart(f,F.id*t,g*t,t)}function O(){C(),g+=1}function _(){}function W(){a.useProgram(o),a.bindBuffer(a.ARRAY_BUFFER,l),a.bufferData(a.ARRAY_BUFFER,h,a.DYNAMIC_DRAW),b&&(b=!1,a.uniformMatrix4fv(c.transform,!1,p),a.uniform2f(c.screenSize,m,v)),a.vertexAttribPointer(c.vertexPos,3,a.FLOAT,!1,t*Float32Array.BYTES_PER_ELEMENT,0),a.vertexAttribPointer(c.color,4,a.UNSIGNED_BYTE,!0,t*Float32Array.BYTES_PER_ELEMENT,3*4),a.drawArrays(a.POINTS,0,g)}}return bo}var yo,wc;function Na(){if(wc)return yo;wc=1,yo=i;function i(e){var t=10414335;if(typeof e=="string"&&e)if(e.length===4&&(e=e.replace(/([^#])/g,"$1$1")),e.length===9)t=parseInt(e.substr(1),16);else if(e.length===7)t=parseInt(e.substr(1),16)<<8|255;else throw'Color expected in hex format with preceding "#". E.g. #00ff00. Got value: '+e;else typeof e=="number"&&(t=e);return t}return yo}var wo,Cc;function Jh(){if(Cc)return wo;Cc=1;var i=Na();wo=e;function e(t){return{color:i(t)}}return wo}var Co,xc;function Qh(){if(xc)return Co;xc=1;var i=Na();Co=e;function e(t,r){return{size:typeof t=="number"?t:10,color:i(r)}}return Co}var xo,kc;function Xg(){if(kc)return xo;kc=1,xo=i;function i(e,t){return{_texture:0,_offset:0,size:typeof e=="number"?e:32,src:t}}return xo}var ko,Sc;function Wg(){if(Sc)return ko;Sc=1,ko=a;var i=Yh(),e=Kh(),t=Zh(),r=Qh(),n=Jh(),s=Mr(),o=nn();function a(l){l=o(l,{enableBlending:!0,preserveDrawingBuffer:!1,clearColor:!1,clearColorValue:{r:1,g:1,b:1,a:1}});var c,u,h,d,f,g=0,m=0,v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],p,b,C=[],y=[],w,x={},k={},S=e(),O=t(),_=function(T){return r()},W=function(T){return n(3014898687)},F=function(){S.updateTransform(v),O.updateTransform(v)},R=function(){v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},A=function(){c&&u&&(d=u.width=Math.max(c.offsetWidth,1),f=u.height=Math.max(c.offsetHeight,1),h&&h.viewport(0,0,d,f),S&&S.updateSize(d/2,f/2),O&&O.updateSize(d/2,f/2))},E=function(T){T.fire("rescaled")};u=window.document.createElement("canvas");var P={getLinkUI:function(T){return k[T]},getNodeUI:function(T){return x[T]},node:function(T){if(typeof T=="function")return _=T,this},link:function(T){if(typeof T=="function")return W=T,this},placeNode:function(T){return p=T,this},placeLink:function(T){return b=T,this},inputManager:i,beginRender:function(){},endRender:function(){m>0&&S.render(),g>0&&O.render()},bringLinkToFront:function(T){var N=S.getFrontLinkId(),q,B;S.bringToFront(T),N>T.id&&(q=T.id,B=y[N],y[N]=y[q],y[N].id=N,y[q]=B,y[q].id=q)},graphCenterChanged:function(T,N){v[12]=2*T/d-1,v[13]=1-2*N/f,F()},addLink:function(T,N){var q=m++,B=W(T);return B.id=q,B.pos=N,S.createLink(B),y[q]=B,k[T.id]=B,B},addNode:function(T,N){var q=g++,B=_(T);return B.id=q,B.position=N,B.node=T,O.createNode(B),C[q]=B,x[T.id]=B,B},translateRel:function(T,N){v[12]+=2*v[0]*T/d/v[0],v[13]-=2*v[5]*N/f/v[5],F()},scale:function(T,N){var q=2*N.x/d-1,B=1-2*N.y/f;return q-=v[12],B-=v[13],v[12]+=q*(1-T),v[13]+=B*(1-T),v[0]*=T,v[5]*=T,F(),E(this),v[0]},resetScale:function(){return R(),h&&(A(),F()),this},updateSize:A,init:function(T){var N={};if(l.preserveDrawingBuffer&&(N.preserveDrawingBuffer=!0),c=T,A(),R(),c.appendChild(u),h=u.getContext("experimental-webgl",N),!h){var q="Could not initialize WebGL. Seems like the browser doesn't support it.";throw window.alert(q),q}if(l.enableBlending&&(h.blendFunc(h.SRC_ALPHA,h.ONE_MINUS_SRC_ALPHA),h.enable(h.BLEND)),l.clearColor){var B=l.clearColorValue;h.clearColor(B.r,B.g,B.b,B.a),this.beginRender=function(){h.clear(h.COLOR_BUFFER_BIT)}}S.load(h),S.updateSize(d/2,f/2),O.load(h),O.updateSize(d/2,f/2),F(),typeof w=="function"&&w(u)},release:function(T){u&&T&&T.removeChild(u)},isSupported:function(){var T=window.document.createElement("canvas"),N=T&&T.getContext&&T.getContext("experimental-webgl");return N},releaseLink:function(T){m>0&&(m-=1);var N=k[T.id];delete k[T.id],S.removeLink(N);var q=N.id;if(q0&&(g-=1);var N=x[T.id];delete x[T.id],O.removeNode(N);var q=N.id;if(q0?n.insertBefore(O,n.firstChild):n.appendChild(O),O},releaseLink:function(k){var S=h[k.id];S&&(n.removeChild(S),delete h[k.id])},addNode:function(k,S){var O=d(k);if(O)return O.position=S,O.node=k,u[k.id]=O,n.appendChild(O),O},releaseNode:function(k){var S=u[k.id];S&&(n.removeChild(S),delete u[k.id])},renderNodes:function(){for(var k in u)if(u.hasOwnProperty(k)){var S=u[k];p.x=S.position.x,p.y=S.position.y,f(S,p,S.node)}},renderLinks:function(){for(var k in h)if(h.hasOwnProperty(k)){var S=h[k];b.x=S.position.from.x,b.y=S.position.from.y,C.x=S.position.to.x,C.y=S.position.to.y,m(S,b,C,S.link)}},getGraphicsRoot:function(k){return typeof k=="function"&&(s?k(s):l=k),s},getSvgRoot:function(){return s}};return e(w),w;function x(){var k=i("svg");return n=i("g").attr("buffered-rendering","dynamic"),k.appendChild(n),k}}return Mo}var Po,Ac;function Kg(){if(Ac)return Po;Ac=1;var i=Nh();Po=e();function e(){return typeof window=="undefined"?i:{on:t,off:r}}function t(n,s){window.addEventListener(n,s)}function r(n,s){window.removeEventListener(n,s)}return Po}var Ao,Lc;function Zg(){if(Lc)return Ao;Lc=1,Ao=l;var i=Mr(),e=Gh(),t=$h(),r=Kg(),n=Fa(),s=Xh(),o=Wh(),a=ja();function l(c,u){var h=30;u=u||{};var d=u.layout,f=u.graphics,g=u.container,m=u.interactive!==void 0?u.interactive:!0,v,p,b=!1,C=!0,y=!1,w=!1,x=!1,k={offsetX:0,offsetY:0,scale:1},S=i({}),O;return{run:function(ee){return b||(W(),P(),me(),T(),Ve(),b=!0),A(ee),this},reset:function(){f.resetScale(),T(),k.scale=1},pause:function(){x=!0,p.stop()},resume:function(){x=!1,p.restart()},rerender:function(){return F(),this},zoomOut:function(){return Le(!0)},zoomIn:function(){return Le(!1)},getTransform:function(){return k},moveTo:function(ee,ne){f.graphCenterChanged(k.offsetX-ee*k.scale,k.offsetY-ne*k.scale),F()},getGraphics:function(){return f},getLayout:function(){return d},dispose:function(){ys()},on:function(ee,ne){return S.on(ee,ne),this},off:function(ee,ne){return S.off(ee,ne),this}};function _(ee){return typeof m=="string"?m.indexOf(ee)>=0:typeof m=="boolean"?m:!0}function W(){g=g||window.document.body,d=d||e(c,{springLength:80,springCoeff:2e-4}),f=f||t(c,{container:g}),u.hasOwnProperty("renderLinks")||(u.renderLinks=!0),u.prerender=u.prerender||0,v=(f.inputManager||n)(c,f)}function F(){f.beginRender(),u.renderLinks&&f.renderLinks(),f.renderNodes(),f.endRender()}function R(){return y=d.step()&&!w,F(),!y}function A(ee){p||(ee!==void 0?p=s(function(){if(ee-=1,ee<0){var ne=!1;return ne}return R()},h):p=s(R,h))}function E(){x||(y=!1,p.restart())}function P(){if(typeof u.prerender=="number"&&u.prerender>0)for(var ee=0;eet(5,r=u));let{graph:n}=e,{layout:s}=e,{usePrecomputedPositions:o}=e,a,l;es(()=>{o&&(n.forEachNode(h=>{h.data.x&&s.setNodePosition(h.id,h.data.x,h.data.y)}),t(1,o=!1));let u=Cn.Graph.View.webglGraphics();u.node(function(h){return Cn.Graph.View.webglSquare(h.data.size||10,h.data.color||"#000000")}),t(4,l=Cn.Graph.View.renderer(n,{layout:s,container:a,graphics:u,renderLinks:!0,prerender:!0})),l.run()}),Dh(()=>{n.forEachLink(u=>{let h=s.getLinkPosition(u.id);u.coords=[h.from.x,h.from.y,h.to.x,h.to.y]})});function c(u){vt[u?"unshift":"push"](()=>{a=u,t(0,a)})}return i.$$set=u=>{"graph"in u&&t(2,n=u.graph),"layout"in u&&t(3,s=u.layout),"usePrecomputedPositions"in u&&t(1,o=u.usePrecomputedPositions)},i.$$.update=()=>{i.$$.dirty&48&&(l&&!r?l.pause():l&&r&&l.resume())},[a,o,n,s,l,r,c]}class e0 extends Ie{constructor(e){super(),Ne(this,e,$g,Qg,Ee,{graph:2,layout:3,usePrecomputedPositions:1})}}function M(i,e,t){return(e=function(r){var n=function(s,o){if(typeof s!="object"||!s)return s;var a=s[Symbol.toPrimitive];if(a!==void 0){var l=a.call(s,o||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(s)}(r,"string");return typeof n=="symbol"?n:n+""}(e))in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function jc(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable})),t.push.apply(t,r)}return t}function D(i){for(var e=1;e=0)continue;l[c]=o[c]}return l}(i,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);for(r=0;r=0||{}.propertyIsEnumerable.call(i,t)&&(n[t]=i[t])}return n}function hr(i,e){return e||(e=i.slice(0)),Object.freeze(Object.defineProperties(i,{raw:{value:Object.freeze(e)}}))}let Fc=class{constructor(){M(this,"browserShadowBlurConstant",1),M(this,"DPI",96),M(this,"devicePixelRatio",typeof window!="undefined"?window.devicePixelRatio:1),M(this,"perfLimitSizeTotal",2097152),M(this,"maxCacheSideLimit",4096),M(this,"minCacheSideLimit",256),M(this,"disableStyleCopyPaste",!1),M(this,"enableGLFiltering",!0),M(this,"textureSize",4096),M(this,"forceGLPutImageData",!1),M(this,"cachesBoundsOfCurve",!1),M(this,"fontPaths",{}),M(this,"NUM_FRACTION_DIGITS",4)}};const pe=new class extends Fc{constructor(i){super(),this.configure(i)}configure(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Object.assign(this,i)}addFonts(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fontPaths=D(D({},this.fontPaths),i)}removeFonts(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(i=>{delete this.fontPaths[i]})}clearFonts(){this.fontPaths={}}restoreDefaults(i){const e=new Fc,t=(i==null?void 0:i.reduce((r,n)=>(r[n]=e[n],r),{}))||e;this.configure(t)}},ar=function(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;rthis.testPrecision(t,r)),t.getExtension("WEBGL_lose_context").loseContext(),ar("log","WebGL: max texture size ".concat(this.maxTextureSize)))}isSupported(e){return!!this.maxTextureSize&&this.maxTextureSize>=e}}const i0={};let Rc;const Bt=()=>Rc||(Rc={document,window,isTouchSupported:"ontouchstart"in window||"ontouchstart"in document||window&&window.navigator&&window.navigator.maxTouchPoints>0,WebGLProbe:new n0,dispose(){},copyPasteData:i0}),sn=()=>Bt().document,Ba=()=>Bt().window,tf=()=>{var i;return Math.max((i=pe.devicePixelRatio)!==null&&i!==void 0?i:Ba().devicePixelRatio,1)},xn=new class{constructor(){M(this,"charWidthsCache",{}),M(this,"boundsOfCurveCache",{})}getFontCache(i){let{fontFamily:e,fontStyle:t,fontWeight:r}=i;e=e.toLowerCase(),this.charWidthsCache[e]||(this.charWidthsCache[e]={});const n=this.charWidthsCache[e],s="".concat(t.toLowerCase(),"_").concat((r+"").toLowerCase());return n[s]||(n[s]={}),n[s]}clearFontCache(i){(i=(i||"").toLowerCase())?this.charWidthsCache[i]&&delete this.charWidthsCache[i]:this.charWidthsCache={}}limitDimsByArea(i){const{perfLimitSizeTotal:e}=pe,t=Math.sqrt(e*i);return[Math.floor(t),Math.floor(e/t)]}},ta="6.4.2";function Si(){}const Bn=Math.PI/2,Ri=2*Math.PI,za=Math.PI/180,st=Object.freeze([1,0,0,1,0,0]),Va=16,er=.4477152502,ue="center",Ce="left",ut="top",ra="bottom",je="right",ht="none",Ya=/\r?\n/,rf="moving",is="scaling",nf="rotating",Xa="rotate",sf="skewing",Mn="resizing",of="modifyPoly",s0="modifyPath",Ni="changed",ss="scale",dt="scaleX",wt="scaleY",on="skewX",an="skewY",ze="fill",ft="stroke",Ii="modified",Rr="json",Lo="svg",$=new class{constructor(){this[Rr]=new Map,this[Lo]=new Map}has(i){return this[Rr].has(i)}getClass(i){const e=this[Rr].get(i);if(!e)throw new Ft("No class registered for ".concat(i));return e}setClass(i,e){e?this[Rr].set(e,i):(this[Rr].set(i.type,i),this[Rr].set(i.type.toLowerCase(),i))}getSVGClass(i){return this[Lo].get(i)}setSVGClass(i,e){this[Lo].set(e!=null?e:i.type.toLowerCase(),i)}},Bi=new class extends Array{remove(i){const e=this.indexOf(i);e>-1&&this.splice(e,1)}cancelAll(){const i=this.splice(0);return i.forEach(e=>e.abort()),i}cancelByCanvas(i){if(!i)return[];const e=this.filter(t=>{var r;return t.target===i||typeof t.target=="object"&&((r=t.target)===null||r===void 0?void 0:r.canvas)===i});return e.forEach(t=>t.abort()),e}cancelByTarget(i){if(!i)return[];const e=this.filter(t=>t.target===i);return e.forEach(t=>t.abort()),e}};class o0{constructor(){M(this,"__eventListeners",{})}on(e,t){if(this.__eventListeners||(this.__eventListeners={}),typeof e=="object")return Object.entries(e).forEach(r=>{let[n,s]=r;this.on(n,s)}),()=>this.off(e);if(t){const r=e;return this.__eventListeners[r]||(this.__eventListeners[r]=[]),this.__eventListeners[r].push(t),()=>this.off(r,t)}return()=>!1}once(e,t){if(typeof e=="object"){const r=[];return Object.entries(e).forEach(n=>{let[s,o]=n;r.push(this.once(s,o))}),()=>r.forEach(n=>n())}if(t){const r=this.on(e,function(){for(var n=arguments.length,s=new Array(n),o=0;o!1}_removeEventListener(e,t){if(this.__eventListeners[e])if(t){const r=this.__eventListeners[e],n=r.indexOf(t);n>-1&&r.splice(n,1)}else this.__eventListeners[e]=[]}off(e,t){if(this.__eventListeners)if(e===void 0)for(const r in this.__eventListeners)this._removeEventListener(r);else typeof e=="object"?Object.entries(e).forEach(r=>{let[n,s]=r;this._removeEventListener(n,s)}):this._removeEventListener(e,t)}fire(e,t){var r;if(!this.__eventListeners)return;const n=(r=this.__eventListeners[e])===null||r===void 0?void 0:r.concat();if(n)for(let s=0;s{const t=i.indexOf(e);return t!==-1&&i.splice(t,1),i},Zt=i=>{if(i===0)return 1;switch(Math.abs(i)/Bn){case 1:case 3:return 0;case 2:return-1}return Math.cos(i)},Jt=i=>{if(i===0)return 0;const e=i/Bn,t=Math.sign(i);switch(e){case 1:return t;case 2:return 0;case 3:return-t}return Math.sin(i)};class L{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;typeof e=="object"?(this.x=e.x,this.y=e.y):(this.x=e,this.y=t)}add(e){return new L(this.x+e.x,this.y+e.y)}addEquals(e){return this.x+=e.x,this.y+=e.y,this}scalarAdd(e){return new L(this.x+e,this.y+e)}scalarAddEquals(e){return this.x+=e,this.y+=e,this}subtract(e){return new L(this.x-e.x,this.y-e.y)}subtractEquals(e){return this.x-=e.x,this.y-=e.y,this}scalarSubtract(e){return new L(this.x-e,this.y-e)}scalarSubtractEquals(e){return this.x-=e,this.y-=e,this}multiply(e){return new L(this.x*e.x,this.y*e.y)}scalarMultiply(e){return new L(this.x*e,this.y*e)}scalarMultiplyEquals(e){return this.x*=e,this.y*=e,this}divide(e){return new L(this.x/e.x,this.y/e.y)}scalarDivide(e){return new L(this.x/e,this.y/e)}scalarDivideEquals(e){return this.x/=e,this.y/=e,this}eq(e){return this.x===e.x&&this.y===e.y}lt(e){return this.xe.x&&this.y>e.y}gte(e){return this.x>=e.x&&this.y>=e.y}lerp(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.5;return t=Math.max(Math.min(1,t),0),new L(this.x+(e.x-this.x)*t,this.y+(e.y-this.y)*t)}distanceFrom(e){const t=this.x-e.x,r=this.y-e.y;return Math.sqrt(t*t+r*r)}midPointFrom(e){return this.lerp(e)}min(e){return new L(Math.min(this.x,e.x),Math.min(this.y,e.y))}max(e){return new L(Math.max(this.x,e.x),Math.max(this.y,e.y))}toString(){return"".concat(this.x,",").concat(this.y)}setXY(e,t){return this.x=e,this.y=t,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setFromPoint(e){return this.x=e.x,this.y=e.y,this}swap(e){const t=this.x,r=this.y;this.x=e.x,this.y=e.y,e.x=t,e.y=r}clone(){return new L(this.x,this.y)}rotate(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Wa;const r=Jt(e),n=Zt(e),s=this.subtract(t);return new L(s.x*n-s.y*r,s.x*r+s.y*n).add(t)}transform(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return new L(e[0]*this.x+e[2]*this.y+(t?0:e[4]),e[1]*this.x+e[3]*this.y+(t?0:e[5]))}}const Wa=new L(0,0),Ti=i=>!!i&&Array.isArray(i._objects);function af(i){class e extends i{constructor(){super(...arguments),M(this,"_objects",[])}_onObjectAdded(r){}_onObjectRemoved(r){}_onStackOrderChanged(r){}add(){for(var r=arguments.length,n=new Array(r),s=0;sthis._onObjectAdded(a)),o}insertAt(r){for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;othis._onObjectAdded(a)),this._objects.length}remove(){const r=this._objects,n=[];for(var s=arguments.length,o=new Array(s),a=0;a{const c=r.indexOf(l);c!==-1&&(r.splice(c,1),n.push(l),this._onObjectRemoved(l))}),n}forEachObject(r){this.getObjects().forEach((n,s,o)=>r(n,s,o))}getObjects(){for(var r=arguments.length,n=new Array(r),s=0;so.isType(...n))}item(r){return this._objects[r]}isEmpty(){return this._objects.length===0}size(){return this._objects.length}contains(r,n){return!!this._objects.includes(r)||!!n&&this._objects.some(s=>s instanceof e&&s.contains(r,!0))}complexity(){return this._objects.reduce((r,n)=>r+=n.complexity?n.complexity():0,0)}sendObjectToBack(r){return!(!r||r===this._objects[0])&&(Br(this._objects,r),this._objects.unshift(r),this._onStackOrderChanged(r),!0)}bringObjectToFront(r){return!(!r||r===this._objects[this._objects.length-1])&&(Br(this._objects,r),this._objects.push(r),this._onStackOrderChanged(r),!0)}sendObjectBackwards(r,n){if(!r)return!1;const s=this._objects.indexOf(r);if(s!==0){const o=this.findNewLowerIndex(r,s,n);return Br(this._objects,r),this._objects.splice(o,0,r),this._onStackOrderChanged(r),!0}return!1}bringObjectForward(r,n){if(!r)return!1;const s=this._objects.indexOf(r);if(s!==this._objects.length-1){const o=this.findNewUpperIndex(r,s,n);return Br(this._objects,r),this._objects.splice(o,0,r),this._onStackOrderChanged(r),!0}return!1}moveObjectTo(r,n){return r!==this._objects[n]&&(Br(this._objects,r),this._objects.splice(n,0,r),this._onStackOrderChanged(r),!0)}findNewLowerIndex(r,n,s){let o;if(s){o=n;for(let a=n-1;a>=0;--a)if(r.isOverlapping(this._objects[a])){o=a;break}}else o=n-1;return o}findNewUpperIndex(r,n,s){let o;if(s){o=n;for(let a=n+1;a1&&arguments[1]!==void 0?arguments[1]:{};const c=[],u=new L(n,s),h=u.add(new L(o,a));for(let d=this._objects.length-1;d>=0;d--){const f=this._objects[d];f.selectable&&f.visible&&(l&&f.intersectsWithRect(u,h)||f.isContainedWithinRect(u,h)||l&&f.containsPoint(u)||l&&f.containsPoint(h))&&c.push(f)}return c}}return e}class lf extends o0{_setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};for(const t in e)this.set(t,e[t])}_setObject(e){for(const t in e)this._set(t,e[t])}set(e,t){return typeof e=="object"?this._setObject(e):this._set(e,t),this}_set(e,t){this[e]=t}toggle(e){const t=this.get(e);return typeof t=="boolean"&&this.set(e,!t),this}get(e){return this[e]}}function Ei(i){return Ba().requestAnimationFrame(i)}function a0(i){return Ba().cancelAnimationFrame(i)}let l0=0;const lr=()=>l0++,Xe=()=>{const i=sn().createElement("canvas");if(!i||i.getContext===void 0)throw new Ft("Failed to create `canvas` element");return i},c0=()=>sn().createElement("img"),cf=(i,e,t)=>i.toDataURL("image/".concat(e),t),Fe=i=>i*za,kr=i=>i/za,u0=i=>i.every((e,t)=>e===st[t]),lt=(i,e,t)=>new L(i).transform(e,t),Tt=i=>{const e=1/(i[0]*i[3]-i[1]*i[2]),t=[e*i[3],-e*i[1],-e*i[2],e*i[0],0,0],{x:r,y:n}=new L(i[4],i[5]).transform(t,!0);return t[4]=-r,t[5]=-n,t},Ye=(i,e,t)=>[i[0]*e[0]+i[2]*e[1],i[1]*e[0]+i[3]*e[1],i[0]*e[2]+i[2]*e[3],i[1]*e[2]+i[3]*e[3],t?0:i[0]*e[4]+i[2]*e[5]+i[4],t?0:i[1]*e[4]+i[3]*e[5]+i[5]],Ga=(i,e)=>i.reduceRight((t,r)=>r&&t?Ye(r,t,e):r||t,void 0)||st.concat(),uf=i=>{let[e,t]=i;return Math.atan2(t,e)},zi=i=>{const e=uf(i),t=Math.pow(i[0],2)+Math.pow(i[1],2),r=Math.sqrt(t),n=(i[0]*i[3]-i[2]*i[1])/r,s=Math.atan2(i[0]*i[2]+i[1]*i[3],t);return{angle:kr(e),scaleX:r,scaleY:n,skewX:kr(s),skewY:0,translateX:i[4]||0,translateY:i[5]||0}},zn=function(i){return[1,0,0,1,i,arguments.length>1&&arguments[1]!==void 0?arguments[1]:0]};function Vn(){let{angle:i=0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{x:e=0,y:t=0}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Fe(i),n=Zt(r),s=Jt(r);return[n,s,-s,n,e?e-(n*e-s*t):0,t?t-(s*e+n*t):0]}const Ha=function(i){return[i,0,0,arguments.length>1&&arguments[1]!==void 0?arguments[1]:i,0,0]},hf=i=>Math.tan(Fe(i)),ff=i=>[1,0,hf(i),1,0,0],df=i=>[1,hf(i),0,1,0,0],os=i=>{let{scaleX:e=1,scaleY:t=1,flipX:r=!1,flipY:n=!1,skewX:s=0,skewY:o=0}=i,a=Ha(r?-e:e,n?-t:t);return s&&(a=Ye(a,ff(s),!0)),o&&(a=Ye(a,df(o),!0)),a},h0=i=>{const{translateX:e=0,translateY:t=0,angle:r=0}=i;let n=zn(e,t);r&&(n=Ye(n,Vn({angle:r})));const s=os(i);return u0(s)||(n=Ye(n,s)),n},Oi=function(i){let{signal:e,crossOrigin:t=null}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(r,n){if(e&&e.aborted)return n(new t0("loadImage"));const s=c0();let o;e&&(o=function(l){s.src="",n(l)},e.addEventListener("abort",o,{once:!0}));const a=function(){s.onload=s.onerror=null,o&&(e==null||e.removeEventListener("abort",o)),r(s)};i?(s.onload=a,s.onerror=function(){o&&(e==null||e.removeEventListener("abort",o)),n(new Ft("Error loading ".concat(s.src)))},t&&(s.crossOrigin=t),s.src=i):a()})},Pn=function(i){let{signal:e,reviver:t=Si}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise((r,n)=>{const s=[];e&&e.addEventListener("abort",n,{once:!0}),Promise.all(i.map(o=>$.getClass(o.type).fromObject(o,{signal:e}).then(a=>(t(o,a),s.push(a),a)))).then(r).catch(o=>{s.forEach(a=>{a.dispose&&a.dispose()}),n(o)}).finally(()=>{e&&e.removeEventListener("abort",n)})})},as=function(i){let{signal:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise((t,r)=>{const n=[];e&&e.addEventListener("abort",r,{once:!0});const s=Object.values(i).map(a=>a&&a.type&&$.has(a.type)?Pn([a],{signal:e}).then(l=>{let[c]=l;return n.push(c),c}):a),o=Object.keys(i);Promise.all(s).then(a=>a.reduce((l,c,u)=>(l[o[u]]=c,l),{})).then(t).catch(a=>{n.forEach(l=>{l.dispose&&l.dispose()}),r(a)}).finally(()=>{e&&e.removeEventListener("abort",r)})})},ln=function(i){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:[]).reduce((e,t)=>(t in i&&(e[t]=i[t]),e),{})},qa=(i,e)=>Object.keys(i).reduce((t,r)=>(e(i[r],r,i)&&(t[r]=i[r]),t),{}),Nc={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#0FF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000",blanchedalmond:"#FFEBCD",blue:"#00F",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#0FF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#F0F",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#0F0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#F0F",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#639",red:"#F00",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFF",whitesmoke:"#F5F5F5",yellow:"#FF0",yellowgreen:"#9ACD32"},jo=(i,e,t)=>(t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+6*(e-i)*t:t<.5?e:t<2/3?i+(e-i)*(2/3-t)*6:i),Ic=(i,e,t,r)=>{i/=255,e/=255,t/=255;const n=Math.max(i,e,t),s=Math.min(i,e,t);let o,a;const l=(n+s)/2;if(n===s)o=a=0;else{const c=n-s;switch(a=l>.5?c/(2-n-s):c/(n+s),n){case i:o=(e-t)/c+(e0&&arguments[0]!==void 0?arguments[0]:"1";return parseFloat(i)/(i.endsWith("%")?100:1)},Qn=i=>Math.min(Math.round(i),255).toString(16).toUpperCase().padStart(2,"0"),zc=i=>{let[e,t,r,n=1]=i;const s=Math.round(.3*e+.59*t+.11*r);return[s,s,s,n]};class ke{constructor(e){if(M(this,"isUnrecognised",!1),e)if(e instanceof ke)this.setSource([...e._source]);else if(Array.isArray(e)){const[t,r,n,s=1]=e;this.setSource([t,r,n,s])}else this.setSource(this._tryParsingColor(e));else this.setSource([0,0,0,1])}_tryParsingColor(e){return e in Nc&&(e=Nc[e]),e==="transparent"?[255,255,255,0]:ke.sourceFromHex(e)||ke.sourceFromRgb(e)||ke.sourceFromHsl(e)||(this.isUnrecognised=!0)&&[0,0,0,1]}getSource(){return this._source}setSource(e){this._source=e}toRgb(){const[e,t,r]=this.getSource();return"rgb(".concat(e,",").concat(t,",").concat(r,")")}toRgba(){return"rgba(".concat(this.getSource().join(","),")")}toHsl(){const[e,t,r]=Ic(...this.getSource());return"hsl(".concat(e,",").concat(t,"%,").concat(r,"%)")}toHsla(){const[e,t,r,n]=Ic(...this.getSource());return"hsla(".concat(e,",").concat(t,"%,").concat(r,"%,").concat(n,")")}toHex(){return this.toHexa().slice(0,6)}toHexa(){const[e,t,r,n]=this.getSource();return"".concat(Qn(e)).concat(Qn(t)).concat(Qn(r)).concat(Qn(Math.round(255*n)))}getAlpha(){return this.getSource()[3]}setAlpha(e){return this._source[3]=e,this}toGrayscale(){return this.setSource(zc(this.getSource())),this}toBlackWhite(e){const[t,,,r]=zc(this.getSource()),n=t<(e||127)?0:255;return this.setSource([n,n,n,r]),this}overlayWith(e){e instanceof ke||(e=new ke(e));const t=this.getSource(),r=e.getSource(),[n,s,o]=t.map((a,l)=>Math.round(.5*a+.5*r[l]));return this.setSource([n,s,o,t[3]]),this}static fromRgb(e){return ke.fromRgba(e)}static fromRgba(e){return new ke(ke.sourceFromRgb(e))}static sourceFromRgb(e){const t=e.match(/^rgba?\(\s*(\d{0,3}(?:\.\d+)?%?)\s*[\s|,]\s*(\d{0,3}(?:\.\d+)?%?)\s*[\s|,]\s*(\d{0,3}(?:\.\d+)?%?)\s*(?:\s*[,/]\s*(\d{0,3}(?:\.\d+)?%?)\s*)?\)$/i);if(t){const[r,n,s]=t.slice(1,4).map(o=>{const a=parseFloat(o);return o.endsWith("%")?Math.round(2.55*a):a});return[r,n,s,Bc(t[4])]}}static fromHsl(e){return ke.fromHsla(e)}static fromHsla(e){return new ke(ke.sourceFromHsl(e))}static sourceFromHsl(e){const t=e.match(/^hsla?\(\s*([+-]?\d{0,3}(?:\.\d+)?(?:deg|turn|rad)?)\s*[\s|,]\s*(\d{0,3}(?:\.\d+)?%?)\s*[\s|,]\s*(\d{0,3}(?:\.\d+)?%?)\s*(?:\s*[,/]\s*(\d*(?:\.\d+)?%?)\s*)?\)$/i);if(!t)return;const r=(ke.parseAngletoDegrees(t[1])%360+360)%360/360,n=parseFloat(t[2])/100,s=parseFloat(t[3])/100;let o,a,l;if(n===0)o=a=l=s;else{const c=s<=.5?s*(n+1):s+n-s*n,u=2*s-c;o=jo(u,c,r+1/3),a=jo(u,c,r),l=jo(u,c,r-1/3)}return[Math.round(255*o),Math.round(255*a),Math.round(255*l),Bc(t[4])]}static fromHex(e){return new ke(ke.sourceFromHex(e))}static sourceFromHex(e){if(e.match(/^#?(([0-9a-f]){3,4}|([0-9a-f]{2}){3,4})$/i)){const t=e.slice(e.indexOf("#")+1);let r;r=t.length<=4?t.split("").map(l=>l+l):t.match(/.{2}/g);const[n,s,o,a=255]=r.map(l=>parseInt(l,16));return[n,s,o,a/255]}}static parseAngletoDegrees(e){const t=e.toLowerCase(),r=parseFloat(t);return t.includes("rad")?kr(r):t.includes("turn")?360*r:r}}const Ae=(i,e)=>parseFloat(Number(i).toFixed(e)),Hr=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Va;const t=/\D{0,2}$/.exec(i),r=parseFloat(i),n=pe.DPI;switch(t==null?void 0:t[0]){case"mm":return r*n/25.4;case"cm":return r*n/2.54;case"in":return r*n;case"pt":return r*n/72;case"pc":return r*n/72*12;case"em":return r*e;default:return r}},f0=i=>{const[e,t]=i.trim().split(" "),[r,n]=(s=e)&&s!==ht?[s.slice(1,4),s.slice(5,8)]:s===ht?[s,s]:["Mid","Mid"];var s;return{meetOrSlice:t||"meet",alignX:r,alignY:n}},Vi=i=>"matrix("+i.map(e=>Ae(e,pe.NUM_FRACTION_DIGITS)).join(" ")+")",An=function(i,e){let t,r,n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(e)if(e.toLive)t="url(#SVGID_".concat(e.id,")");else{const s=new ke(e),o=s.getAlpha();t=s.toRgb(),o!==1&&(r=o.toString())}else t="none";return n?"".concat(i,": ").concat(t,"; ").concat(r?"".concat(i,"-opacity: ").concat(r,"; "):""):"".concat(i,'="').concat(t,'" ').concat(r?"".concat(i,'-opacity="').concat(r,'" '):"")},yt=i=>!!i&&i.toLive!==void 0,Vc=i=>!!i&&typeof i.toObject=="function",Yc=i=>!!i&&i.offsetX!==void 0&&"source"in i,gf=i=>!!i&&typeof i._renderText=="function",vr=i=>!!i&&"multiSelectionStacking"in i;function mf(i){const e=i&&St(i);let t=0,r=0;if(!i||!e)return{left:t,top:r};let n=i;const s=e.documentElement,o=e.body||{scrollLeft:0,scrollTop:0};for(;n&&(n.parentNode||n.host)&&(n=n.parentNode||n.host,n===e?(t=o.scrollLeft||s.scrollLeft||0,r=o.scrollTop||s.scrollTop||0):(t+=n.scrollLeft||0,r+=n.scrollTop||0),n.nodeType!==1||n.style.position!=="fixed"););return{left:t,top:r}}const St=i=>i.ownerDocument||null,pf=i=>{var e;return((e=i.ownerDocument)===null||e===void 0?void 0:e.defaultView)||null},vf=function(i,e,t){let{width:r,height:n}=t,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;i.width=r,i.height=n,s>1&&(i.setAttribute("width",(r*s).toString()),i.setAttribute("height",(n*s).toString()),e.scale(s,s))},na=(i,e)=>{let{width:t,height:r}=e;t&&(i.style.width=typeof t=="number"?"".concat(t,"px"):t),r&&(i.style.height=typeof r=="number"?"".concat(r,"px"):r)};function Xc(i){return i.onselectstart!==void 0&&(i.onselectstart=()=>!1),i.style.userSelect=ht,i}class _f{constructor(e){M(this,"_originalCanvasStyle",void 0),M(this,"lower",void 0);const t=this.createLowerCanvas(e);this.lower={el:t,ctx:t.getContext("2d")}}createLowerCanvas(e){const t=(r=e)&&r.getContext!==void 0?e:e&&sn().getElementById(e)||Xe();var r;if(t.hasAttribute("data-fabric"))throw new Ft("Trying to initialize a canvas that has already been initialized. Did you forget to dispose the canvas?");return this._originalCanvasStyle=t.style.cssText,t.setAttribute("data-fabric","main"),t.classList.add("lower-canvas"),t}cleanupDOM(e){let{width:t,height:r}=e;const{el:n}=this.lower;n.classList.remove("lower-canvas"),n.removeAttribute("data-fabric"),n.setAttribute("width","".concat(t)),n.setAttribute("height","".concat(r)),n.style.cssText=this._originalCanvasStyle||"",this._originalCanvasStyle=void 0}setDimensions(e,t){const{el:r,ctx:n}=this.lower;vf(r,n,e,t)}setCSSDimensions(e){na(this.lower.el,e)}calcOffset(){return function(e){var t;const r=e&&St(e),n={left:0,top:0};if(!r)return n;const s=((t=pf(e))===null||t===void 0?void 0:t.getComputedStyle(e,null))||{};n.left+=parseInt(s.borderLeftWidth,10)||0,n.top+=parseInt(s.borderTopWidth,10)||0,n.left+=parseInt(s.paddingLeft,10)||0,n.top+=parseInt(s.paddingTop,10)||0;let o={left:0,top:0};const a=r.documentElement;e.getBoundingClientRect!==void 0&&(o=e.getBoundingClientRect());const l=mf(e);return{left:o.left+l.left-(a.clientLeft||0)+n.left,top:o.top+l.top-(a.clientTop||0)+n.top}}(this.lower.el)}dispose(){Bt().dispose(this.lower.el),delete this.lower}}const d0={backgroundVpt:!0,backgroundColor:"",overlayVpt:!0,overlayColor:"",includeDefaultValues:!0,svgViewportTransformation:!0,renderOnAddRemove:!0,skipOffscreen:!0,enableRetinaScaling:!0,imageSmoothingEnabled:!0,controlsAboveOverlay:!1,allowTouchScrolling:!1,viewportTransform:[...st]};class Yn extends af(lf){get lowerCanvasEl(){var e;return(e=this.elements.lower)===null||e===void 0?void 0:e.el}get contextContainer(){var e;return(e=this.elements.lower)===null||e===void 0?void 0:e.ctx}static getDefaults(){return Yn.ownDefaults}constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Object.assign(this,this.constructor.getDefaults()),this.set(t),this.initElements(e),this._setDimensionsImpl({width:this.width||this.elements.lower.el.width||0,height:this.height||this.elements.lower.el.height||0}),this.skipControlsDrawing=!1,this.viewportTransform=[...this.viewportTransform],this.calcViewportBoundaries()}initElements(e){this.elements=new _f(e)}add(){const e=super.add(...arguments);return arguments.length>0&&this.renderOnAddRemove&&this.requestRenderAll(),e}insertAt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&this.renderOnAddRemove&&this.requestRenderAll(),s}remove(){const e=super.remove(...arguments);return e.length>0&&this.renderOnAddRemove&&this.requestRenderAll(),e}_onObjectAdded(e){e.canvas&&e.canvas!==this&&(ar("warn",`Canvas is trying to add an object that belongs to a different canvas. -Resulting to default behavior: removing object from previous canvas and adding to new canvas`),e.canvas.remove(e)),e._set("canvas",this),e.setCoords(),this.fire("object:added",{target:e}),e.fire("added",{target:this})}_onObjectRemoved(e){e._set("canvas",void 0),this.fire("object:removed",{target:e}),e.fire("removed",{target:this})}_onStackOrderChanged(){this.renderOnAddRemove&&this.requestRenderAll()}getRetinaScaling(){return this.enableRetinaScaling?tf():1}calcOffset(){return this._offset=this.elements.calcOffset()}getWidth(){return this.width}getHeight(){return this.height}setWidth(e,t){return this.setDimensions({width:e},t)}setHeight(e,t){return this.setDimensions({height:e},t)}_setDimensionsImpl(e){let{cssOnly:t=!1,backstoreOnly:r=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!t){const n=D({width:this.width,height:this.height},e);this.elements.setDimensions(n,this.getRetinaScaling()),this.hasLostContext=!0,this.width=n.width,this.height=n.height}r||this.elements.setCSSDimensions(e),this.calcOffset()}setDimensions(e,t){this._setDimensionsImpl(e,t),t&&t.cssOnly||this.requestRenderAll()}getZoom(){return this.viewportTransform[0]}setViewportTransform(e){this.viewportTransform=e,this.calcViewportBoundaries(),this.renderOnAddRemove&&this.requestRenderAll()}zoomToPoint(e,t){const r=e,n=[...this.viewportTransform],s=lt(e,Tt(n));n[0]=t,n[3]=t;const o=lt(s,n);n[4]+=r.x-o.x,n[5]+=r.y-o.y,this.setViewportTransform(n)}setZoom(e){this.zoomToPoint(new L(0,0),e)}absolutePan(e){const t=[...this.viewportTransform];return t[4]=-e.x,t[5]=-e.y,this.setViewportTransform(t)}relativePan(e){return this.absolutePan(new L(-e.x-this.viewportTransform[4],-e.y-this.viewportTransform[5]))}getElement(){return this.elements.lower.el}clearContext(e){e.clearRect(0,0,this.width,this.height)}getContext(){return this.elements.lower.ctx}clear(){this.remove(...this.getObjects()),this.backgroundImage=void 0,this.overlayImage=void 0,this.backgroundColor="",this.overlayColor="",this.clearContext(this.getContext()),this.fire("canvas:cleared"),this.renderOnAddRemove&&this.requestRenderAll()}renderAll(){this.cancelRequestedRender(),this.destroyed||this.renderCanvas(this.getContext(),this._objects)}renderAndReset(){this.nextRenderHandle=0,this.renderAll()}requestRenderAll(){this.nextRenderHandle||this.disposed||this.destroyed||(this.nextRenderHandle=Ei(()=>this.renderAndReset()))}calcViewportBoundaries(){const e=this.width,t=this.height,r=Tt(this.viewportTransform),n=lt({x:0,y:0},r),s=lt({x:e,y:t},r),o=n.min(s),a=n.max(s);return this.vptCoords={tl:o,tr:new L(a.x,o.y),bl:new L(o.x,a.y),br:a}}cancelRequestedRender(){this.nextRenderHandle&&(a0(this.nextRenderHandle),this.nextRenderHandle=0)}drawControls(e){}renderCanvas(e,t){if(this.destroyed)return;const r=this.viewportTransform,n=this.clipPath;this.calcViewportBoundaries(),this.clearContext(e),e.imageSmoothingEnabled=this.imageSmoothingEnabled,e.patternQuality="best",this.fire("before:render",{ctx:e}),this._renderBackground(e),e.save(),e.transform(r[0],r[1],r[2],r[3],r[4],r[5]),this._renderObjects(e,t),e.restore(),this.controlsAboveOverlay||this.skipControlsDrawing||this.drawControls(e),n&&(n._set("canvas",this),n.shouldCache(),n._transformDone=!0,n.renderCache({forClipping:!0}),this.drawClipPathOnCanvas(e,n)),this._renderOverlay(e),this.controlsAboveOverlay&&!this.skipControlsDrawing&&this.drawControls(e),this.fire("after:render",{ctx:e}),this.__cleanupTask&&(this.__cleanupTask(),this.__cleanupTask=void 0)}drawClipPathOnCanvas(e,t){const r=this.viewportTransform;e.save(),e.transform(...r),e.globalCompositeOperation="destination-in",t.transform(e),e.scale(1/t.zoomX,1/t.zoomY),e.drawImage(t._cacheCanvas,-t.cacheTranslationX,-t.cacheTranslationY),e.restore()}_renderObjects(e,t){for(let r=0,n=t.length;r!s.excludeFromExport).map(s=>this._toObject(s,e,t))},this.__serializeBgOverlay(e,t)),n?{clipPath:n}:null)}_toObject(e,t,r){let n;this.includeDefaultValues||(n=e.includeDefaultValues,e.includeDefaultValues=!1);const s=e[t](r);return this.includeDefaultValues||(e.includeDefaultValues=!!n),s}__serializeBgOverlay(e,t){const r={},n=this.backgroundImage,s=this.overlayImage,o=this.backgroundColor,a=this.overlayColor;return yt(o)?o.excludeFromExport||(r.background=o.toObject(t)):o&&(r.background=o),yt(a)?a.excludeFromExport||(r.overlay=a.toObject(t)):a&&(r.overlay=a),n&&!n.excludeFromExport&&(r.backgroundImage=this._toObject(n,e,t)),s&&!s.excludeFromExport&&(r.overlayImage=this._toObject(s,e,t)),r}toSVG(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;e.reviver=t;const r=[];return this._setSVGPreamble(r,e),this._setSVGHeader(r,e),this.clipPath&&r.push(' -`)),this._setSVGBgOverlayColor(r,"background"),this._setSVGBgOverlayImage(r,"backgroundImage",t),this._setSVGObjects(r,t),this.clipPath&&r.push(` -`),this._setSVGBgOverlayColor(r,"overlay"),this._setSVGBgOverlayImage(r,"overlayImage",t),r.push(""),r.join("")}_setSVGPreamble(e,t){t.suppressPreamble||e.push(' +var CA=Object.defineProperty,kA=Object.defineProperties;var EA=Object.getOwnPropertyDescriptors;var gu=Object.getOwnPropertySymbols;var cb=Object.prototype.hasOwnProperty,db=Object.prototype.propertyIsEnumerable;var ub=r=>{throw TypeError(r)},Ci=Math.pow,Zm=(r,e,t)=>e in r?CA(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ui=(r,e)=>{for(var t in e||(e={}))cb.call(e,t)&&Zm(r,t,e[t]);if(gu)for(var t of gu(e))db.call(e,t)&&Zm(r,t,e[t]);return r},fn=(r,e)=>kA(r,EA(e));var Km=(r,e)=>{var t={};for(var i in r)cb.call(r,i)&&e.indexOf(i)<0&&(t[i]=r[i]);if(r!=null&&gu)for(var i of gu(r))e.indexOf(i)<0&&db.call(r,i)&&(t[i]=r[i]);return t};var Jm=(r,e,t)=>Zm(r,typeof e!="symbol"?e+"":e,t),hb=(r,e,t)=>e.has(r)||ub("Cannot "+t);var mn=(r,e,t)=>(hb(r,e,"read from private field"),t?t.call(r):e.get(r)),vu=(r,e,t)=>e.has(r)?ub("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),_u=(r,e,t,i)=>(hb(r,e,"write to private field"),i?i.call(r,t):e.set(r,t),t);var le=(r,e,t)=>new Promise((i,n)=>{var s=l=>{try{a(t.next(l))}catch(c){n(c)}},o=l=>{try{a(t.throw(l))}catch(c){n(c)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(s,o);a((t=t.apply(r,e)).next())});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(n){if(n.ep)return;n.ep=!0;const s=t(n);fetch(n.href,s)}})();function Pt(){}const q0=r=>r;function vt(r,e){for(const t in e)r[t]=e[t];return r}function Q2(r){return r()}function fb(){return Object.create(null)}function ar(r){r.forEach(Q2)}function Zr(r){return typeof r=="function"}function Oi(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function AA(r){return Object.keys(r).length===0}function OA(r,...e){if(r==null){for(const i of e)i(void 0);return Pt}const t=r.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Hg(r,e,t){r.$$.on_destroy.push(OA(e,t))}function Cr(r,e,t,i){if(r){const n=$2(r,e,t,i);return r[0](n)}}function $2(r,e,t,i){return r[1]&&i?vt(t.ctx.slice(),r[1](i(e))):t.ctx}function kr(r,e,t,i){if(r[2]&&i){const n=r[2](i(t));if(e.dirty===void 0)return n;if(typeof n=="object"){const s=[],o=Math.max(e.dirty.length,n.length);for(let a=0;a32){const e=[],t=r.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),J0=eS?r=>requestAnimationFrame(r):Pt;const dl=new Set;function tS(r){dl.forEach(e=>{e.c(r)||(dl.delete(e),e.f())}),dl.size!==0&&J0(tS)}function Q0(r){let e;return dl.size===0&&J0(tS),{promise:new Promise(t=>{dl.add(e={c:r,f:t})}),abort(){dl.delete(e)}}}function Ze(r,e){r.appendChild(e)}function iS(r){if(!r)return document;const e=r.getRootNode?r.getRootNode():r.ownerDocument;return e&&e.host?e:r.ownerDocument}function IA(r){const e=ai("style");return e.textContent="/* empty */",LA(iS(r),e),e.sheet}function LA(r,e){return Ze(r.head||r,e),e.sheet}function Me(r,e,t){r.insertBefore(e,t||null)}function Le(r){r.parentNode&&r.parentNode.removeChild(r)}function rS(r,e){for(let t=0;tr.removeEventListener(e,t,i)}function ae(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}const PA=["width","height"];function Os(r,e){const t=Object.getOwnPropertyDescriptors(r.__proto__);for(const i in e)e[i]==null?r.removeAttribute(i):i==="style"?r.style.cssText=e[i]:i==="__value"?r.value=r[i]=e[i]:t[i]&&t[i].set&&PA.indexOf(i)===-1?r[i]=e[i]:ae(r,i,e[i])}function di(r,e){for(const t in e)ae(r,t,e[t])}function DA(r,e){Object.keys(e).forEach(t=>{MA(r,t,e[t])})}function MA(r,e,t){const i=e.toLowerCase();i in r?r[i]=typeof r[i]=="boolean"&&t===""?!0:t:e in r?r[e]=typeof r[e]=="boolean"&&t===""?!0:t:ae(r,e,t)}function Sl(r){return/-/.test(r)?DA:Os}function RA(r){return Array.from(r.childNodes)}function Xt(r,e){e=""+e,r.data!==e&&(r.data=e)}function Xg(r,e){r.value=e==null?"":e}function pb(r,e,t,i){r.style.setProperty(e,t,"")}function bu(r,e,t){for(let i=0;i>>0}function zA(r,e){const t={stylesheet:IA(e),rules:{}};return Sh.set(r,t),t}function Ch(r,e,t,i,n,s,o,a=0){const l=16.666/i;let c=`{ +`;for(let g=0;g<=1;g+=l){const v=e+(t-e)*s(g);c+=g*100+`%{${o(v,1-v)}} +`}const d=c+`100% {${o(t,1-t)}} +}`,u=`__svelte_${NA(d)}_${a}`,h=iS(r),{stylesheet:f,rules:m}=Sh.get(h)||zA(h,r);m[u]||(m[u]=!0,f.insertRule(`@keyframes ${u} ${d}`,f.cssRules.length));const p=r.style.animation||"";return r.style.animation=`${p?`${p}, `:""}${u} ${i}ms linear ${n}ms 1 both`,Th+=1,u}function kh(r,e){const t=(r.style.animation||"").split(", "),i=t.filter(e?s=>s.indexOf(e)<0:s=>s.indexOf("__svelte")===-1),n=t.length-i.length;n&&(r.style.animation=i.join(", "),Th-=n,Th||BA())}function BA(){J0(()=>{Th||(Sh.forEach(r=>{const{ownerNode:e}=r.stylesheet;e&&Le(e)}),Sh.clear())})}let Zc;function zc(r){Zc=r}function ud(){if(!Zc)throw new Error("Function called outside component initialization");return Zc}function uf(r){ud().$$.on_mount.push(r)}function sS(r){ud().$$.on_destroy.push(r)}function oS(){const r=ud();return(e,t,{cancelable:i=!1}={})=>{const n=r.$$.callbacks[e];if(n){const s=nS(e,t,{cancelable:i});return n.slice().forEach(o=>{o.call(r,s)}),!s.defaultPrevented}return!0}}function Wg(r,e){return ud().$$.context.set(r,e),e}function Gn(r){return ud().$$.context.get(r)}function ke(r,e){const t=r.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const rl=[],en=[];let ul=[];const Yg=[],jA=Promise.resolve();let qg=!1;function GA(){qg||(qg=!0,jA.then(aS))}function is(r){ul.push(r)}function hd(r){Yg.push(r)}const Qm=new Set;let Ga=0;function aS(){if(Ga!==0)return;const r=Zc;do{try{for(;Gar.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),ul=e}let mc;function $0(){return mc||(mc=Promise.resolve(),mc.then(()=>{mc=null})),mc}function ra(r,e,t){r.dispatchEvent(nS(`${e?"intro":"outro"}${t}`))}const lh=new Set;let Kn;function Dr(){Kn={r:0,c:[],p:Kn}}function Mr(){Kn.r||ar(Kn.c),Kn=Kn.p}function $e(r,e){r&&r.i&&(lh.delete(r),r.i(e))}function st(r,e,t,i){if(r&&r.o){if(lh.has(r))return;lh.add(r),Kn.c.push(()=>{lh.delete(r),i&&(t&&r.d(1),i())}),r.o(e)}else i&&i()}const ev={duration:0};function lS(r,e,t){const i={direction:"in"};let n=e(r,t,i),s=!1,o,a,l=0;function c(){o&&kh(r,o)}function d(){const{delay:h=0,duration:f=300,easing:m=q0,tick:p=Pt,css:g}=n||ev;g&&(o=Ch(r,0,1,f,h,m,g,l++)),p(0,1);const v=K0()+h,b=v+f;a&&a.abort(),s=!0,is(()=>ra(r,!0,"start")),a=Q0(S=>{if(s){if(S>=b)return p(1,0),ra(r,!0,"end"),c(),s=!1;if(S>=v){const _=m((S-v)/f);p(_,1-_)}}return s})}let u=!1;return{start(){u||(u=!0,kh(r),Zr(n)?(n=n(i),$0().then(d)):d())},invalidate(){u=!1},end(){s&&(c(),s=!1)}}}function cS(r,e,t){const i={direction:"out"};let n=e(r,t,i),s=!0,o;const a=Kn;a.r+=1;let l;function c(){const{delay:d=0,duration:u=300,easing:h=q0,tick:f=Pt,css:m}=n||ev;m&&(o=Ch(r,1,0,u,d,h,m));const p=K0()+d,g=p+u;is(()=>ra(r,!1,"start")),"inert"in r&&(l=r.inert,r.inert=!0),Q0(v=>{if(s){if(v>=g)return f(0,1),ra(r,!1,"end"),--a.r||ar(a.c),!1;if(v>=p){const b=h((v-p)/u);f(1-b,b)}}return s})}return Zr(n)?$0().then(()=>{n=n(i),c()}):c(),{end(d){d&&"inert"in r&&(r.inert=l),d&&n.tick&&n.tick(1,0),s&&(o&&kh(r,o),s=!1)}}}function vb(r,e,t,i){let s=e(r,t,{direction:"both"}),o=i?0:1,a=null,l=null,c=null,d;function u(){c&&kh(r,c)}function h(m,p){const g=m.b-o;return p*=Math.abs(g),{a:o,b:m.b,d:g,duration:p,start:m.start,end:m.start+p,group:m.group}}function f(m){const{delay:p=0,duration:g=300,easing:v=q0,tick:b=Pt,css:S}=s||ev,_={start:K0()+p,b:m};m||(_.group=Kn,Kn.r+=1),"inert"in r&&(m?d!==void 0&&(r.inert=d):(d=r.inert,r.inert=!0)),a||l?l=_:(S&&(u(),c=Ch(r,o,m,g,p,v,S)),m&&b(0,1),a=h(_,g),is(()=>ra(r,m,"start")),Q0(x=>{if(l&&x>l.start&&(a=h(l,g),l=null,ra(r,a.b,"start"),S&&(u(),c=Ch(r,o,a.b,a.duration,0,v,s.css))),a){if(x>=a.end)b(o=a.b,1-o),ra(r,a.b,"end"),l||(a.b?u():--a.group.r||ar(a.group.c)),a=null;else if(x>=a.start){const I=x-a.start;o=a.a+a.d*v(I/a.duration),b(o,1-o)}}return!!(a||l)}))}return{run(m){Zr(s)?$0().then(()=>{s=s({direction:m?"in":"out"}),f(m)}):f(m)},end(){u(),a=l=null}}}function Eh(r){return(r==null?void 0:r.length)!==void 0?r:Array.from(r)}function fi(r,e){const t={},i={},n={$$scope:1};let s=r.length;for(;s--;){const o=r[s],a=e[s];if(a){for(const l in o)l in a||(i[l]=1);for(const l in a)n[l]||(t[l]=a[l],n[l]=1);r[s]=a}else for(const l in o)n[l]=1}for(const o in i)o in t||(t[o]=void 0);return t}function ma(r){return typeof r=="object"&&r!==null?r:{}}function fd(r,e,t){const i=r.$$.props[e];i!==void 0&&(r.$$.bound[i]=t,t(r.$$.ctx[i]))}function wi(r){r&&r.c()}function pi(r,e,t){const{fragment:i,after_update:n}=r.$$;i&&i.m(e,t),is(()=>{const s=r.$$.on_mount.map(Q2).filter(Zr);r.$$.on_destroy?r.$$.on_destroy.push(...s):ar(s),r.$$.on_mount=[]}),n.forEach(is)}function gi(r,e){const t=r.$$;t.fragment!==null&&(UA(t.after_update),ar(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function HA(r,e){r.$$.dirty[0]===-1&&(rl.push(r),GA(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{const m=f.length?f[0]:h;return c.ctx&&n(c.ctx[u],c.ctx[u]=m)&&(!c.skip_bound&&c.bound[u]&&c.bound[u](m),d&&HA(r,u)),h}):[],c.update(),d=!0,ar(c.before_update),c.fragment=i?i(c.ctx):!1,e.target){if(e.hydrate){const u=RA(e.target);c.fragment&&c.fragment.l(u),u.forEach(Le)}else c.fragment&&c.fragment.c();e.intro&&$e(r.$$.fragment),pi(r,e.target,e.anchor),aS()}zc(l)}class cr{constructor(){Jm(this,"$$");Jm(this,"$$set")}$destroy(){gi(this,1),this.$destroy=Pt}$on(e,t){if(!Zr(t))return Pt;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const n=i.indexOf(t);n!==-1&&i.splice(n,1)}}$set(e){this.$$set&&!AA(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const XA="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(XA);const Va=[];function dS(r,e=Pt){let t;const i=new Set;function n(a){if(Oi(r,a)&&(r=a,t)){const l=!Va.length;for(const c of i)c[1](),Va.push(c,r);if(l){for(let c=0;c{i.delete(c),i.size===0&&t&&(t(),t=null)}}return{set:n,update:s,subscribe:o}}const ch=dS(!1),$m=dS(!1);function WA(r){let e;return{c(){e=ai("div"),pb(e,"width","100%"),pb(e,"height","100%")},m(t,i){Me(t,e,i),r[4](e)},p:Pt,i:Pt,o:Pt,d(t){t&&Le(e),r[4](null)}}}function YA(r,e,t){let i;Hg(r,ch,l=>t(3,i=l));let{simulation:n}=e,{nodePositions:s}=e,o;uf(()=>{n.start(o,s)}),sS(()=>{t(1,s=n.getNodePositions()),n.destroy()});function a(l){en[l?"unshift":"push"](()=>{o=l,t(0,o)})}return r.$$set=l=>{"simulation"in l&&t(2,n=l.simulation),"nodePositions"in l&&t(1,s=l.nodePositions)},r.$$.update=()=>{r.$$.dirty&12&&n.started&&(i?n.resume():n.pause())},[o,s,n,i,a]}class qA extends cr{constructor(e){super(),lr(this,e,YA,WA,Oi,{simulation:2,nodePositions:1})}}function Z(r,e,t){return(e=function(i){var n=function(s,o){if(typeof s!="object"||!s)return s;var a=s[Symbol.toPrimitive];if(a!==void 0){var l=a.call(s,o||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(s)}(i,"string");return typeof n=="symbol"?n:n+""}(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function _b(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function q(r){for(var e=1;e=0)continue;l[c]=o[c]}return l}(r,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i=0||{}.propertyIsEnumerable.call(r,t)&&(n[t]=r[t])}return n}function So(r,e){return e||(e=r.slice(0)),Object.freeze(Object.defineProperties(r,{raw:{value:Object.freeze(e)}}))}let yb=class{constructor(){Z(this,"browserShadowBlurConstant",1),Z(this,"DPI",96),Z(this,"devicePixelRatio",typeof window!="undefined"?window.devicePixelRatio:1),Z(this,"perfLimitSizeTotal",2097152),Z(this,"maxCacheSideLimit",4096),Z(this,"minCacheSideLimit",256),Z(this,"disableStyleCopyPaste",!1),Z(this,"enableGLFiltering",!0),Z(this,"textureSize",4096),Z(this,"forceGLPutImageData",!1),Z(this,"cachesBoundsOfCurve",!1),Z(this,"fontPaths",{}),Z(this,"NUM_FRACTION_DIGITS",4)}};const ri=new class extends yb{constructor(r){super(),this.configure(r)}configure(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Object.assign(this,r)}addFonts(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fontPaths=q(q({},this.fontPaths),r)}removeFonts(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(r=>{delete this.fontPaths[r]})}clearFonts(){this.fontPaths={}}restoreDefaults(r){const e=new yb,t=(r==null?void 0:r.reduce((i,n)=>(i[n]=e[n],i),{}))||e;this.configure(t)}},_o=function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;ithis.testPrecision(t,i)),t.getExtension("WEBGL_lose_context").loseContext(),_o("log","WebGL: max texture size ".concat(this.maxTextureSize)))}isSupported(e){return!!this.maxTextureSize&&this.maxTextureSize>=e}};const QA={};let bb;const rs=()=>bb||(bb={document,window,isTouchSupported:"ontouchstart"in window||"ontouchstart"in document||window&&window.navigator&&window.navigator.maxTouchPoints>0,WebGLProbe:new JA,dispose(){},copyPasteData:QA}),jl=()=>rs().document,tv=()=>rs().window,uS=()=>{var r;return Math.max((r=ri.devicePixelRatio)!==null&&r!==void 0?r:tv().devicePixelRatio,1)},Bc=new class{constructor(){Z(this,"charWidthsCache",{}),Z(this,"boundsOfCurveCache",{})}getFontCache(r){let{fontFamily:e,fontStyle:t,fontWeight:i}=r;e=e.toLowerCase(),this.charWidthsCache[e]||(this.charWidthsCache[e]={});const n=this.charWidthsCache[e],s="".concat(t.toLowerCase(),"_").concat((i+"").toLowerCase());return n[s]||(n[s]={}),n[s]}clearFontCache(r){(r=(r||"").toLowerCase())?this.charWidthsCache[r]&&delete this.charWidthsCache[r]:this.charWidthsCache={}}limitDimsByArea(r){const{perfLimitSizeTotal:e}=ri,t=Math.sqrt(e*r);return[Math.floor(t),Math.floor(e/t)]}},Zg="6.4.2";function dh(){}const md=Math.PI/2,Ah=2*Math.PI,iv=Math.PI/180,Ur=Object.freeze([1,0,0,1,0,0]),rv=16,Qs=.4477152502,Zt="center",hi="left",Jr="top",Kg="bottom",Qi="right",Qr="none",nv=/\r?\n/,hS="moving",hf="scaling",fS="rotating",sv="rotate",mS="skewing",Kc="resizing",pS="modifyPoly",$A="modifyPath",Oh="changed",ff="scale",tn="scaleX",bn="scaleY",Gl="skewX",Vl="skewY",or="fill",$r="stroke",Ih="modified",Ua="json",ep="svg",pt=new class{constructor(){this[Ua]=new Map,this[ep]=new Map}has(r){return this[Ua].has(r)}getClass(r){const e=this[Ua].get(r);if(!e)throw new Jn("No class registered for ".concat(r));return e}setClass(r,e){e?this[Ua].set(e,r):(this[Ua].set(r.type,r),this[Ua].set(r.type.toLowerCase(),r))}getSVGClass(r){return this[ep].get(r)}setSVGClass(r,e){this[ep].set(e!=null?e:r.type.toLowerCase(),r)}},Lh=new class extends Array{remove(r){const e=this.indexOf(r);e>-1&&this.splice(e,1)}cancelAll(){const r=this.splice(0);return r.forEach(e=>e.abort()),r}cancelByCanvas(r){if(!r)return[];const e=this.filter(t=>{var i;return t.target===r||typeof t.target=="object"&&((i=t.target)===null||i===void 0?void 0:i.canvas)===r});return e.forEach(t=>t.abort()),e}cancelByTarget(r){if(!r)return[];const e=this.filter(t=>t.target===r);return e.forEach(t=>t.abort()),e}};let e5=class{constructor(){Z(this,"__eventListeners",{})}on(e,t){if(this.__eventListeners||(this.__eventListeners={}),typeof e=="object")return Object.entries(e).forEach(i=>{let[n,s]=i;this.on(n,s)}),()=>this.off(e);if(t){const i=e;return this.__eventListeners[i]||(this.__eventListeners[i]=[]),this.__eventListeners[i].push(t),()=>this.off(i,t)}return()=>!1}once(e,t){if(typeof e=="object"){const i=[];return Object.entries(e).forEach(n=>{let[s,o]=n;i.push(this.once(s,o))}),()=>i.forEach(n=>n())}if(t){const i=this.on(e,function(){for(var n=arguments.length,s=new Array(n),o=0;o!1}_removeEventListener(e,t){if(this.__eventListeners[e])if(t){const i=this.__eventListeners[e],n=i.indexOf(t);n>-1&&i.splice(n,1)}else this.__eventListeners[e]=[]}off(e,t){if(this.__eventListeners)if(e===void 0)for(const i in this.__eventListeners)this._removeEventListener(i);else typeof e=="object"?Object.entries(e).forEach(i=>{let[n,s]=i;this._removeEventListener(n,s)}):this._removeEventListener(e,t)}fire(e,t){var i;if(!this.__eventListeners)return;const n=(i=this.__eventListeners[e])===null||i===void 0?void 0:i.concat();if(n)for(let s=0;s{const t=r.indexOf(e);return t!==-1&&r.splice(t,1),r},Is=r=>{if(r===0)return 1;switch(Math.abs(r)/md){case 1:case 3:return 0;case 2:return-1}return Math.cos(r)},Ls=r=>{if(r===0)return 0;const e=r/md,t=Math.sign(r);switch(e){case 1:return t;case 2:return 0;case 3:return-t}return Math.sin(r)};let ve=class Fr{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;typeof e=="object"?(this.x=e.x,this.y=e.y):(this.x=e,this.y=t)}add(e){return new Fr(this.x+e.x,this.y+e.y)}addEquals(e){return this.x+=e.x,this.y+=e.y,this}scalarAdd(e){return new Fr(this.x+e,this.y+e)}scalarAddEquals(e){return this.x+=e,this.y+=e,this}subtract(e){return new Fr(this.x-e.x,this.y-e.y)}subtractEquals(e){return this.x-=e.x,this.y-=e.y,this}scalarSubtract(e){return new Fr(this.x-e,this.y-e)}scalarSubtractEquals(e){return this.x-=e,this.y-=e,this}multiply(e){return new Fr(this.x*e.x,this.y*e.y)}scalarMultiply(e){return new Fr(this.x*e,this.y*e)}scalarMultiplyEquals(e){return this.x*=e,this.y*=e,this}divide(e){return new Fr(this.x/e.x,this.y/e.y)}scalarDivide(e){return new Fr(this.x/e,this.y/e)}scalarDivideEquals(e){return this.x/=e,this.y/=e,this}eq(e){return this.x===e.x&&this.y===e.y}lt(e){return this.xe.x&&this.y>e.y}gte(e){return this.x>=e.x&&this.y>=e.y}lerp(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.5;return t=Math.max(Math.min(1,t),0),new Fr(this.x+(e.x-this.x)*t,this.y+(e.y-this.y)*t)}distanceFrom(e){const t=this.x-e.x,i=this.y-e.y;return Math.sqrt(t*t+i*i)}midPointFrom(e){return this.lerp(e)}min(e){return new Fr(Math.min(this.x,e.x),Math.min(this.y,e.y))}max(e){return new Fr(Math.max(this.x,e.x),Math.max(this.y,e.y))}toString(){return"".concat(this.x,",").concat(this.y)}setXY(e,t){return this.x=e,this.y=t,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setFromPoint(e){return this.x=e.x,this.y=e.y,this}swap(e){const t=this.x,i=this.y;this.x=e.x,this.y=e.y,e.x=t,e.y=i}clone(){return new Fr(this.x,this.y)}rotate(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ov;const i=Ls(e),n=Is(e),s=this.subtract(t);return new Fr(s.x*n-s.y*i,s.x*i+s.y*n).add(t)}transform(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return new Fr(e[0]*this.x+e[2]*this.y+(t?0:e[4]),e[1]*this.x+e[3]*this.y+(t?0:e[5]))}};const ov=new ve(0,0),uh=r=>!!r&&Array.isArray(r._objects);function gS(r){class e extends r{constructor(){super(...arguments),Z(this,"_objects",[])}_onObjectAdded(i){}_onObjectRemoved(i){}_onStackOrderChanged(i){}add(){for(var i=arguments.length,n=new Array(i),s=0;sthis._onObjectAdded(a)),o}insertAt(i){for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;othis._onObjectAdded(a)),this._objects.length}remove(){const i=this._objects,n=[];for(var s=arguments.length,o=new Array(s),a=0;a{const c=i.indexOf(l);c!==-1&&(i.splice(c,1),n.push(l),this._onObjectRemoved(l))}),n}forEachObject(i){this.getObjects().forEach((n,s,o)=>i(n,s,o))}getObjects(){for(var i=arguments.length,n=new Array(i),s=0;so.isType(...n))}item(i){return this._objects[i]}isEmpty(){return this._objects.length===0}size(){return this._objects.length}contains(i,n){return!!this._objects.includes(i)||!!n&&this._objects.some(s=>s instanceof e&&s.contains(i,!0))}complexity(){return this._objects.reduce((i,n)=>i+=n.complexity?n.complexity():0,0)}sendObjectToBack(i){return!(!i||i===this._objects[0])&&(nl(this._objects,i),this._objects.unshift(i),this._onStackOrderChanged(i),!0)}bringObjectToFront(i){return!(!i||i===this._objects[this._objects.length-1])&&(nl(this._objects,i),this._objects.push(i),this._onStackOrderChanged(i),!0)}sendObjectBackwards(i,n){if(!i)return!1;const s=this._objects.indexOf(i);if(s!==0){const o=this.findNewLowerIndex(i,s,n);return nl(this._objects,i),this._objects.splice(o,0,i),this._onStackOrderChanged(i),!0}return!1}bringObjectForward(i,n){if(!i)return!1;const s=this._objects.indexOf(i);if(s!==this._objects.length-1){const o=this.findNewUpperIndex(i,s,n);return nl(this._objects,i),this._objects.splice(o,0,i),this._onStackOrderChanged(i),!0}return!1}moveObjectTo(i,n){return i!==this._objects[n]&&(nl(this._objects,i),this._objects.splice(n,0,i),this._onStackOrderChanged(i),!0)}findNewLowerIndex(i,n,s){let o;if(s){o=n;for(let a=n-1;a>=0;--a)if(i.isOverlapping(this._objects[a])){o=a;break}}else o=n-1;return o}findNewUpperIndex(i,n,s){let o;if(s){o=n;for(let a=n+1;a1&&arguments[1]!==void 0?arguments[1]:{};const c=[],d=new ve(n,s),u=d.add(new ve(o,a));for(let h=this._objects.length-1;h>=0;h--){const f=this._objects[h];f.selectable&&f.visible&&(l&&f.intersectsWithRect(d,u)||f.isContainedWithinRect(d,u)||l&&f.containsPoint(d)||l&&f.containsPoint(u))&&c.push(f)}return c}}return e}let vS=class extends e5{_setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};for(const t in e)this.set(t,e[t])}_setObject(e){for(const t in e)this._set(t,e[t])}set(e,t){return typeof e=="object"?this._setObject(e):this._set(e,t),this}_set(e,t){this[e]=t}toggle(e){const t=this.get(e);return typeof t=="boolean"&&this.set(e,!t),this}get(e){return this[e]}};function hh(r){return tv().requestAnimationFrame(r)}function t5(r){return tv().cancelAnimationFrame(r)}let i5=0;const yo=()=>i5++,mr=()=>{const r=jl().createElement("canvas");if(!r||r.getContext===void 0)throw new Jn("Failed to create `canvas` element");return r},r5=()=>jl().createElement("img"),_S=(r,e,t)=>r.toDataURL("image/".concat(e),t),$i=r=>r*iv,aa=r=>r/iv,n5=r=>r.every((e,t)=>e===Ur[t]),qr=(r,e,t)=>new ve(r).transform(e,t),Rn=r=>{const e=1/(r[0]*r[3]-r[1]*r[2]),t=[e*r[3],-e*r[1],-e*r[2],e*r[0],0,0],{x:i,y:n}=new ve(r[4],r[5]).transform(t,!0);return t[4]=-i,t[5]=-n,t},fr=(r,e,t)=>[r[0]*e[0]+r[2]*e[1],r[1]*e[0]+r[3]*e[1],r[0]*e[2]+r[2]*e[3],r[1]*e[2]+r[3]*e[3],t?0:r[0]*e[4]+r[2]*e[5]+r[4],t?0:r[1]*e[4]+r[3]*e[5]+r[5]],av=(r,e)=>r.reduceRight((t,i)=>i&&t?fr(i,t,e):i||t,void 0)||Ur.concat(),yS=r=>{let[e,t]=r;return Math.atan2(t,e)},Ph=r=>{const e=yS(r),t=Math.pow(r[0],2)+Math.pow(r[1],2),i=Math.sqrt(t),n=(r[0]*r[3]-r[2]*r[1])/i,s=Math.atan2(r[0]*r[2]+r[1]*r[3],t);return{angle:aa(e),scaleX:i,scaleY:n,skewX:aa(s),skewY:0,translateX:r[4]||0,translateY:r[5]||0}},pd=function(r){return[1,0,0,1,r,arguments.length>1&&arguments[1]!==void 0?arguments[1]:0]};function gd(){let{angle:r=0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{x:e=0,y:t=0}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=$i(r),n=Is(i),s=Ls(i);return[n,s,-s,n,e?e-(n*e-s*t):0,t?t-(s*e+n*t):0]}const lv=function(r){return[r,0,0,arguments.length>1&&arguments[1]!==void 0?arguments[1]:r,0,0]},bS=r=>Math.tan($i(r)),xS=r=>[1,0,bS(r),1,0,0],wS=r=>[1,bS(r),0,1,0,0],mf=r=>{let{scaleX:e=1,scaleY:t=1,flipX:i=!1,flipY:n=!1,skewX:s=0,skewY:o=0}=r,a=lv(i?-e:e,n?-t:t);return s&&(a=fr(a,xS(s),!0)),o&&(a=fr(a,wS(o),!0)),a},s5=r=>{const{translateX:e=0,translateY:t=0,angle:i=0}=r;let n=pd(e,t);i&&(n=fr(n,gd({angle:i})));const s=mf(r);return n5(s)||(n=fr(n,s)),n},fh=function(r){let{signal:e,crossOrigin:t=null}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(i,n){if(e&&e.aborted)return n(new ZA("loadImage"));const s=r5();let o;e&&(o=function(l){s.src="",n(l)},e.addEventListener("abort",o,{once:!0}));const a=function(){s.onload=s.onerror=null,o&&(e==null||e.removeEventListener("abort",o)),i(s)};r?(s.onload=a,s.onerror=function(){o&&(e==null||e.removeEventListener("abort",o)),n(new Jn("Error loading ".concat(s.src)))},t&&(s.crossOrigin=t),s.src=r):a()})},Jc=function(r){let{signal:e,reviver:t=dh}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise((i,n)=>{const s=[];e&&e.addEventListener("abort",n,{once:!0}),Promise.all(r.map(o=>pt.getClass(o.type).fromObject(o,{signal:e}).then(a=>(t(o,a),s.push(a),a)))).then(i).catch(o=>{s.forEach(a=>{a.dispose&&a.dispose()}),n(o)}).finally(()=>{e&&e.removeEventListener("abort",n)})})},pf=function(r){let{signal:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise((t,i)=>{const n=[];e&&e.addEventListener("abort",i,{once:!0});const s=Object.values(r).map(a=>a&&a.type&&pt.has(a.type)?Jc([a],{signal:e}).then(l=>{let[c]=l;return n.push(c),c}):a),o=Object.keys(r);Promise.all(s).then(a=>a.reduce((l,c,d)=>(l[o[d]]=c,l),{})).then(t).catch(a=>{n.forEach(l=>{l.dispose&&l.dispose()}),i(a)}).finally(()=>{e&&e.removeEventListener("abort",i)})})},Ul=function(r){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:[]).reduce((e,t)=>(t in r&&(e[t]=r[t]),e),{})},cv=(r,e)=>Object.keys(r).reduce((t,i)=>(e(r[i],i,r)&&(t[i]=r[i]),t),{}),xb={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#0FF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000",blanchedalmond:"#FFEBCD",blue:"#00F",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#0FF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#F0F",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#0F0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#F0F",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#639",red:"#F00",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFF",whitesmoke:"#F5F5F5",yellow:"#FF0",yellowgreen:"#9ACD32"},tp=(r,e,t)=>(t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+6*(e-r)*t:t<.5?e:t<2/3?r+(e-r)*(2/3-t)*6:r),wb=(r,e,t,i)=>{r/=255,e/=255,t/=255;const n=Math.max(r,e,t),s=Math.min(r,e,t);let o,a;const l=(n+s)/2;if(n===s)o=a=0;else{const c=n-s;switch(a=l>.5?c/(2-n-s):c/(n+s),n){case r:o=(e-t)/c+(e0&&arguments[0]!==void 0?arguments[0]:"1";return parseFloat(r)/(r.endsWith("%")?100:1)},xu=r=>Math.min(Math.round(r),255).toString(16).toUpperCase().padStart(2,"0"),Tb=r=>{let[e,t,i,n=1]=r;const s=Math.round(.3*e+.59*t+.11*i);return[s,s,s,n]};class mi{constructor(e){if(Z(this,"isUnrecognised",!1),e)if(e instanceof mi)this.setSource([...e._source]);else if(Array.isArray(e)){const[t,i,n,s=1]=e;this.setSource([t,i,n,s])}else this.setSource(this._tryParsingColor(e));else this.setSource([0,0,0,1])}_tryParsingColor(e){return e in xb&&(e=xb[e]),e==="transparent"?[255,255,255,0]:mi.sourceFromHex(e)||mi.sourceFromRgb(e)||mi.sourceFromHsl(e)||(this.isUnrecognised=!0)&&[0,0,0,1]}getSource(){return this._source}setSource(e){this._source=e}toRgb(){const[e,t,i]=this.getSource();return"rgb(".concat(e,",").concat(t,",").concat(i,")")}toRgba(){return"rgba(".concat(this.getSource().join(","),")")}toHsl(){const[e,t,i]=wb(...this.getSource());return"hsl(".concat(e,",").concat(t,"%,").concat(i,"%)")}toHsla(){const[e,t,i,n]=wb(...this.getSource());return"hsla(".concat(e,",").concat(t,"%,").concat(i,"%,").concat(n,")")}toHex(){return this.toHexa().slice(0,6)}toHexa(){const[e,t,i,n]=this.getSource();return"".concat(xu(e)).concat(xu(t)).concat(xu(i)).concat(xu(Math.round(255*n)))}getAlpha(){return this.getSource()[3]}setAlpha(e){return this._source[3]=e,this}toGrayscale(){return this.setSource(Tb(this.getSource())),this}toBlackWhite(e){const[t,,,i]=Tb(this.getSource()),n=t<(e||127)?0:255;return this.setSource([n,n,n,i]),this}overlayWith(e){e instanceof mi||(e=new mi(e));const t=this.getSource(),i=e.getSource(),[n,s,o]=t.map((a,l)=>Math.round(.5*a+.5*i[l]));return this.setSource([n,s,o,t[3]]),this}static fromRgb(e){return mi.fromRgba(e)}static fromRgba(e){return new mi(mi.sourceFromRgb(e))}static sourceFromRgb(e){const t=e.match(/^rgba?\(\s*(\d{0,3}(?:\.\d+)?%?)\s*[\s|,]\s*(\d{0,3}(?:\.\d+)?%?)\s*[\s|,]\s*(\d{0,3}(?:\.\d+)?%?)\s*(?:\s*[,/]\s*(\d{0,3}(?:\.\d+)?%?)\s*)?\)$/i);if(t){const[i,n,s]=t.slice(1,4).map(o=>{const a=parseFloat(o);return o.endsWith("%")?Math.round(2.55*a):a});return[i,n,s,Sb(t[4])]}}static fromHsl(e){return mi.fromHsla(e)}static fromHsla(e){return new mi(mi.sourceFromHsl(e))}static sourceFromHsl(e){const t=e.match(/^hsla?\(\s*([+-]?\d{0,3}(?:\.\d+)?(?:deg|turn|rad)?)\s*[\s|,]\s*(\d{0,3}(?:\.\d+)?%?)\s*[\s|,]\s*(\d{0,3}(?:\.\d+)?%?)\s*(?:\s*[,/]\s*(\d*(?:\.\d+)?%?)\s*)?\)$/i);if(!t)return;const i=(mi.parseAngletoDegrees(t[1])%360+360)%360/360,n=parseFloat(t[2])/100,s=parseFloat(t[3])/100;let o,a,l;if(n===0)o=a=l=s;else{const c=s<=.5?s*(n+1):s+n-s*n,d=2*s-c;o=tp(d,c,i+1/3),a=tp(d,c,i),l=tp(d,c,i-1/3)}return[Math.round(255*o),Math.round(255*a),Math.round(255*l),Sb(t[4])]}static fromHex(e){return new mi(mi.sourceFromHex(e))}static sourceFromHex(e){if(e.match(/^#?(([0-9a-f]){3,4}|([0-9a-f]{2}){3,4})$/i)){const t=e.slice(e.indexOf("#")+1);let i;i=t.length<=4?t.split("").map(l=>l+l):t.match(/.{2}/g);const[n,s,o,a=255]=i.map(l=>parseInt(l,16));return[n,s,o,a/255]}}static parseAngletoDegrees(e){const t=e.toLowerCase(),i=parseFloat(t);return t.includes("rad")?aa(i):t.includes("turn")?360*i:i}}const Bi=(r,e)=>parseFloat(Number(r).toFixed(e)),hl=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rv;const t=/\D{0,2}$/.exec(r),i=parseFloat(r),n=ri.DPI;switch(t==null?void 0:t[0]){case"mm":return i*n/25.4;case"cm":return i*n/2.54;case"in":return i*n;case"pt":return i*n/72;case"pc":return i*n/72*12;case"em":return i*e;default:return i}},o5=r=>{const[e,t]=r.trim().split(" "),[i,n]=(s=e)&&s!==Qr?[s.slice(1,4),s.slice(5,8)]:s===Qr?[s,s]:["Mid","Mid"];var s;return{meetOrSlice:t||"meet",alignX:i,alignY:n}},Dh=r=>"matrix("+r.map(e=>Bi(e,ri.NUM_FRACTION_DIGITS)).join(" ")+")",Qc=function(r,e){let t,i,n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(e)if(e.toLive)t="url(#SVGID_".concat(e.id,")");else{const s=new mi(e),o=s.getAlpha();t=s.toRgb(),o!==1&&(i=o.toString())}else t="none";return n?"".concat(r,": ").concat(t,"; ").concat(i?"".concat(r,"-opacity: ").concat(i,"; "):""):"".concat(r,'="').concat(t,'" ').concat(i?"".concat(r,'-opacity="').concat(i,'" '):"")},_n=r=>!!r&&r.toLive!==void 0,Cb=r=>!!r&&typeof r.toObject=="function",kb=r=>!!r&&r.offsetX!==void 0&&"source"in r,SS=r=>!!r&&typeof r._renderText=="function",Zo=r=>!!r&&"multiSelectionStacking"in r;function TS(r){const e=r&&Dn(r);let t=0,i=0;if(!r||!e)return{left:t,top:i};let n=r;const s=e.documentElement,o=e.body||{scrollLeft:0,scrollTop:0};for(;n&&(n.parentNode||n.host)&&(n=n.parentNode||n.host,n===e?(t=o.scrollLeft||s.scrollLeft||0,i=o.scrollTop||s.scrollTop||0):(t+=n.scrollLeft||0,i+=n.scrollTop||0),n.nodeType!==1||n.style.position!=="fixed"););return{left:t,top:i}}const Dn=r=>r.ownerDocument||null,CS=r=>{var e;return((e=r.ownerDocument)===null||e===void 0?void 0:e.defaultView)||null},kS=function(r,e,t){let{width:i,height:n}=t,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;r.width=i,r.height=n,s>1&&(r.setAttribute("width",(i*s).toString()),r.setAttribute("height",(n*s).toString()),e.scale(s,s))},Jg=(r,e)=>{let{width:t,height:i}=e;t&&(r.style.width=typeof t=="number"?"".concat(t,"px"):t),i&&(r.style.height=typeof i=="number"?"".concat(i,"px"):i)};function Eb(r){return r.onselectstart!==void 0&&(r.onselectstart=()=>!1),r.style.userSelect=Qr,r}class ES{constructor(e){Z(this,"_originalCanvasStyle",void 0),Z(this,"lower",void 0);const t=this.createLowerCanvas(e);this.lower={el:t,ctx:t.getContext("2d")}}createLowerCanvas(e){const t=(i=e)&&i.getContext!==void 0?e:e&&jl().getElementById(e)||mr();var i;if(t.hasAttribute("data-fabric"))throw new Jn("Trying to initialize a canvas that has already been initialized. Did you forget to dispose the canvas?");return this._originalCanvasStyle=t.style.cssText,t.setAttribute("data-fabric","main"),t.classList.add("lower-canvas"),t}cleanupDOM(e){let{width:t,height:i}=e;const{el:n}=this.lower;n.classList.remove("lower-canvas"),n.removeAttribute("data-fabric"),n.setAttribute("width","".concat(t)),n.setAttribute("height","".concat(i)),n.style.cssText=this._originalCanvasStyle||"",this._originalCanvasStyle=void 0}setDimensions(e,t){const{el:i,ctx:n}=this.lower;kS(i,n,e,t)}setCSSDimensions(e){Jg(this.lower.el,e)}calcOffset(){return function(e){var t;const i=e&&Dn(e),n={left:0,top:0};if(!i)return n;const s=((t=CS(e))===null||t===void 0?void 0:t.getComputedStyle(e,null))||{};n.left+=parseInt(s.borderLeftWidth,10)||0,n.top+=parseInt(s.borderTopWidth,10)||0,n.left+=parseInt(s.paddingLeft,10)||0,n.top+=parseInt(s.paddingTop,10)||0;let o={left:0,top:0};const a=i.documentElement;e.getBoundingClientRect!==void 0&&(o=e.getBoundingClientRect());const l=TS(e);return{left:o.left+l.left-(a.clientLeft||0)+n.left,top:o.top+l.top-(a.clientTop||0)+n.top}}(this.lower.el)}dispose(){rs().dispose(this.lower.el),delete this.lower}}const a5={backgroundVpt:!0,backgroundColor:"",overlayVpt:!0,overlayColor:"",includeDefaultValues:!0,svgViewportTransformation:!0,renderOnAddRemove:!0,skipOffscreen:!0,enableRetinaScaling:!0,imageSmoothingEnabled:!0,controlsAboveOverlay:!1,allowTouchScrolling:!1,viewportTransform:[...Ur]};class vd extends gS(vS){get lowerCanvasEl(){var e;return(e=this.elements.lower)===null||e===void 0?void 0:e.el}get contextContainer(){var e;return(e=this.elements.lower)===null||e===void 0?void 0:e.ctx}static getDefaults(){return vd.ownDefaults}constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Object.assign(this,this.constructor.getDefaults()),this.set(t),this.initElements(e),this._setDimensionsImpl({width:this.width||this.elements.lower.el.width||0,height:this.height||this.elements.lower.el.height||0}),this.skipControlsDrawing=!1,this.viewportTransform=[...this.viewportTransform],this.calcViewportBoundaries()}initElements(e){this.elements=new ES(e)}add(){const e=super.add(...arguments);return arguments.length>0&&this.renderOnAddRemove&&this.requestRenderAll(),e}insertAt(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n0&&this.renderOnAddRemove&&this.requestRenderAll(),s}remove(){const e=super.remove(...arguments);return e.length>0&&this.renderOnAddRemove&&this.requestRenderAll(),e}_onObjectAdded(e){e.canvas&&e.canvas!==this&&(_o("warn",`Canvas is trying to add an object that belongs to a different canvas. +Resulting to default behavior: removing object from previous canvas and adding to new canvas`),e.canvas.remove(e)),e._set("canvas",this),e.setCoords(),this.fire("object:added",{target:e}),e.fire("added",{target:this})}_onObjectRemoved(e){e._set("canvas",void 0),this.fire("object:removed",{target:e}),e.fire("removed",{target:this})}_onStackOrderChanged(){this.renderOnAddRemove&&this.requestRenderAll()}getRetinaScaling(){return this.enableRetinaScaling?uS():1}calcOffset(){return this._offset=this.elements.calcOffset()}getWidth(){return this.width}getHeight(){return this.height}setWidth(e,t){return this.setDimensions({width:e},t)}setHeight(e,t){return this.setDimensions({height:e},t)}_setDimensionsImpl(e){let{cssOnly:t=!1,backstoreOnly:i=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!t){const n=q({width:this.width,height:this.height},e);this.elements.setDimensions(n,this.getRetinaScaling()),this.hasLostContext=!0,this.width=n.width,this.height=n.height}i||this.elements.setCSSDimensions(e),this.calcOffset()}setDimensions(e,t){this._setDimensionsImpl(e,t),t&&t.cssOnly||this.requestRenderAll()}getZoom(){return this.viewportTransform[0]}setViewportTransform(e){this.viewportTransform=e,this.calcViewportBoundaries(),this.renderOnAddRemove&&this.requestRenderAll()}zoomToPoint(e,t){const i=e,n=[...this.viewportTransform],s=qr(e,Rn(n));n[0]=t,n[3]=t;const o=qr(s,n);n[4]+=i.x-o.x,n[5]+=i.y-o.y,this.setViewportTransform(n)}setZoom(e){this.zoomToPoint(new ve(0,0),e)}absolutePan(e){const t=[...this.viewportTransform];return t[4]=-e.x,t[5]=-e.y,this.setViewportTransform(t)}relativePan(e){return this.absolutePan(new ve(-e.x-this.viewportTransform[4],-e.y-this.viewportTransform[5]))}getElement(){return this.elements.lower.el}clearContext(e){e.clearRect(0,0,this.width,this.height)}getContext(){return this.elements.lower.ctx}clear(){this.remove(...this.getObjects()),this.backgroundImage=void 0,this.overlayImage=void 0,this.backgroundColor="",this.overlayColor="",this.clearContext(this.getContext()),this.fire("canvas:cleared"),this.renderOnAddRemove&&this.requestRenderAll()}renderAll(){this.cancelRequestedRender(),this.destroyed||this.renderCanvas(this.getContext(),this._objects)}renderAndReset(){this.nextRenderHandle=0,this.renderAll()}requestRenderAll(){this.nextRenderHandle||this.disposed||this.destroyed||(this.nextRenderHandle=hh(()=>this.renderAndReset()))}calcViewportBoundaries(){const e=this.width,t=this.height,i=Rn(this.viewportTransform),n=qr({x:0,y:0},i),s=qr({x:e,y:t},i),o=n.min(s),a=n.max(s);return this.vptCoords={tl:o,tr:new ve(a.x,o.y),bl:new ve(o.x,a.y),br:a}}cancelRequestedRender(){this.nextRenderHandle&&(t5(this.nextRenderHandle),this.nextRenderHandle=0)}drawControls(e){}renderCanvas(e,t){if(this.destroyed)return;const i=this.viewportTransform,n=this.clipPath;this.calcViewportBoundaries(),this.clearContext(e),e.imageSmoothingEnabled=this.imageSmoothingEnabled,e.patternQuality="best",this.fire("before:render",{ctx:e}),this._renderBackground(e),e.save(),e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),this._renderObjects(e,t),e.restore(),this.controlsAboveOverlay||this.skipControlsDrawing||this.drawControls(e),n&&(n._set("canvas",this),n.shouldCache(),n._transformDone=!0,n.renderCache({forClipping:!0}),this.drawClipPathOnCanvas(e,n)),this._renderOverlay(e),this.controlsAboveOverlay&&!this.skipControlsDrawing&&this.drawControls(e),this.fire("after:render",{ctx:e}),this.__cleanupTask&&(this.__cleanupTask(),this.__cleanupTask=void 0)}drawClipPathOnCanvas(e,t){const i=this.viewportTransform;e.save(),e.transform(...i),e.globalCompositeOperation="destination-in",t.transform(e),e.scale(1/t.zoomX,1/t.zoomY),e.drawImage(t._cacheCanvas,-t.cacheTranslationX,-t.cacheTranslationY),e.restore()}_renderObjects(e,t){for(let i=0,n=t.length;i!s.excludeFromExport).map(s=>this._toObject(s,e,t))},this.__serializeBgOverlay(e,t)),n?{clipPath:n}:null)}_toObject(e,t,i){let n;this.includeDefaultValues||(n=e.includeDefaultValues,e.includeDefaultValues=!1);const s=e[t](i);return this.includeDefaultValues||(e.includeDefaultValues=!!n),s}__serializeBgOverlay(e,t){const i={},n=this.backgroundImage,s=this.overlayImage,o=this.backgroundColor,a=this.overlayColor;return _n(o)?o.excludeFromExport||(i.background=o.toObject(t)):o&&(i.background=o),_n(a)?a.excludeFromExport||(i.overlay=a.toObject(t)):a&&(i.overlay=a),n&&!n.excludeFromExport&&(i.backgroundImage=this._toObject(n,e,t)),s&&!s.excludeFromExport&&(i.overlayImage=this._toObject(s,e,t)),i}toSVG(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;e.reviver=t;const i=[];return this._setSVGPreamble(i,e),this._setSVGHeader(i,e),this.clipPath&&i.push(' +`)),this._setSVGBgOverlayColor(i,"background"),this._setSVGBgOverlayImage(i,"backgroundImage",t),this._setSVGObjects(i,t),this.clipPath&&i.push(` +`),this._setSVGBgOverlayColor(i,"overlay"),this._setSVGBgOverlayImage(i,"overlayImage",t),i.push(""),i.join("")}_setSVGPreamble(e,t){t.suppressPreamble||e.push(' `,' -`)}_setSVGHeader(e,t){const r=t.width||"".concat(this.width),n=t.height||"".concat(this.height),s=pe.NUM_FRACTION_DIGITS,o=t.viewBox;let a;if(o)a='viewBox="'.concat(o.x," ").concat(o.y," ").concat(o.width," ").concat(o.height,'" ');else if(this.svgViewportTransformation){const l=this.viewportTransform;a='viewBox="'.concat(Ae(-l[4]/l[0],s)," ").concat(Ae(-l[5]/l[3],s)," ").concat(Ae(this.width/l[0],s)," ").concat(Ae(this.height/l[3],s),'" ')}else a='viewBox="0 0 '.concat(this.width," ").concat(this.height,'" ');e.push(" -`,"Created with Fabric.js ",ta,` +`)}_setSVGHeader(e,t){const i=t.width||"".concat(this.width),n=t.height||"".concat(this.height),s=ri.NUM_FRACTION_DIGITS,o=t.viewBox;let a;if(o)a='viewBox="'.concat(o.x," ").concat(o.y," ").concat(o.width," ").concat(o.height,'" ');else if(this.svgViewportTransformation){const l=this.viewportTransform;a='viewBox="'.concat(Bi(-l[4]/l[0],s)," ").concat(Bi(-l[5]/l[3],s)," ").concat(Bi(this.width/l[0],s)," ").concat(Bi(this.height/l[3],s),'" ')}else a='viewBox="0 0 '.concat(this.width," ").concat(this.height,'" ');e.push(" +`,"Created with Fabric.js ",Zg,` `,` `,this.createSVGFontFacesMarkup(),this.createSVGRefElementsMarkup(),this.createSVGClipPathMarkup(t),` -`)}createSVGClipPathMarkup(e){const t=this.clipPath;return t?(t.clipPathId="CLIPPATH_".concat(lr()),' +`)}createSVGClipPathMarkup(e){const t=this.clipPath;return t?(t.clipPathId="CLIPPATH_".concat(yo()),' `).concat(t.toClipPathSVG(e.reviver),` -`)):""}createSVGRefElementsMarkup(){return["background","overlay"].map(e=>{const t=this["".concat(e,"Color")];if(yt(t)){const r=this["".concat(e,"Vpt")],n=this.viewportTransform,s={isType:()=>!1,width:this.width/(r?n[0]:1),height:this.height/(r?n[3]:1)};return t.toSVG(s,{additionalTransform:r?Vi(n):""})}}).join("")}createSVGFontFacesMarkup(){const e=[],t={},r=pe.fontPaths;this._objects.forEach(function s(o){e.push(o),Ti(o)&&o._objects.forEach(s)}),e.forEach(s=>{if(!gf(s))return;const{styles:o,fontFamily:a}=s;!t[a]&&r[a]&&(t[a]=!0,o&&Object.values(o).forEach(l=>{Object.values(l).forEach(c=>{let{fontFamily:u=""}=c;!t[u]&&r[u]&&(t[u]=!0)})}))});const n=Object.keys(t).map(s=>` @font-face { +`)):""}createSVGRefElementsMarkup(){return["background","overlay"].map(e=>{const t=this["".concat(e,"Color")];if(_n(t)){const i=this["".concat(e,"Vpt")],n=this.viewportTransform,s={isType:()=>!1,width:this.width/(i?n[0]:1),height:this.height/(i?n[3]:1)};return t.toSVG(s,{additionalTransform:i?Dh(n):""})}}).join("")}createSVGFontFacesMarkup(){const e=[],t={},i=ri.fontPaths;this._objects.forEach(function s(o){e.push(o),uh(o)&&o._objects.forEach(s)}),e.forEach(s=>{if(!SS(s))return;const{styles:o,fontFamily:a}=s;!t[a]&&i[a]&&(t[a]=!0,o&&Object.values(o).forEach(l=>{Object.values(l).forEach(c=>{let{fontFamily:d=""}=c;!t[d]&&i[d]&&(t[d]=!0)})}))});const n=Object.keys(t).map(s=>` @font-face { font-family: '`.concat(s,`'; - src: url('`).concat(r[s],`'); + src: url('`).concat(i[s],`'); } `)).join("");return n?` -`):""}_setSVGObjects(e,t){this.forEachObject(r=>{r.excludeFromExport||this._setSVGObject(e,r,t)})}_setSVGObject(e,t,r){e.push(t.toSVG(r))}_setSVGBgOverlayImage(e,t,r){const n=this[t];n&&!n.excludeFromExport&&n.toSVG&&e.push(n.toSVG(r))}_setSVGBgOverlayColor(e,t){const r=this["".concat(t,"Color")];if(r)if(yt(r)){const n=r.repeat||"",s=this.width,o=this.height,a=this["".concat(t,"Vpt")]?Vi(Tt(this.viewportTransform)):"";e.push(' -`))}else e.push(' -`)}loadFromJSON(e,t){let{signal:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return Promise.reject(new Ft("`json` is undefined"));const n=typeof e=="string"?JSON.parse(e):e,{objects:s=[],backgroundImage:o,background:a,overlayImage:l,overlay:c,clipPath:u}=n,h=this.renderOnAddRemove;return this.renderOnAddRemove=!1,Promise.all([Pn(s,{reviver:t,signal:r}),as({backgroundImage:o,backgroundColor:a,overlayImage:l,overlayColor:c,clipPath:u},{signal:r})]).then(d=>{let[f,g]=d;return this.clear(),this.add(...f),this.set(n),this.set(g),this.renderOnAddRemove=h,this})}clone(e){const t=this.toObject(e);return this.cloneWithoutData().loadFromJSON(t)}cloneWithoutData(){const e=Xe();return e.width=this.width,e.height=this.height,new this.constructor(e)}toDataURL(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{format:t="png",quality:r=1,multiplier:n=1,enableRetinaScaling:s=!1}=e,o=n*(s?this.getRetinaScaling():1);return cf(this.toCanvasElement(o,e),t,r)}toCanvasElement(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,{width:t,height:r,left:n,top:s,filter:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const a=(t||this.width)*e,l=(r||this.height)*e,c=this.getZoom(),u=this.width,h=this.height,d=this.skipControlsDrawing,f=c*e,g=this.viewportTransform,m=[f,0,0,f,(g[4]-(n||0))*e,(g[5]-(s||0))*e],v=this.enableRetinaScaling,p=Xe(),b=o?this._objects.filter(C=>o(C)):this._objects;return p.width=a,p.height=l,this.enableRetinaScaling=!1,this.viewportTransform=m,this.width=a,this.height=l,this.skipControlsDrawing=!0,this.calcViewportBoundaries(),this.renderCanvas(p.getContext("2d"),b),this.viewportTransform=g,this.width=u,this.height=h,this.calcViewportBoundaries(),this.enableRetinaScaling=v,this.skipControlsDrawing=d,p}dispose(){return!this.disposed&&this.elements.cleanupDOM({width:this.width,height:this.height}),Bi.cancelByCanvas(this),this.disposed=!0,new Promise((e,t)=>{const r=()=>{this.destroy(),e(!0)};r.kill=t,this.__cleanupTask&&this.__cleanupTask.kill("aborted"),this.destroyed?e(!1):this.nextRenderHandle?this.__cleanupTask=r:r()})}destroy(){this.destroyed=!0,this.cancelRequestedRender(),this.forEachObject(e=>e.dispose()),this._objects=[],this.backgroundImage&&this.backgroundImage.dispose(),this.backgroundImage=void 0,this.overlayImage&&this.overlayImage.dispose(),this.overlayImage=void 0,this.elements.dispose()}toString(){return"#")}}M(Yn,"ownDefaults",d0);const g0=["touchstart","touchmove","touchend"],m0=i=>{const e=mf(i.target),t=function(r){const n=r.changedTouches;return n&&n[0]?n[0]:r}(i);return new L(t.clientX+e.left,t.clientY+e.top)},ia=i=>g0.includes(i.type)||i.pointerType==="touch",sa=i=>{i.preventDefault(),i.stopPropagation()},Ut=i=>{let e=0,t=0,r=0,n=0;for(let s=0,o=i.length;sr||!s)&&(r=a),(an||!s)&&(n=l),(lYi(i,Ye(e,i.calcOwnMatrix())),Yi=(i,e)=>{const t=zi(e),{translateX:r,translateY:n,scaleX:s,scaleY:o}=t,a=De(t,p0),l=new L(r,n);i.flipX=!1,i.flipY=!1,Object.assign(i,a),i.set({scaleX:s,scaleY:o}),i.setPositionByOrigin(l,ue,ue)},_0=i=>{i.scaleX=1,i.scaleY=1,i.skewX=0,i.skewY=0,i.flipX=!1,i.flipY=!1,i.rotate(0)},bf=i=>({scaleX:i.scaleX,scaleY:i.scaleY,skewX:i.skewX,skewY:i.skewY,angle:i.angle,left:i.left,flipX:i.flipX,flipY:i.flipY,top:i.top}),Ua=(i,e,t)=>{const r=i/2,n=e/2,s=[new L(-r,-n),new L(r,-n),new L(-r,n),new L(r,n)].map(a=>a.transform(t)),o=Ut(s);return new L(o.width,o.height)},ls=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:st;return Ye(Tt(arguments.length>1&&arguments[1]!==void 0?arguments[1]:st),i)},or=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:st,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:st;return i.transform(ls(e,t))},b0=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:st,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:st;return i.transform(ls(e,t),!0)},y0=(i,e,t)=>{const r=ls(e,t);return Yi(i,Ye(r,i.calcOwnMatrix())),r},Ka=(i,e)=>{var t;const{transform:{target:r}}=e;(t=r.canvas)===null||t===void 0||t.fire("object:".concat(i),D(D({},e),{},{target:r})),r.fire(i,e)},w0={left:-.5,top:-.5,center:0,bottom:.5,right:.5},Be=i=>typeof i=="string"?w0[i]:i-.5,Xi="not-allowed";function yf(i){return Be(i.originX)===Be(ue)&&Be(i.originY)===Be(ue)}function Wc(i){return .5-Be(i)}const Et=(i,e)=>i[e],Za=(i,e,t,r)=>({e:i,transform:e,pointer:new L(t,r)});function wf(i,e){const t=i.getTotalAngle()+kr(Math.atan2(e.y,e.x))+360;return Math.round(t%360/45)}function cs(i,e,t,r,n){var s;let{target:o,corner:a}=i;const l=o.controls[a],c=((s=o.canvas)===null||s===void 0?void 0:s.getZoom())||1,u=o.padding/c,h=function(d,f,g,m){const v=d.getRelativeCenterPoint(),p=g!==void 0&&m!==void 0?d.translateToGivenOrigin(v,ue,ue,g,m):new L(d.left,d.top);return(d.angle?f.rotate(-Fe(d.angle),v):f).subtract(p)}(o,new L(r,n),e,t);return h.x>=u&&(h.x-=u),h.x<=-u&&(h.x+=u),h.y>=u&&(h.y-=u),h.y<=u&&(h.y+=u),h.x-=l.offsetX,h.y-=l.offsetY,h}const Cf=(i,e,t,r)=>{const{target:n,offsetX:s,offsetY:o}=e,a=t-s,l=r-o,c=!Et(n,"lockMovementX")&&n.left!==a,u=!Et(n,"lockMovementY")&&n.top!==l;return c&&n.set(Ce,a),u&&n.set(ut,l),(c||u)&&Ka(rf,Za(i,e,t,r)),c||u};class xf{getSvgStyles(e){const t=this.fillRule?this.fillRule:"nonzero",r=this.strokeWidth?this.strokeWidth:"0",n=this.strokeDashArray?this.strokeDashArray.join(" "):ht,s=this.strokeDashOffset?this.strokeDashOffset:"0",o=this.strokeLineCap?this.strokeLineCap:"butt",a=this.strokeLineJoin?this.strokeLineJoin:"miter",l=this.strokeMiterLimit?this.strokeMiterLimit:"4",c=this.opacity!==void 0?this.opacity:"1",u=this.visible?"":" visibility: hidden;",h=e?"":this.getSvgFilter(),d=An(ze,this.fill);return[An(ft,this.stroke),"stroke-width: ",r,"; ","stroke-dasharray: ",n,"; ","stroke-linecap: ",o,"; ","stroke-dashoffset: ",s,"; ","stroke-linejoin: ",a,"; ","stroke-miterlimit: ",l,"; ",d,"fill-rule: ",t,"; ","opacity: ",c,";",h,u].join("")}getSvgFilter(){return this.shadow?"filter: url(#SVGID_".concat(this.shadow.id,");"):""}getSvgCommons(){return[this.id?'id="'.concat(this.id,'" '):"",this.clipPath?'clip-path="url(#'.concat(this.clipPath.clipPathId,')" '):""].join("")}getSvgTransform(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e?this.calcTransformMatrix():this.calcOwnMatrix(),n='transform="'.concat(Vi(r));return"".concat(n).concat(t,'" ')}_toSVG(e){return[""]}toSVG(e){return this._createBaseSVGMarkup(this._toSVG(e),{reviver:e})}toClipPathSVG(e){return" "+this._createBaseClipPathSVGMarkup(this._toSVG(e),{reviver:e})}_createBaseClipPathSVGMarkup(e){let{reviver:t,additionalTransform:r=""}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=[this.getSvgTransform(!0,r),this.getSvgCommons()].join(""),s=e.indexOf("COMMON_PARTS");return e[s]=n,t?t(e.join("")):e.join("")}_createBaseSVGMarkup(e){let{noStyle:t,reviver:r,withShadow:n,additionalTransform:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=t?"":'style="'.concat(this.getSvgStyles(),'" '),a=n?'style="'.concat(this.getSvgFilter(),'" '):"",l=this.clipPath,c=this.strokeUniform?'vector-effect="non-scaling-stroke" ':"",u=l&&l.absolutePositioned,h=this.stroke,d=this.fill,f=this.shadow,g=[],m=e.indexOf("COMMON_PARTS");let v;l&&(l.clipPathId="CLIPPATH_".concat(lr()),v=' -`).concat(l.toClipPathSVG(r),` -`)),u&&g.push(" -`),g.push(" -`);const p=[o,c,t?"":this.addPaintOrder()," ",s?'transform="'.concat(s,'" '):""].join("");return e[m]=p,yt(d)&&g.push(d.toSVG(this)),yt(h)&&g.push(h.toSVG(this)),f&&g.push(f.toSVG(this)),l&&g.push(v),g.push(e.join("")),g.push(` -`),u&&g.push(` -`),r?r(g.join("")):g.join("")}addPaintOrder(){return this.paintFirst!==ze?' paint-order="'.concat(this.paintFirst,'" '):""}}function us(i){return new RegExp("^("+i.join("|")+")\\b","i")}var Gc;const Sr=String.raw(Gc||(Gc=hr(["(?:[-+]?(?:d*.d+|d+.?)(?:[eE][-+]?d+)?)"],["(?:[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?)"]))),C0=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+Sr+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+Sr+"))?\\s+(.*)"),x0={cx:Ce,x:Ce,r:"radius",cy:ut,y:ut,display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","letter-spacing":"charSpacing","paint-order":"paintFirst","stroke-dasharray":"strokeDashArray","stroke-dashoffset":"strokeDashOffset","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"textAnchor",opacity:"opacity","clip-path":"clipPath","clip-rule":"clipRule","vector-effect":"strokeUniform","image-rendering":"imageSmoothing"},Fo="font-size",Ro="clip-path";us(["path","circle","polygon","polyline","ellipse","rect","line","image","text"]);us(["symbol","image","marker","pattern","view","svg"]);const Hc=us(["symbol","g","a","svg","clipPath","defs"]),k0=new L(1,0),kf=new L,Sf=(i,e)=>i.rotate(e),oa=(i,e)=>new L(e).subtract(i),aa=i=>i.distanceFrom(kf),la=(i,e)=>Math.atan2(kn(i,e),T0(i,e)),S0=i=>la(k0,i),Ja=i=>i.eq(kf)?i:i.scalarDivide(aa(i)),Tf=function(i){let e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return Ja(new L(-i.y,i.x).scalarMultiply(e?1:-1))},kn=(i,e)=>i.x*e.y-i.y*e.x,T0=(i,e)=>i.x*e.x+i.y*e.y,qc=(i,e,t)=>{if(i.eq(e)||i.eq(t))return!0;const r=kn(e,t),n=kn(e,i),s=kn(t,i);return r>=0?n>=0&&s<=0:!(n<=0&&s>=0)},Uc="(-?\\d+(?:\\.\\d*)?(?:px)?(?:\\s?|$))?",Kc=new RegExp("(?:\\s|^)"+Uc+Uc+"("+Sr+"?(?:px)?)?(?:\\s?|$)(?:$|\\s)");class Kt{constructor(e){const t=typeof e=="string"?Kt.parseShadow(e):e;Object.assign(this,Kt.ownDefaults,t),this.id=lr()}static parseShadow(e){const t=e.trim(),[,r=0,n=0,s=0]=(Kc.exec(t)||[]).map(o=>parseFloat(o)||0);return{color:(t.replace(Kc,"")||"rgb(0,0,0)").trim(),offsetX:r,offsetY:n,blur:s}}toString(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")}toSVG(e){const t=Sf(new L(this.offsetX,this.offsetY),Fe(-e.angle)),r=new ke(this.color);let n=40,s=40;return e.width&&e.height&&(n=100*Ae((Math.abs(t.x)+this.blur)/e.width,pe.NUM_FRACTION_DIGITS)+20,s=100*Ae((Math.abs(t.y)+this.blur)/e.height,pe.NUM_FRACTION_DIGITS)+20),e.flipX&&(t.x*=-1),e.flipY&&(t.y*=-1),' - - - +`):""}_setSVGObjects(e,t){this.forEachObject(i=>{i.excludeFromExport||this._setSVGObject(e,i,t)})}_setSVGObject(e,t,i){e.push(t.toSVG(i))}_setSVGBgOverlayImage(e,t,i){const n=this[t];n&&!n.excludeFromExport&&n.toSVG&&e.push(n.toSVG(i))}_setSVGBgOverlayColor(e,t){const i=this["".concat(t,"Color")];if(i)if(_n(i)){const n=i.repeat||"",s=this.width,o=this.height,a=this["".concat(t,"Vpt")]?Dh(Rn(this.viewportTransform)):"";e.push(' +`))}else e.push(' +`)}loadFromJSON(e,t){let{signal:i}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return Promise.reject(new Jn("`json` is undefined"));const n=typeof e=="string"?JSON.parse(e):e,{objects:s=[],backgroundImage:o,background:a,overlayImage:l,overlay:c,clipPath:d}=n,u=this.renderOnAddRemove;return this.renderOnAddRemove=!1,Promise.all([Jc(s,{reviver:t,signal:i}),pf({backgroundImage:o,backgroundColor:a,overlayImage:l,overlayColor:c,clipPath:d},{signal:i})]).then(h=>{let[f,m]=h;return this.clear(),this.add(...f),this.set(n),this.set(m),this.renderOnAddRemove=u,this})}clone(e){const t=this.toObject(e);return this.cloneWithoutData().loadFromJSON(t)}cloneWithoutData(){const e=mr();return e.width=this.width,e.height=this.height,new this.constructor(e)}toDataURL(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{format:t="png",quality:i=1,multiplier:n=1,enableRetinaScaling:s=!1}=e,o=n*(s?this.getRetinaScaling():1);return _S(this.toCanvasElement(o,e),t,i)}toCanvasElement(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,{width:t,height:i,left:n,top:s,filter:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const a=(t||this.width)*e,l=(i||this.height)*e,c=this.getZoom(),d=this.width,u=this.height,h=this.skipControlsDrawing,f=c*e,m=this.viewportTransform,p=[f,0,0,f,(m[4]-(n||0))*e,(m[5]-(s||0))*e],g=this.enableRetinaScaling,v=mr(),b=o?this._objects.filter(S=>o(S)):this._objects;return v.width=a,v.height=l,this.enableRetinaScaling=!1,this.viewportTransform=p,this.width=a,this.height=l,this.skipControlsDrawing=!0,this.calcViewportBoundaries(),this.renderCanvas(v.getContext("2d"),b),this.viewportTransform=m,this.width=d,this.height=u,this.calcViewportBoundaries(),this.enableRetinaScaling=g,this.skipControlsDrawing=h,v}dispose(){return!this.disposed&&this.elements.cleanupDOM({width:this.width,height:this.height}),Lh.cancelByCanvas(this),this.disposed=!0,new Promise((e,t)=>{const i=()=>{this.destroy(),e(!0)};i.kill=t,this.__cleanupTask&&this.__cleanupTask.kill("aborted"),this.destroyed?e(!1):this.nextRenderHandle?this.__cleanupTask=i:i()})}destroy(){this.destroyed=!0,this.cancelRequestedRender(),this.forEachObject(e=>e.dispose()),this._objects=[],this.backgroundImage&&this.backgroundImage.dispose(),this.backgroundImage=void 0,this.overlayImage&&this.overlayImage.dispose(),this.overlayImage=void 0,this.elements.dispose()}toString(){return"#")}}Z(vd,"ownDefaults",a5);const l5=["touchstart","touchmove","touchend"],c5=r=>{const e=TS(r.target),t=function(i){const n=i.changedTouches;return n&&n[0]?n[0]:i}(r);return new ve(t.clientX+e.left,t.clientY+e.top)},Qg=r=>l5.includes(r.type)||r.pointerType==="touch",$g=r=>{r.preventDefault(),r.stopPropagation()},Es=r=>{let e=0,t=0,i=0,n=0;for(let s=0,o=r.length;si||!s)&&(i=a),(an||!s)&&(n=l),(lMh(r,fr(e,r.calcOwnMatrix())),Mh=(r,e)=>{const t=Ph(e),{translateX:i,translateY:n,scaleX:s,scaleY:o}=t,a=Mi(t,d5),l=new ve(i,n);r.flipX=!1,r.flipY=!1,Object.assign(r,a),r.set({scaleX:s,scaleY:o}),r.setPositionByOrigin(l,Zt,Zt)},h5=r=>{r.scaleX=1,r.scaleY=1,r.skewX=0,r.skewY=0,r.flipX=!1,r.flipY=!1,r.rotate(0)},AS=r=>({scaleX:r.scaleX,scaleY:r.scaleY,skewX:r.skewX,skewY:r.skewY,angle:r.angle,left:r.left,flipX:r.flipX,flipY:r.flipY,top:r.top}),dv=(r,e,t)=>{const i=r/2,n=e/2,s=[new ve(-i,-n),new ve(i,-n),new ve(-i,n),new ve(i,n)].map(a=>a.transform(t)),o=Es(s);return new ve(o.width,o.height)},gf=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ur;return fr(Rn(arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ur),r)},vo=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ur,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ur;return r.transform(gf(e,t))},f5=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ur,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ur;return r.transform(gf(e,t),!0)},m5=(r,e,t)=>{const i=gf(e,t);return Mh(r,fr(i,r.calcOwnMatrix())),i},uv=(r,e)=>{var t;const{transform:{target:i}}=e;(t=i.canvas)===null||t===void 0||t.fire("object:".concat(r),q(q({},e),{},{target:i})),i.fire(r,e)},p5={left:-.5,top:-.5,center:0,bottom:.5,right:.5},sr=r=>typeof r=="string"?p5[r]:r-.5,Rh="not-allowed";function OS(r){return sr(r.originX)===sr(Zt)&&sr(r.originY)===sr(Zt)}function Ab(r){return .5-sr(r)}const Nn=(r,e)=>r[e],hv=(r,e,t,i)=>({e:r,transform:e,pointer:new ve(t,i)});function IS(r,e){const t=r.getTotalAngle()+aa(Math.atan2(e.y,e.x))+360;return Math.round(t%360/45)}function vf(r,e,t,i,n){var s;let{target:o,corner:a}=r;const l=o.controls[a],c=((s=o.canvas)===null||s===void 0?void 0:s.getZoom())||1,d=o.padding/c,u=function(h,f,m,p){const g=h.getRelativeCenterPoint(),v=m!==void 0&&p!==void 0?h.translateToGivenOrigin(g,Zt,Zt,m,p):new ve(h.left,h.top);return(h.angle?f.rotate(-$i(h.angle),g):f).subtract(v)}(o,new ve(i,n),e,t);return u.x>=d&&(u.x-=d),u.x<=-d&&(u.x+=d),u.y>=d&&(u.y-=d),u.y<=d&&(u.y+=d),u.x-=l.offsetX,u.y-=l.offsetY,u}const LS=(r,e,t,i)=>{const{target:n,offsetX:s,offsetY:o}=e,a=t-s,l=i-o,c=!Nn(n,"lockMovementX")&&n.left!==a,d=!Nn(n,"lockMovementY")&&n.top!==l;return c&&n.set(hi,a),d&&n.set(Jr,l),(c||d)&&uv(hS,hv(r,e,t,i)),c||d};class PS{getSvgStyles(e){const t=this.fillRule?this.fillRule:"nonzero",i=this.strokeWidth?this.strokeWidth:"0",n=this.strokeDashArray?this.strokeDashArray.join(" "):Qr,s=this.strokeDashOffset?this.strokeDashOffset:"0",o=this.strokeLineCap?this.strokeLineCap:"butt",a=this.strokeLineJoin?this.strokeLineJoin:"miter",l=this.strokeMiterLimit?this.strokeMiterLimit:"4",c=this.opacity!==void 0?this.opacity:"1",d=this.visible?"":" visibility: hidden;",u=e?"":this.getSvgFilter(),h=Qc(or,this.fill);return[Qc($r,this.stroke),"stroke-width: ",i,"; ","stroke-dasharray: ",n,"; ","stroke-linecap: ",o,"; ","stroke-dashoffset: ",s,"; ","stroke-linejoin: ",a,"; ","stroke-miterlimit: ",l,"; ",h,"fill-rule: ",t,"; ","opacity: ",c,";",u,d].join("")}getSvgFilter(){return this.shadow?"filter: url(#SVGID_".concat(this.shadow.id,");"):""}getSvgCommons(){return[this.id?'id="'.concat(this.id,'" '):"",this.clipPath?'clip-path="url(#'.concat(this.clipPath.clipPathId,')" '):""].join("")}getSvgTransform(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e?this.calcTransformMatrix():this.calcOwnMatrix(),n='transform="'.concat(Dh(i));return"".concat(n).concat(t,'" ')}_toSVG(e){return[""]}toSVG(e){return this._createBaseSVGMarkup(this._toSVG(e),{reviver:e})}toClipPathSVG(e){return" "+this._createBaseClipPathSVGMarkup(this._toSVG(e),{reviver:e})}_createBaseClipPathSVGMarkup(e){let{reviver:t,additionalTransform:i=""}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=[this.getSvgTransform(!0,i),this.getSvgCommons()].join(""),s=e.indexOf("COMMON_PARTS");return e[s]=n,t?t(e.join("")):e.join("")}_createBaseSVGMarkup(e){let{noStyle:t,reviver:i,withShadow:n,additionalTransform:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=t?"":'style="'.concat(this.getSvgStyles(),'" '),a=n?'style="'.concat(this.getSvgFilter(),'" '):"",l=this.clipPath,c=this.strokeUniform?'vector-effect="non-scaling-stroke" ':"",d=l&&l.absolutePositioned,u=this.stroke,h=this.fill,f=this.shadow,m=[],p=e.indexOf("COMMON_PARTS");let g;l&&(l.clipPathId="CLIPPATH_".concat(yo()),g=' +`).concat(l.toClipPathSVG(i),` +`)),d&&m.push(" +`),m.push(" +`);const v=[o,c,t?"":this.addPaintOrder()," ",s?'transform="'.concat(s,'" '):""].join("");return e[p]=v,_n(h)&&m.push(h.toSVG(this)),_n(u)&&m.push(u.toSVG(this)),f&&m.push(f.toSVG(this)),l&&m.push(g),m.push(e.join("")),m.push(` +`),d&&m.push(` +`),i?i(m.join("")):m.join("")}addPaintOrder(){return this.paintFirst!==or?' paint-order="'.concat(this.paintFirst,'" '):""}}function _f(r){return new RegExp("^("+r.join("|")+")\\b","i")}var Ob;const la=String.raw(Ob||(Ob=So(["(?:[-+]?(?:d*.d+|d+.?)(?:[eE][-+]?d+)?)"],["(?:[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?)"]))),g5=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+la+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+la+"))?\\s+(.*)"),v5={cx:hi,x:hi,r:"radius",cy:Jr,y:Jr,display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","letter-spacing":"charSpacing","paint-order":"paintFirst","stroke-dasharray":"strokeDashArray","stroke-dashoffset":"strokeDashOffset","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"textAnchor",opacity:"opacity","clip-path":"clipPath","clip-rule":"clipRule","vector-effect":"strokeUniform","image-rendering":"imageSmoothing"},ip="font-size",rp="clip-path";_f(["path","circle","polygon","polyline","ellipse","rect","line","image","text"]);_f(["symbol","image","marker","pattern","view","svg"]);const Ib=_f(["symbol","g","a","svg","clipPath","defs"]),_5=new ve(1,0),DS=new ve,MS=(r,e)=>r.rotate(e),e0=(r,e)=>new ve(e).subtract(r),t0=r=>r.distanceFrom(DS),i0=(r,e)=>Math.atan2(jc(r,e),b5(r,e)),y5=r=>i0(_5,r),fv=r=>r.eq(DS)?r:r.scalarDivide(t0(r)),RS=function(r){let e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return fv(new ve(-r.y,r.x).scalarMultiply(e?1:-1))},jc=(r,e)=>r.x*e.y-r.y*e.x,b5=(r,e)=>r.x*e.x+r.y*e.y,Lb=(r,e,t)=>{if(r.eq(e)||r.eq(t))return!0;const i=jc(e,t),n=jc(e,r),s=jc(t,r);return i>=0?n>=0&&s<=0:!(n<=0&&s>=0)},Pb="(-?\\d+(?:\\.\\d*)?(?:px)?(?:\\s?|$))?",Db=new RegExp("(?:\\s|^)"+Pb+Pb+"("+la+"?(?:px)?)?(?:\\s?|$)(?:$|\\s)");class As{constructor(e){const t=typeof e=="string"?As.parseShadow(e):e;Object.assign(this,As.ownDefaults,t),this.id=yo()}static parseShadow(e){const t=e.trim(),[,i=0,n=0,s=0]=(Db.exec(t)||[]).map(o=>parseFloat(o)||0);return{color:(t.replace(Db,"")||"rgb(0,0,0)").trim(),offsetX:i,offsetY:n,blur:s}}toString(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")}toSVG(e){const t=MS(new ve(this.offsetX,this.offsetY),$i(-e.angle)),i=new mi(this.color);let n=40,s=40;return e.width&&e.height&&(n=100*Bi((Math.abs(t.x)+this.blur)/e.width,ri.NUM_FRACTION_DIGITS)+20,s=100*Bi((Math.abs(t.y)+this.blur)/e.height,ri.NUM_FRACTION_DIGITS)+20),e.flipX&&(t.x*=-1),e.flipY&&(t.y*=-1),' + + + -`)}toObject(){const e={color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke,nonScaling:this.nonScaling,type:this.constructor.type},t=Kt.ownDefaults;return this.includeDefaultValues?e:qa(e,(r,n)=>r!==t[n])}static fromObject(e){return Me(this,null,function*(){return new this(e)})}}M(Kt,"ownDefaults",{color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,nonScaling:!1}),M(Kt,"type","shadow"),$.setClass(Kt,"shadow");const Jr=(i,e,t)=>Math.max(i,Math.min(e,t)),E0=[ut,Ce,dt,wt,"flipX","flipY","originX","originY","angle","opacity","globalCompositeOperation","shadow","visible",on,an],Qt=[ze,ft,"strokeWidth","strokeDashArray","width","height","paintFirst","strokeUniform","strokeLineCap","strokeDashOffset","strokeLineJoin","strokeMiterLimit","backgroundColor","clipPath"],O0={top:0,left:0,width:0,height:0,angle:0,flipX:!1,flipY:!1,scaleX:1,scaleY:1,minScaleLimit:0,skewX:0,skewY:0,originX:Ce,originY:ut,strokeWidth:1,strokeUniform:!1,padding:0,opacity:1,paintFirst:ze,fill:"rgb(0,0,0)",fillRule:"nonzero",stroke:null,strokeDashArray:null,strokeDashOffset:0,strokeLineCap:"butt",strokeLineJoin:"miter",strokeMiterLimit:4,globalCompositeOperation:"source-over",backgroundColor:"",shadow:null,visible:!0,includeDefaultValues:!0,excludeFromExport:!1,objectCaching:!0,clipPath:void 0,inverted:!1,absolutePositioned:!1,centeredRotation:!0,centeredScaling:!1,dirty:!0},D0=(i,e,t,r)=>-t*Math.cos(i/r*Bn)+t+e,M0=()=>!1;class Qa{constructor(e){let{startValue:t,byValue:r,duration:n=500,delay:s=0,easing:o=D0,onStart:a=Si,onChange:l=Si,onComplete:c=Si,abort:u=M0,target:h}=e;M(this,"_state","pending"),M(this,"durationProgress",0),M(this,"valueProgress",0),this.tick=this.tick.bind(this),this.duration=n,this.delay=s,this.easing=o,this._onStart=a,this._onChange=l,this._onComplete=c,this._abort=u,this.target=h,this.startValue=t,this.byValue=r,this.value=this.startValue,this.endValue=Object.freeze(this.calculate(this.duration).value)}get state(){return this._state}isDone(){return this._state==="aborted"||this._state==="completed"}start(){const e=t=>{this._state==="pending"&&(this.startTime=t||+new Date,this._state="running",this._onStart(),this.tick(this.startTime))};this.register(),this.delay>0?setTimeout(()=>Ei(e),this.delay):Ei(e)}tick(e){const t=(e||+new Date)-this.startTime,r=Math.min(t,this.duration);this.durationProgress=r/this.duration;const{value:n,valueProgress:s}=this.calculate(r);this.value=Object.freeze(n),this.valueProgress=s,this._state!=="aborted"&&(this._abort(this.value,this.valueProgress,this.durationProgress)?(this._state="aborted",this.unregister()):t>=this.duration?(this.durationProgress=this.valueProgress=1,this._onChange(this.endValue,this.valueProgress,this.durationProgress),this._state="completed",this._onComplete(this.endValue,this.valueProgress,this.durationProgress),this.unregister()):(this._onChange(this.value,this.valueProgress,this.durationProgress),Ei(this.tick)))}register(){Bi.push(this)}unregister(){Bi.remove(this)}abort(){this._state="aborted",this.unregister()}}const P0=["startValue","endValue"];class A0 extends Qa{constructor(e){let{startValue:t=0,endValue:r=100}=e;super(D(D({},De(e,P0)),{},{startValue:t,byValue:r-t}))}calculate(e){const t=this.easing(e,this.startValue,this.byValue,this.duration);return{value:t,valueProgress:Math.abs((t-this.startValue)/this.byValue)}}}const L0=["startValue","endValue"];class j0 extends Qa{constructor(e){let{startValue:t=[0],endValue:r=[100]}=e;super(D(D({},De(e,L0)),{},{startValue:t,byValue:r.map((n,s)=>n-t[s])}))}calculate(e){const t=this.startValue.map((r,n)=>this.easing(e,r,this.byValue[n],this.duration,n));return{value:t,valueProgress:Math.abs((t[0]-this.startValue[0])/this.byValue[0])}}}const F0=["startValue","endValue","easing","onChange","onComplete","abort"],R0=(i,e,t,r)=>e+t*(1-Math.cos(i/r*Bn)),No=i=>i&&((e,t,r)=>i(new ke(e).toRgba(),t,r));class N0 extends Qa{constructor(e){let{startValue:t,endValue:r,easing:n=R0,onChange:s,onComplete:o,abort:a}=e,l=De(e,F0);const c=new ke(t).getSource(),u=new ke(r).getSource();super(D(D({},l),{},{startValue:c,byValue:u.map((h,d)=>h-c[d]),easing:n,onChange:No(s),onComplete:No(o),abort:No(a)}))}calculate(e){const[t,r,n,s]=this.startValue.map((a,l)=>this.easing(e,a,this.byValue[l],this.duration,l)),o=[...[t,r,n].map(Math.round),Jr(0,s,1)];return{value:o,valueProgress:o.map((a,l)=>this.byValue[l]!==0?Math.abs((a-this.startValue[l])/this.byValue[l]):0).find(a=>a!==0)||0}}}function Ef(i){const e=(t=>Array.isArray(t.startValue)||Array.isArray(t.endValue))(i)?new j0(i):new A0(i);return e.start(),e}function I0(i){const e=new N0(i);return e.start(),e}class Pe{constructor(e){this.status=e,this.points=[]}includes(e){return this.points.some(t=>t.eq(e))}append(){for(var e=arguments.length,t=new Array(e),r=0;r!this.includes(n))),this}static isPointContained(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(t.eq(r))return e.eq(t);if(t.x===r.x)return e.x===t.x&&(n||e.y>=Math.min(t.y,r.y)&&e.y<=Math.max(t.y,r.y));if(t.y===r.y)return e.y===t.y&&(n||e.x>=Math.min(t.x,r.x)&&e.x<=Math.max(t.x,r.x));{const s=oa(t,r),o=oa(t,e).divide(s);return n?Math.abs(o.x)===Math.abs(o.y):o.x===o.y&&o.x>=0&&o.x<=1}}static isPointInPolygon(e,t){const r=new L(e).setX(Math.min(e.x-1,...t.map(s=>s.x)));let n=0;for(let s=0;s4&&arguments[4]!==void 0)||arguments[4],o=!(arguments.length>5&&arguments[5]!==void 0)||arguments[5];const a=t.x-e.x,l=t.y-e.y,c=n.x-r.x,u=n.y-r.y,h=e.x-r.x,d=e.y-r.y,f=c*d-u*h,g=a*d-l*h,m=u*a-c*l;if(m!==0){const v=f/m,p=g/m;return(s||0<=v&&v<=1)&&(o||0<=p&&p<=1)?new Pe("Intersection").append(new L(e.x+v*a,e.y+v*l)):new Pe}if(f===0||g===0){const v=s||o||Pe.isPointContained(e,r,n)||Pe.isPointContained(t,r,n)||Pe.isPointContained(r,e,t)||Pe.isPointContained(n,e,t);return new Pe(v?"Coincident":void 0)}return new Pe("Parallel")}static intersectSegmentLine(e,t,r,n){return Pe.intersectLineLine(e,t,r,n,!1,!0)}static intersectSegmentSegment(e,t,r,n){return Pe.intersectLineLine(e,t,r,n,!1,!1)}static intersectLinePolygon(e,t,r){let n=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];const s=new Pe,o=r.length;for(let a,l,c,u=0;u0&&(s.status="Intersection"),s}static intersectSegmentPolygon(e,t,r){return Pe.intersectLinePolygon(e,t,r,!1)}static intersectPolygonPolygon(e,t){const r=new Pe,n=e.length,s=[];for(let o=0;o0&&s.length===e.length?new Pe("Coincident"):(r.points.length>0&&(r.status="Intersection"),r)}static intersectPolygonRectangle(e,t,r){const n=t.min(r),s=t.max(r),o=new L(s.x,n.y),a=new L(n.x,s.y);return Pe.intersectPolygonPolygon(e,[n,o,s,a])}}class B0 extends lf{getX(){return this.getXY().x}setX(e){this.setXY(this.getXY().setX(e))}getY(){return this.getXY().y}setY(e){this.setXY(this.getXY().setY(e))}getRelativeX(){return this.left}setRelativeX(e){this.left=e}getRelativeY(){return this.top}setRelativeY(e){this.top=e}getXY(){const e=this.getRelativeXY();return this.group?lt(e,this.group.calcTransformMatrix()):e}setXY(e,t,r){this.group&&(e=lt(e,Tt(this.group.calcTransformMatrix()))),this.setRelativeXY(e,t,r)}getRelativeXY(){return new L(this.left,this.top)}setRelativeXY(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.originX,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.originY;this.setPositionByOrigin(e,t,r)}isStrokeAccountedForInDimensions(){return!1}getCoords(){const{tl:e,tr:t,br:r,bl:n}=this.aCoords||(this.aCoords=this.calcACoords()),s=[e,t,r,n];if(this.group){const o=this.group.calcTransformMatrix();return s.map(a=>lt(a,o))}return s}intersectsWithRect(e,t){return Pe.intersectPolygonRectangle(this.getCoords(),e,t).status==="Intersection"}intersectsWithObject(e){const t=Pe.intersectPolygonPolygon(this.getCoords(),e.getCoords());return t.status==="Intersection"||t.status==="Coincident"||e.isContainedWithinObject(this)||this.isContainedWithinObject(e)}isContainedWithinObject(e){return this.getCoords().every(t=>e.containsPoint(t))}isContainedWithinRect(e,t){const{left:r,top:n,width:s,height:o}=this.getBoundingRect();return r>=e.x&&r+s<=t.x&&n>=e.y&&n+o<=t.y}isOverlapping(e){return this.intersectsWithObject(e)||this.isContainedWithinObject(e)||e.isContainedWithinObject(this)}containsPoint(e){return Pe.isPointInPolygon(e,this.getCoords())}isOnScreen(){if(!this.canvas)return!1;const{tl:e,br:t}=this.canvas.vptCoords;return!!this.getCoords().some(r=>r.x<=t.x&&r.x>=e.x&&r.y<=t.y&&r.y>=e.y)||!!this.intersectsWithRect(e,t)||this.containsPoint(e.midPointFrom(t))}isPartiallyOnScreen(){if(!this.canvas)return!1;const{tl:e,br:t}=this.canvas.vptCoords;return this.intersectsWithRect(e,t)?!0:this.getCoords().every(r=>(r.x>=t.x||r.x<=e.x)&&(r.y>=t.y||r.y<=e.y))&&this.containsPoint(e.midPointFrom(t))}getBoundingRect(){return Ut(this.getCoords())}getScaledWidth(){return this._getTransformedDimensions().x}getScaledHeight(){return this._getTransformedDimensions().y}scale(e){this._set(dt,e),this._set(wt,e),this.setCoords()}scaleToWidth(e){const t=this.getBoundingRect().width/this.getScaledWidth();return this.scale(e/this.width/t)}scaleToHeight(e){const t=this.getBoundingRect().height/this.getScaledHeight();return this.scale(e/this.height/t)}getCanvasRetinaScaling(){var e;return((e=this.canvas)===null||e===void 0?void 0:e.getRetinaScaling())||1}getTotalAngle(){return this.group?kr(uf(this.calcTransformMatrix())):this.angle}getViewportTransform(){var e;return((e=this.canvas)===null||e===void 0?void 0:e.viewportTransform)||st.concat()}calcACoords(){const e=Vn({angle:this.angle}),{x:t,y:r}=this.getRelativeCenterPoint(),n=zn(t,r),s=Ye(n,e),o=this._getTransformedDimensions(),a=o.x/2,l=o.y/2;return{tl:lt({x:-a,y:-l},s),tr:lt({x:a,y:-l},s),bl:lt({x:-a,y:l},s),br:lt({x:a,y:l},s)}}setCoords(){this.aCoords=this.calcACoords()}transformMatrixKey(){let e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=[];return!e&&this.group&&(t=this.group.transformMatrixKey(e)),t.push(this.top,this.left,this.width,this.height,this.scaleX,this.scaleY,this.angle,this.strokeWidth,this.skewX,this.skewY,+this.flipX,+this.flipY,Be(this.originX),Be(this.originY)),t}calcTransformMatrix(){let e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=this.calcOwnMatrix();if(e||!this.group)return t;const r=this.transformMatrixKey(e),n=this.matrixCache;return n&&n.key.every((s,o)=>s===r[o])?n.value:(this.group&&(t=Ye(this.group.calcTransformMatrix(!1),t)),this.matrixCache={key:r,value:t},t)}calcOwnMatrix(){const e=this.transformMatrixKey(!0),t=this.ownMatrixCache;if(t&&t.key===e)return t.value;const r=this.getRelativeCenterPoint(),n={angle:this.angle,translateX:r.x,translateY:r.y,scaleX:this.scaleX,scaleY:this.scaleY,skewX:this.skewX,skewY:this.skewY,flipX:this.flipX,flipY:this.flipY},s=h0(n);return this.ownMatrixCache={key:e,value:s},s}_getNonTransformedDimensions(){return new L(this.width,this.height).scalarAdd(this.strokeWidth)}_calculateCurrentDimensions(e){return this._getTransformedDimensions(e).transform(this.getViewportTransform(),!0).scalarAdd(2*this.padding)}_getTransformedDimensions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=D({scaleX:this.scaleX,scaleY:this.scaleY,skewX:this.skewX,skewY:this.skewY,width:this.width,height:this.height,strokeWidth:this.strokeWidth},e),r=t.strokeWidth;let n=r,s=0;this.strokeUniform&&(n=0,s=r);const o=t.width+n,a=t.height+n;let l;return l=t.skewX===0&&t.skewY===0?new L(o*t.scaleX,a*t.scaleY):Ua(o,a,os(t)),l.scalarAdd(s)}translateToGivenOrigin(e,t,r,n,s){let o=e.x,a=e.y;const l=Be(n)-Be(t),c=Be(s)-Be(r);if(l||c){const u=this._getTransformedDimensions();o+=l*u.x,a+=c*u.y}return new L(o,a)}translateToCenterPoint(e,t,r){if(t===ue&&r===ue)return e;const n=this.translateToGivenOrigin(e,t,r,ue,ue);return this.angle?n.rotate(Fe(this.angle),e):n}translateToOriginPoint(e,t,r){const n=this.translateToGivenOrigin(e,ue,ue,t,r);return this.angle?n.rotate(Fe(this.angle),e):n}getCenterPoint(){const e=this.getRelativeCenterPoint();return this.group?lt(e,this.group.calcTransformMatrix()):e}getRelativeCenterPoint(){return this.translateToCenterPoint(new L(this.left,this.top),this.originX,this.originY)}getPointByOrigin(e,t){return this.translateToOriginPoint(this.getRelativeCenterPoint(),e,t)}setPositionByOrigin(e,t,r){const n=this.translateToCenterPoint(e,t,r),s=this.translateToOriginPoint(n,this.originX,this.originY);this.set({left:s.x,top:s.y})}_getLeftTopCoords(){return this.translateToOriginPoint(this.getRelativeCenterPoint(),Ce,ut)}}const z0=["type"],V0=["extraParam"];let Xt=class Di extends B0{static getDefaults(){return Di.ownDefaults}get type(){const e=this.constructor.type;return e==="FabricObject"?"object":e.toLowerCase()}set type(e){ar("warn","Setting type has no effect",e)}constructor(e){super(),M(this,"_cacheContext",null),Object.assign(this,Di.ownDefaults),this.setOptions(e)}_createCacheCanvas(){this._cacheCanvas=Xe(),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas(),this.dirty=!0}_limitCacheSize(e){const t=e.width,r=e.height,n=pe.maxCacheSideLimit,s=pe.minCacheSideLimit;if(t<=n&&r<=n&&t*r<=pe.perfLimitSizeTotal)return tc&&(e.zoomX/=t/c,e.width=c,e.capped=!0),r>u&&(e.zoomY/=r/u,e.height=u,e.capped=!0),e}_getCacheCanvasDimensions(){const e=this.getTotalObjectScaling(),t=this._getTransformedDimensions({skewX:0,skewY:0}),r=t.x*e.x/this.scaleX,n=t.y*e.y/this.scaleY;return{width:r+2,height:n+2,zoomX:e.x,zoomY:e.y,x:r,y:n}}_updateCacheCanvas(){const e=this._cacheCanvas,t=this._cacheContext,r=this._limitCacheSize(this._getCacheCanvasDimensions()),n=pe.minCacheSideLimit,s=r.width,o=r.height,a=r.zoomX,l=r.zoomY,c=s!==e.width||o!==e.height,u=this.zoomX!==a||this.zoomY!==l;if(!e||!t)return!1;let h,d,f=c||u,g=0,m=0,v=!1;if(c){const p=this._cacheCanvas.width,b=this._cacheCanvas.height,C=s>p||o>b;v=C||(s<.9*p||o<.9*b)&&p>n&&b>n,C&&!r.capped&&(s>n||o>n)&&(g=.1*s,m=.1*o)}return gf(this)&&this.path&&(f=!0,v=!0,g+=this.getHeightOfLine(0)*this.zoomX,m+=this.getHeightOfLine(0)*this.zoomY),!!f&&(v?(e.width=Math.ceil(s+g),e.height=Math.ceil(o+m)):(t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height)),h=r.x/2,d=r.y/2,this.cacheTranslationX=Math.round(e.width/2-h)+h,this.cacheTranslationY=Math.round(e.height/2-d)+d,t.translate(this.cacheTranslationX,this.cacheTranslationY),t.scale(a,l),this.zoomX=a,this.zoomY=l,!0)}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._setOptions(e)}transform(e){const t=this.group&&!this.group._transformDone||this.group&&this.canvas&&e===this.canvas.contextTop,r=this.calcTransformMatrix(!t);e.transform(r[0],r[1],r[2],r[3],r[4],r[5])}getObjectScaling(){if(!this.group)return new L(Math.abs(this.scaleX),Math.abs(this.scaleY));const e=zi(this.calcTransformMatrix());return new L(Math.abs(e.scaleX),Math.abs(e.scaleY))}getTotalObjectScaling(){const e=this.getObjectScaling();if(this.canvas){const t=this.canvas.getZoom(),r=this.getCanvasRetinaScaling();return e.scalarMultiply(t*r)}return e}getObjectOpacity(){let e=this.opacity;return this.group&&(e*=this.group.getObjectOpacity()),e}_constrainScale(e){return Math.abs(e)0&&arguments[0]!==void 0&&arguments[0];if(this.isNotVisible())return!1;const t=this._cacheCanvas,r=this._cacheContext;return!(!t||!r||e||!this._updateCacheCanvas())||!!(this.dirty||this.clipPath&&this.clipPath.absolutePositioned)&&(t&&r&&!e&&(r.save(),r.setTransform(1,0,0,1,0,0),r.clearRect(0,0,t.width,t.height),r.restore()),!0)}_renderBackground(e){if(!this.backgroundColor)return;const t=this._getNonTransformedDimensions();e.fillStyle=this.backgroundColor,e.fillRect(-t.x/2,-t.y/2,t.x,t.y),this._removeShadow(e)}_setOpacity(e){this.group&&!this.group._transformDone?e.globalAlpha=this.getObjectOpacity():e.globalAlpha*=this.opacity}_setStrokeStyles(e,t){const r=t.stroke;r&&(e.lineWidth=t.strokeWidth,e.lineCap=t.strokeLineCap,e.lineDashOffset=t.strokeDashOffset,e.lineJoin=t.strokeLineJoin,e.miterLimit=t.strokeMiterLimit,yt(r)?r.gradientUnits==="percentage"||r.gradientTransform||r.patternTransform?this._applyPatternForTransformedGradient(e,r):(e.strokeStyle=r.toLive(e),this._applyPatternGradientTransform(e,r)):e.strokeStyle=t.stroke)}_setFillStyles(e,t){let{fill:r}=t;r&&(yt(r)?(e.fillStyle=r.toLive(e),this._applyPatternGradientTransform(e,r)):e.fillStyle=r)}_setClippingProperties(e){e.globalAlpha=1,e.strokeStyle="transparent",e.fillStyle="#000000"}_setLineDash(e,t){t&&t.length!==0&&(1&t.length&&t.push(...t),e.setLineDash(t))}_setShadow(e){if(!this.shadow)return;const t=this.shadow,r=this.canvas,n=this.getCanvasRetinaScaling(),[s,,,o]=(r==null?void 0:r.viewportTransform)||st,a=s*n,l=o*n,c=t.nonScaling?new L(1,1):this.getObjectScaling();e.shadowColor=t.color,e.shadowBlur=t.blur*pe.browserShadowBlurConstant*(a+l)*(c.x+c.y)/4,e.shadowOffsetX=t.offsetX*a*c.x,e.shadowOffsetY=t.offsetY*l*c.y}_removeShadow(e){this.shadow&&(e.shadowColor="",e.shadowBlur=e.shadowOffsetX=e.shadowOffsetY=0)}_applyPatternGradientTransform(e,t){if(!yt(t))return{offsetX:0,offsetY:0};const r=t.gradientTransform||t.patternTransform,n=-this.width/2+t.offsetX||0,s=-this.height/2+t.offsetY||0;return t.gradientUnits==="percentage"?e.transform(this.width,0,0,this.height,n,s):e.transform(1,0,0,1,n,s),r&&e.transform(r[0],r[1],r[2],r[3],r[4],r[5]),{offsetX:n,offsetY:s}}_renderPaintInOrder(e){this.paintFirst===ft?(this._renderStroke(e),this._renderFill(e)):(this._renderFill(e),this._renderStroke(e))}_render(e){}_renderFill(e){this.fill&&(e.save(),this._setFillStyles(e,this),this.fillRule==="evenodd"?e.fill("evenodd"):e.fill(),e.restore())}_renderStroke(e){if(this.stroke&&this.strokeWidth!==0){if(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(e),e.save(),this.strokeUniform){const t=this.getObjectScaling();e.scale(1/t.x,1/t.y)}this._setLineDash(e,this.strokeDashArray),this._setStrokeStyles(e,this),e.stroke(),e.restore()}}_applyPatternForTransformedGradient(e,t){var r;const n=this._limitCacheSize(this._getCacheCanvasDimensions()),s=Xe(),o=this.getCanvasRetinaScaling(),a=n.x/this.scaleX/o,l=n.y/this.scaleY/o;s.width=Math.ceil(a),s.height=Math.ceil(l);const c=s.getContext("2d");c&&(c.beginPath(),c.moveTo(0,0),c.lineTo(a,0),c.lineTo(a,l),c.lineTo(0,l),c.closePath(),c.translate(a/2,l/2),c.scale(n.zoomX/this.scaleX/o,n.zoomY/this.scaleY/o),this._applyPatternGradientTransform(c,t),c.fillStyle=t.toLive(e),c.fill(),e.translate(-this.width/2-this.strokeWidth/2,-this.height/2-this.strokeWidth/2),e.scale(o*this.scaleX/n.zoomX,o*this.scaleY/n.zoomY),e.strokeStyle=(r=c.createPattern(s,"no-repeat"))!==null&&r!==void 0?r:"")}_findCenterFromElement(){return new L(this.left+this.width/2,this.top+this.height/2)}clone(e){const t=this.toObject(e);return this.constructor.fromObject(t)}cloneAsImage(e){const t=this.toCanvasElement(e);return new($.getClass("image"))(t)}toCanvasElement(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=bf(this),r=this.group,n=this.shadow,s=Math.abs,o=e.enableRetinaScaling?tf():1,a=(e.multiplier||1)*o,l=e.canvasProvider||(b=>new Yn(b,{enableRetinaScaling:!1,renderOnAddRemove:!1,skipOffscreen:!1}));delete this.group,e.withoutTransform&&_0(this),e.withoutShadow&&(this.shadow=null),e.viewportTransform&&y0(this,this.getViewportTransform()),this.setCoords();const c=Xe(),u=this.getBoundingRect(),h=this.shadow,d=new L;if(h){const b=h.blur,C=h.nonScaling?new L(1,1):this.getObjectScaling();d.x=2*Math.round(s(h.offsetX)+b)*s(C.x),d.y=2*Math.round(s(h.offsetY)+b)*s(C.y)}const f=u.width+d.x,g=u.height+d.y;c.width=Math.ceil(f),c.height=Math.ceil(g);const m=l(c);e.format==="jpeg"&&(m.backgroundColor="#fff"),this.setPositionByOrigin(new L(m.width/2,m.height/2),ue,ue);const v=this.canvas;m._objects=[this],this.set("canvas",m),this.setCoords();const p=m.toCanvasElement(a||1,e);return this.set("canvas",v),this.shadow=n,r&&(this.group=r),this.set(t),this.setCoords(),m._objects=[],m.destroy(),p}toDataURL(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return cf(this.toCanvasElement(e),e.format||"png",e.quality||1)}isType(){for(var e=arguments.length,t=new Array(e),r=0;r{let[s,o]=n;return r[s]=this._animate(s,o,t),r},{})}_animate(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=e.split("."),s=this.constructor.colorProperties.includes(n[n.length-1]),{abort:o,startValue:a,onChange:l,onComplete:c}=r,u=D(D({},r),{},{target:this,startValue:a!=null?a:n.reduce((h,d)=>h[d],this),endValue:t,abort:o==null?void 0:o.bind(this),onChange:(h,d,f)=>{n.reduce((g,m,v)=>(v===n.length-1&&(g[m]=h),g[m]),this),l&&l(h,d,f)},onComplete:(h,d,f)=>{this.setCoords(),c&&c(h,d,f)}});return s?I0(u):Ef(u)}isDescendantOf(e){const{parent:t,group:r}=this;return t===e||r===e||!!t&&t.isDescendantOf(e)||!!r&&r!==t&&r.isDescendantOf(e)}getAncestors(){const e=[];let t=this;do t=t.parent,t&&e.push(t);while(t);return e}findCommonAncestors(e){if(this===e)return{fork:[],otherFork:[],common:[this,...this.getAncestors()]};const t=this.getAncestors(),r=e.getAncestors();if(t.length===0&&r.length>0&&this===r[r.length-1])return{fork:[],otherFork:[e,...r.slice(0,r.length-1)],common:[this]};for(let n,s=0;s-1&&o>a}toObject(){const e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).concat(Di.customProperties,this.constructor.customProperties||[]);let t;const r=pe.NUM_FRACTION_DIGITS,{clipPath:n,fill:s,stroke:o,shadow:a,strokeDashArray:l,left:c,top:u,originX:h,originY:d,width:f,height:g,strokeWidth:m,strokeLineCap:v,strokeDashOffset:p,strokeLineJoin:b,strokeUniform:C,strokeMiterLimit:y,scaleX:w,scaleY:x,angle:k,flipX:S,flipY:O,opacity:_,visible:W,backgroundColor:F,fillRule:R,paintFirst:A,globalCompositeOperation:E,skewX:P,skewY:T}=this;n&&!n.excludeFromExport&&(t=n.toObject(e.concat("inverted","absolutePositioned")));const N=B=>Ae(B,r),q=D(D({},ln(this,e)),{},{type:this.constructor.type,version:ta,originX:h,originY:d,left:N(c),top:N(u),width:N(f),height:N(g),fill:Vc(s)?s.toObject():s,stroke:Vc(o)?o.toObject():o,strokeWidth:N(m),strokeDashArray:l&&l.concat(),strokeLineCap:v,strokeDashOffset:p,strokeLineJoin:b,strokeUniform:C,strokeMiterLimit:N(y),scaleX:N(w),scaleY:N(x),angle:N(k),flipX:S,flipY:O,opacity:N(_),shadow:a&&a.toObject(),visible:W,backgroundColor:F,fillRule:R,paintFirst:A,globalCompositeOperation:E,skewX:N(P),skewY:N(T)},t?{clipPath:t}:null);return this.includeDefaultValues?q:this._removeDefaultValues(q)}toDatalessObject(e){return this.toObject(e)}_removeDefaultValues(e){const t=this.constructor.getDefaults(),r=Object.keys(t).length>0?t:Object.getPrototypeOf(this);return qa(e,(n,s)=>{if(s===Ce||s===ut||s==="type")return!0;const o=r[s];return n!==o&&!(Array.isArray(n)&&Array.isArray(o)&&n.length===0&&o.length===0)})}toString(){return"#<".concat(this.constructor.type,">")}static _fromObject(e){let t=De(e,z0),r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{extraParam:n}=r,s=De(r,V0);return as(t,s).then(o=>n?(delete o[n],new this(t[n],o)):new this(o))}static fromObject(e,t){return this._fromObject(e,t)}};M(Xt,"stateProperties",E0),M(Xt,"cacheProperties",Qt),M(Xt,"ownDefaults",O0),M(Xt,"type","FabricObject"),M(Xt,"colorProperties",[ze,ft,"backgroundColor"]),M(Xt,"customProperties",[]),$.setClass(Xt),$.setClass(Xt,"object");const fr=(i,e,t)=>(r,n,s,o)=>{const a=e(r,n,s,o);return a&&Ka(i,D(D({},Za(r,n,s,o)),t)),a};function Pr(i){return(e,t,r,n)=>{const{target:s,originX:o,originY:a}=t,l=s.getRelativeCenterPoint(),c=s.translateToOriginPoint(l,o,a),u=i(e,t,r,n);return s.setPositionByOrigin(c,t.originX,t.originY),u}}const ca=fr(Mn,Pr((i,e,t,r)=>{const n=cs(e,e.originX,e.originY,t,r);if(Be(e.originX)===Be(ue)||Be(e.originX)===Be(je)&&n.x<0||Be(e.originX)===Be(Ce)&&n.x>0){const{target:s}=e,o=s.strokeWidth/(s.strokeUniform?s.scaleX:1),a=yf(e)?2:1,l=s.width,c=Math.ceil(Math.abs(n.x*a/s.scaleX)-o);return s.set("width",Math.max(c,0)),l!==s.width}return!1}));function Of(i,e,t,r,n){r=r||{};const s=this.sizeX||r.cornerSize||n.cornerSize,o=this.sizeY||r.cornerSize||n.cornerSize,a=r.transparentCorners!==void 0?r.transparentCorners:n.transparentCorners,l=a?ft:ze,c=!a&&(r.cornerStrokeColor||n.cornerStrokeColor);let u,h=e,d=t;i.save(),i.fillStyle=r.cornerColor||n.cornerColor||"",i.strokeStyle=r.cornerStrokeColor||n.cornerStrokeColor||"",s>o?(u=s,i.scale(1,o/s),d=t*s/o):o>s?(u=o,i.scale(s/o,1),h=e*o/s):u=s,i.lineWidth=1,i.beginPath(),i.arc(h,d,u/2,0,Ri,!1),i[l](),c&&i.stroke(),i.restore()}function Df(i,e,t,r,n){r=r||{};const s=this.sizeX||r.cornerSize||n.cornerSize,o=this.sizeY||r.cornerSize||n.cornerSize,a=r.transparentCorners!==void 0?r.transparentCorners:n.transparentCorners,l=a?ft:ze,c=!a&&(r.cornerStrokeColor||n.cornerStrokeColor),u=s/2,h=o/2;i.save(),i.fillStyle=r.cornerColor||n.cornerColor||"",i.strokeStyle=r.cornerStrokeColor||n.cornerStrokeColor||"",i.lineWidth=1,i.translate(e,t);const d=n.getTotalAngle();i.rotate(Fe(d)),i["".concat(l,"Rect")](-u,-h,s,o),c&&i.strokeRect(-u,-h,s,o),i.restore()}class mt{constructor(e){M(this,"visible",!0),M(this,"actionName",ss),M(this,"angle",0),M(this,"x",0),M(this,"y",0),M(this,"offsetX",0),M(this,"offsetY",0),M(this,"sizeX",0),M(this,"sizeY",0),M(this,"touchSizeX",0),M(this,"touchSizeY",0),M(this,"cursorStyle","crosshair"),M(this,"withConnection",!1),Object.assign(this,e)}shouldActivate(e,t,r,n){var s;let{tl:o,tr:a,br:l,bl:c}=n;return((s=t.canvas)===null||s===void 0?void 0:s.getActiveObject())===t&&t.isControlVisible(e)&&Pe.isPointInPolygon(r,[o,a,l,c])}getActionHandler(e,t,r){return this.actionHandler}getMouseDownHandler(e,t,r){return this.mouseDownHandler}getMouseUpHandler(e,t,r){return this.mouseUpHandler}cursorStyleHandler(e,t,r){return t.cursorStyle}getActionName(e,t,r){return t.actionName}getVisibility(e,t){var r,n;return(r=(n=e._controlsVisibility)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:this.visible}setVisibility(e,t,r){this.visible=e}positionHandler(e,t,r,n){return new L(this.x*e.x+this.offsetX,this.y*e.y+this.offsetY).transform(t)}calcCornerCoords(e,t,r,n,s,o){const a=Ga([zn(r,n),Vn({angle:e}),Ha((s?this.touchSizeX:this.sizeX)||t,(s?this.touchSizeY:this.sizeY)||t)]);return{tl:new L(-.5,-.5).transform(a),tr:new L(.5,-.5).transform(a),br:new L(.5,.5).transform(a),bl:new L(-.5,.5).transform(a)}}render(e,t,r,n,s){((n=n||{}).cornerStyle||s.cornerStyle)==="circle"?Of.call(this,e,t,r,n,s):Df.call(this,e,t,r,n,s)}}const Mf=(i,e,t)=>t.lockRotation?Xi:e.cursorStyle,Pf=fr(nf,Pr((i,e,t,r)=>{let{target:n,ex:s,ey:o,theta:a,originX:l,originY:c}=e;const u=n.translateToOriginPoint(n.getRelativeCenterPoint(),l,c);if(Et(n,"lockRotation"))return!1;const h=Math.atan2(o-u.y,s-u.x),d=Math.atan2(r-u.y,t-u.x);let f=kr(d-h+a);if(n.snapAngle&&n.snapAngle>0){const m=n.snapAngle,v=n.snapThreshold||m,p=Math.ceil(f/m)*m,b=Math.floor(f/m)*m;Math.abs(f-b){const r=Af(i,t);if(Lf(t,e.x!==0&&e.y===0?"x":e.x===0&&e.y!==0?"y":"",r))return Xi;const n=wf(t,e);return"".concat(Y0[n],"-resize")};function $a(i,e,t,r){let n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};const s=e.target,o=n.by,a=Af(i,s);let l,c,u,h,d,f;if(Lf(s,o,a))return!1;if(e.gestureScale)c=e.scaleX*e.gestureScale,u=e.scaleY*e.gestureScale;else{if(l=cs(e,e.originX,e.originY,t,r),d=o!=="y"?Math.sign(l.x||e.signX||1):1,f=o!=="x"?Math.sign(l.y||e.signY||1):1,e.signX||(e.signX=d),e.signY||(e.signY=f),Et(s,"lockScalingFlip")&&(e.signX!==d||e.signY!==f))return!1;if(h=s._getTransformedDimensions(),a&&!o){const v=Math.abs(l.x)+Math.abs(l.y),{original:p}=e,b=v/(Math.abs(h.x*p.scaleX/s.scaleX)+Math.abs(h.y*p.scaleY/s.scaleY));c=p.scaleX*b,u=p.scaleY*b}else c=Math.abs(l.x*s.scaleX/h.x),u=Math.abs(l.y*s.scaleY/h.y);yf(e)&&(c*=2,u*=2),e.signX!==d&&o!=="y"&&(e.originX=Wc(e.originX),c*=-1,e.signX=d),e.signY!==f&&o!=="x"&&(e.originY=Wc(e.originY),u*=-1,e.signY=f)}const g=s.scaleX,m=s.scaleY;return o?(o==="x"&&s.set(dt,c),o==="y"&&s.set(wt,u)):(!Et(s,"lockScalingX")&&s.set(dt,c),!Et(s,"lockScalingY")&&s.set(wt,u)),g!==s.scaleX||m!==s.scaleY}const vn=fr(is,Pr((i,e,t,r)=>$a(i,e,t,r))),jf=fr(is,Pr((i,e,t,r)=>$a(i,e,t,r,{by:"x"}))),Ff=fr(is,Pr((i,e,t,r)=>$a(i,e,t,r,{by:"y"}))),X0=["target","ex","ey","skewingSide"],Io={x:{counterAxis:"y",scale:dt,skew:on,lockSkewing:"lockSkewingX",origin:"originX",flip:"flipX"},y:{counterAxis:"x",scale:wt,skew:an,lockSkewing:"lockSkewingY",origin:"originY",flip:"flipY"}},W0=["ns","nesw","ew","nwse"],Rf=(i,e,t)=>{if(e.x!==0&&Et(t,"lockSkewingY")||e.y!==0&&Et(t,"lockSkewingX"))return Xi;const r=wf(t,e)%4;return"".concat(W0[r],"-resize")};function Nf(i,e,t,r,n){const{target:s}=t,{counterAxis:o,origin:a,lockSkewing:l,skew:c,flip:u}=Io[i];if(Et(s,l))return!1;const{origin:h,flip:d}=Io[o],f=Be(t[h])*(s[d]?-1:1),g=-Math.sign(f)*(s[u]?-1:1),m=.5*-((s[c]===0&&cs(t,ue,ue,r,n)[i]>0||s[c]>0?1:-1)*g)+.5;return fr(sf,Pr((p,b,C,y)=>function(w,x,k){let{target:S,ex:O,ey:_,skewingSide:W}=x,F=De(x,X0);const{skew:R}=Io[w],A=k.subtract(new L(O,_)).divide(new L(S.scaleX,S.scaleY))[w],E=S[R],P=F[R],T=Math.tan(Fe(P)),N=w==="y"?S._getTransformedDimensions({scaleX:1,scaleY:1,skewX:0}).x:S._getTransformedDimensions({scaleX:1,scaleY:1}).y,q=2*A*W/Math.max(N,1)+T,B=kr(Math.atan(q));S.set(R,B);const se=E!==S[R];if(se&&w==="y"){const{skewX:fe,scaleX:Se}=S,me=S._getTransformedDimensions({skewY:E}),tt=S._getTransformedDimensions(),Ge=fe!==0?me.x/tt.x:1;Ge!==1&&S.set(dt,Ge*Se)}return se}(i,b,new L(C,y))))(e,D(D({},t),{},{[a]:m,skewingSide:g}),r,n)}const If=(i,e,t,r)=>Nf("x",i,e,t,r),Bf=(i,e,t,r)=>Nf("y",i,e,t,r);function hs(i,e){return i[e.canvas.altActionKey]}const _n=(i,e,t)=>{const r=hs(i,t);return e.x===0?r?on:wt:e.y===0?r?an:dt:""},br=(i,e,t)=>hs(i,t)?Rf(0,e,t):zr(i,e,t),ua=(i,e,t,r)=>hs(i,e.target)?Bf(i,e,t,r):jf(i,e,t,r),ha=(i,e,t,r)=>hs(i,e.target)?If(i,e,t,r):Ff(i,e,t,r),el=()=>({ml:new mt({x:-.5,y:0,cursorStyleHandler:br,actionHandler:ua,getActionName:_n}),mr:new mt({x:.5,y:0,cursorStyleHandler:br,actionHandler:ua,getActionName:_n}),mb:new mt({x:0,y:.5,cursorStyleHandler:br,actionHandler:ha,getActionName:_n}),mt:new mt({x:0,y:-.5,cursorStyleHandler:br,actionHandler:ha,getActionName:_n}),tl:new mt({x:-.5,y:-.5,cursorStyleHandler:zr,actionHandler:vn}),tr:new mt({x:.5,y:-.5,cursorStyleHandler:zr,actionHandler:vn}),bl:new mt({x:-.5,y:.5,cursorStyleHandler:zr,actionHandler:vn}),br:new mt({x:.5,y:.5,cursorStyleHandler:zr,actionHandler:vn}),mtr:new mt({x:0,y:-.5,actionHandler:Pf,cursorStyleHandler:Mf,offsetY:-40,withConnection:!0,actionName:Xa})}),zf=()=>({mr:new mt({x:.5,y:0,actionHandler:ca,cursorStyleHandler:br,actionName:Mn}),ml:new mt({x:-.5,y:0,actionHandler:ca,cursorStyleHandler:br,actionName:Mn})}),Vf=()=>D(D({},el()),zf());class Ln extends Xt{static getDefaults(){return D(D({},super.getDefaults()),Ln.ownDefaults)}constructor(e){super(),Object.assign(this,this.constructor.createControls(),Ln.ownDefaults),this.setOptions(e)}static createControls(){return{controls:el()}}_updateCacheCanvas(){const e=this.canvas;if(this.noScaleCache&&e&&e._currentTransform){const t=e._currentTransform,r=t.target,n=t.action;if(this===r&&n&&n.startsWith(ss))return!1}return super._updateCacheCanvas()}getActiveControl(){const e=this.__corner;return e?{key:e,control:this.controls[e],coord:this.oCoords[e]}:void 0}findControl(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!this.hasControls||!this.canvas)return;this.__corner=void 0;const r=Object.entries(this.oCoords);for(let n=r.length-1;n>=0;n--){const[s,o]=r[n],a=this.controls[s];if(a.shouldActivate(s,this,e,t?o.touchCorner:o.corner))return this.__corner=s,{key:s,control:a,coord:this.oCoords[s]}}}calcOCoords(){const e=this.getViewportTransform(),t=this.getCenterPoint(),r=zn(t.x,t.y),n=Vn({angle:this.getTotalAngle()-(this.group&&this.flipX?180:0)}),s=Ye(r,n),o=Ye(e,s),a=Ye(o,[1/e[0],0,0,1/e[3],0,0]),l=this.group?zi(this.calcTransformMatrix()):void 0;l&&(l.scaleX=Math.abs(l.scaleX),l.scaleY=Math.abs(l.scaleY));const c=this._calculateCurrentDimensions(l),u={};return this.forEachControl((h,d)=>{const f=h.positionHandler(c,a,this,h);u[d]=Object.assign(f,this._calcCornerCoords(h,f))}),u}_calcCornerCoords(e,t){const r=this.getTotalAngle();return{corner:e.calcCornerCoords(r,this.cornerSize,t.x,t.y,!1,this),touchCorner:e.calcCornerCoords(r,this.touchCornerSize,t.x,t.y,!0,this)}}setCoords(){super.setCoords(),this.canvas&&(this.oCoords=this.calcOCoords())}forEachControl(e){for(const t in this.controls)e(this.controls[t],t,this)}drawSelectionBackground(e){if(!this.selectionBackgroundColor||this.canvas&&this.canvas._activeObject!==this)return;e.save();const t=this.getRelativeCenterPoint(),r=this._calculateCurrentDimensions(),n=this.getViewportTransform();e.translate(t.x,t.y),e.scale(1/n[0],1/n[3]),e.rotate(Fe(this.angle)),e.fillStyle=this.selectionBackgroundColor,e.fillRect(-r.x/2,-r.y/2,r.x,r.y),e.restore()}strokeBorders(e,t){e.strokeRect(-t.x/2,-t.y/2,t.x,t.y)}_drawBorders(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=D({hasControls:this.hasControls,borderColor:this.borderColor,borderDashArray:this.borderDashArray},r);e.save(),e.strokeStyle=n.borderColor,this._setLineDash(e,n.borderDashArray),this.strokeBorders(e,t),n.hasControls&&this.drawControlsConnectingLines(e,t),e.restore()}_renderControls(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{hasBorders:r,hasControls:n}=this,s=D({hasBorders:r,hasControls:n},t),o=this.getViewportTransform(),a=s.hasBorders,l=s.hasControls,c=Ye(o,this.calcTransformMatrix()),u=zi(c);e.save(),e.translate(u.translateX,u.translateY),e.lineWidth=1*this.borderScaleFactor,this.group===this.parent&&(e.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),this.flipX&&(u.angle-=180),e.rotate(Fe(this.group?u.angle:this.angle)),a&&this.drawBorders(e,u,t),l&&this.drawControls(e,t),e.restore()}drawBorders(e,t,r){let n;if(r&&r.forActiveSelection||this.group){const s=Ua(this.width,this.height,os(t)),o=this.isStrokeAccountedForInDimensions()?Wa:(this.strokeUniform?new L().scalarAdd(this.canvas?this.canvas.getZoom():1):new L(t.scaleX,t.scaleY)).scalarMultiply(this.strokeWidth);n=s.add(o).scalarAdd(this.borderScaleFactor).scalarAdd(2*this.padding)}else n=this._calculateCurrentDimensions().scalarAdd(this.borderScaleFactor);this._drawBorders(e,n,r)}drawControlsConnectingLines(e,t){let r=!1;e.beginPath(),this.forEachControl((n,s)=>{n.withConnection&&n.getVisibility(this,s)&&(r=!0,e.moveTo(n.x*t.x,n.y*t.y),e.lineTo(n.x*t.x+n.offsetX,n.y*t.y+n.offsetY))}),r&&e.stroke()}drawControls(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};e.save();const r=this.getCanvasRetinaScaling(),{cornerStrokeColor:n,cornerDashArray:s,cornerColor:o}=this,a=D({cornerStrokeColor:n,cornerDashArray:s,cornerColor:o},t);e.setTransform(r,0,0,r,0,0),e.strokeStyle=e.fillStyle=a.cornerColor,this.transparentCorners||(e.strokeStyle=a.cornerStrokeColor),this._setLineDash(e,a.cornerDashArray),this.forEachControl((l,c)=>{if(l.getVisibility(this,c)){const u=this.oCoords[c];l.render(e,u.x,u.y,a,this)}}),e.restore()}isControlVisible(e){return this.controls[e]&&this.controls[e].getVisibility(this,e)}setControlVisible(e,t){this._controlsVisibility||(this._controlsVisibility={}),this._controlsVisibility[e]=t}setControlsVisibility(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Object.entries(e).forEach(t=>{let[r,n]=t;return this.setControlVisible(r,n)})}clearContextTop(e){if(!this.canvas)return;const t=this.canvas.contextTop;if(!t)return;const r=this.canvas.viewportTransform;t.save(),t.transform(r[0],r[1],r[2],r[3],r[4],r[5]),this.transform(t);const n=this.width+4,s=this.height+4;return t.clearRect(-n/2,-s/2,n,s),e||t.restore(),t}onDeselect(e){return!1}onSelect(e){return!1}shouldStartDragging(e){return!1}onDragStart(e){return!1}canDrop(e){return!1}renderDragSourceEffect(e){}renderDropTargetEffect(e){}}function Yf(i,e){return e.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(r=>{r!=="constructor"&&Object.defineProperty(i.prototype,r,Object.getOwnPropertyDescriptor(t.prototype,r)||Object.create(null))})}),i}M(Ln,"ownDefaults",{noScaleCache:!0,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,cornerSize:13,touchCornerSize:24,transparentCorners:!0,cornerColor:"rgb(178,204,255)",cornerStrokeColor:"",cornerStyle:"rect",cornerDashArray:null,hasControls:!0,borderColor:"rgb(178,204,255)",borderDashArray:null,borderOpacityWhenMoving:.4,borderScaleFactor:1,hasBorders:!0,selectionBackgroundColor:"",selectable:!0,evented:!0,perPixelTargetFind:!1,activeOn:"down",hoverCursor:null,moveCursor:null});class et extends Ln{}Yf(et,[xf]),$.setClass(et),$.setClass(et,"object");const G0=(i,e,t,r)=>{const n=2*(r=Math.round(r))+1,{data:s}=i.getImageData(e-r,t-r,n,n);for(let o=3;o0)return!1;return!0};class Xf{constructor(e){this.options=e,this.strokeProjectionMagnitude=this.options.strokeWidth/2,this.scale=new L(this.options.scaleX,this.options.scaleY),this.strokeUniformScalar=this.options.strokeUniform?new L(1/this.options.scaleX,1/this.options.scaleY):new L(1,1)}createSideVector(e,t){const r=oa(e,t);return this.options.strokeUniform?r.multiply(this.scale):r}projectOrthogonally(e,t,r){return this.applySkew(e.add(this.calcOrthogonalProjection(e,t,r)))}isSkewed(){return this.options.skewX!==0||this.options.skewY!==0}applySkew(e){const t=new L(e);return t.y+=t.x*Math.tan(Fe(this.options.skewY)),t.x+=t.y*Math.tan(Fe(this.options.skewX)),t}scaleUnitVector(e,t){return e.multiply(this.strokeUniformScalar).scalarMultiply(t)}}const H0=new L;class qr extends Xf{static getOrthogonalRotationFactor(e,t){const r=t?la(e,t):S0(e);return Math.abs(r)2&&arguments[2]!==void 0?arguments[2]:this.strokeProjectionMagnitude;const n=this.createSideVector(e,t),s=Tf(n),o=qr.getOrthogonalRotationFactor(s,this.bisector);return this.scaleUnitVector(s,r*o)}projectBevel(){const e=[];return(this.alpha%Ri==0?[this.B]:[this.B,this.C]).forEach(t=>{e.push(this.projectOrthogonally(this.A,t)),e.push(this.projectOrthogonally(this.A,t,-this.strokeProjectionMagnitude))}),e}projectMiter(){const e=[],t=Math.abs(this.alpha),r=1/Math.sin(t/2),n=this.scaleUnitVector(this.bisector,-this.strokeProjectionMagnitude*r),s=this.options.strokeUniform?aa(this.scaleUnitVector(this.bisector,this.options.strokeMiterLimit)):this.options.strokeMiterLimit;return aa(n)/this.strokeProjectionMagnitude<=s&&e.push(this.applySkew(this.A.add(n))),e.push(...this.projectBevel()),e}projectRoundNoSkew(e,t){const r=[],n=new L(qr.getOrthogonalRotationFactor(this.bisector),qr.getOrthogonalRotationFactor(new L(this.bisector.y,this.bisector.x)));return[new L(1,0).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar).multiply(n),new L(0,1).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar).multiply(n)].forEach(s=>{qc(s,e,t)&&r.push(this.A.add(s))}),r}projectRoundWithSkew(e,t){const r=[],{skewX:n,skewY:s,scaleX:o,scaleY:a,strokeUniform:l}=this.options,c=new L(Math.tan(Fe(n)),Math.tan(Fe(s))),u=this.strokeProjectionMagnitude,h=l?u/a/Math.sqrt(1/Te(a,2)+1/Te(o,2)*Te(c.y,2)):u/Math.sqrt(1+Te(c.y,2)),d=new L(Math.sqrt(Math.max(Te(u,2)-Te(h,2),0)),h),f=l?u/Math.sqrt(1+Te(c.x,2)*Te(1/a,2)/Te(1/o+1/o*c.x*c.y,2)):u/Math.sqrt(1+Te(c.x,2)/Te(1+c.x*c.y,2)),g=new L(f,Math.sqrt(Math.max(Te(u,2)-Te(f,2),0)));return[g,g.scalarMultiply(-1),d,d.scalarMultiply(-1)].map(m=>this.applySkew(l?m.multiply(this.strokeUniformScalar):m)).forEach(m=>{qc(m,e,t)&&r.push(this.applySkew(this.A).add(m))}),r}projectRound(){const e=[];e.push(...this.projectBevel());const t=this.alpha%Ri==0,r=this.applySkew(this.A),n=e[t?0:2].subtract(r),s=e[t?1:0].subtract(r),o=t?this.applySkew(this.AB.scalarMultiply(-1)):this.applySkew(this.bisector.multiply(this.strokeUniformScalar).scalarMultiply(-1)),a=kn(n,o)>0,l=a?n:s,c=a?s:n;return this.isSkewed()?e.push(...this.projectRoundWithSkew(l,c)):e.push(...this.projectRoundNoSkew(l,c)),e}projectPoints(){switch(this.options.strokeLineJoin){case"miter":return this.projectMiter();case"round":return this.projectRound();default:return this.projectBevel()}}project(){return this.projectPoints().map(e=>({originPoint:this.A,projectedPoint:e,angle:this.alpha,bisector:this.bisector}))}}class Zc extends Xf{constructor(e,t,r){super(r),this.A=new L(e),this.T=new L(t)}calcOrthogonalProjection(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.strokeProjectionMagnitude;const n=this.createSideVector(e,t);return this.scaleUnitVector(Tf(n),r)}projectButt(){return[this.projectOrthogonally(this.A,this.T,this.strokeProjectionMagnitude),this.projectOrthogonally(this.A,this.T,-this.strokeProjectionMagnitude)]}projectRound(){const e=[];if(!this.isSkewed()&&this.A.eq(this.T)){const t=new L(1,1).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar);e.push(this.applySkew(this.A.add(t)),this.applySkew(this.A.subtract(t)))}else e.push(...new qr(this.A,this.T,this.T,this.options).projectRound());return e}projectSquare(){const e=[];if(this.A.eq(this.T)){const t=new L(1,1).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar);e.push(this.A.add(t),this.A.subtract(t))}else{const t=this.calcOrthogonalProjection(this.A,this.T,this.strokeProjectionMagnitude),r=this.scaleUnitVector(Ja(this.createSideVector(this.A,this.T)),-this.strokeProjectionMagnitude),n=this.A.add(r);e.push(n.add(t),n.subtract(t))}return e.map(t=>this.applySkew(t))}projectPoints(){switch(this.options.strokeLineCap){case"round":return this.projectRound();case"square":return this.projectSquare();default:return this.projectButt()}}project(){return this.projectPoints().map(e=>({originPoint:this.A,projectedPoint:e}))}}const q0=function(i,e){let t=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const r=[];if(i.length===0)return r;const n=i.reduce((s,o)=>(s[s.length-1].eq(o)||s.push(new L(o)),s),[new L(i[0])]);if(n.length===1)t=!0;else if(!t){const s=n[0],o=((a,l)=>{for(let c=a.length-1;c>=0;c--)if(l(a[c],c,a))return c;return-1})(n,a=>!a.eq(s));n.splice(o+1)}return n.forEach((s,o,a)=>{let l,c;o===0?(c=a[1],l=t?s:a[a.length-1]):o===a.length-1?(l=a[o-1],c=t?s:a[0]):(l=a[o-1],c=a[o+1]),t&&a.length===1?r.push(...new Zc(s,s,e).project()):!t||o!==0&&o!==a.length-1?r.push(...new qr(s,l,c,e).project()):r.push(...new Zc(s,o===0?c:l,e).project())}),r},tl=i=>{const e={};return Object.keys(i).forEach(t=>{e[t]={},Object.keys(i[t]).forEach(r=>{e[t][r]=D({},i[t][r])})}),e},U0=i=>i.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">"),rl=i=>{const e=[];for(let t,r=0;r{const t=i.charCodeAt(e);if(isNaN(t))return"";if(t<55296||t>57343)return i.charAt(e);if(55296<=t&&t<=56319){if(i.length<=e+1)throw"High surrogate without following low surrogate";const n=i.charCodeAt(e+1);if(56320>n||n>57343)throw"High surrogate without following low surrogate";return i.charAt(e)+i.charAt(e+1)}if(e===0)throw"Low surrogate without preceding high surrogate";const r=i.charCodeAt(e-1);if(55296>r||r>56319)throw"Low surrogate without preceding high surrogate";return!1},nl=function(i,e){let t=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return i.fill!==e.fill||i.stroke!==e.stroke||i.strokeWidth!==e.strokeWidth||i.fontSize!==e.fontSize||i.fontFamily!==e.fontFamily||i.fontWeight!==e.fontWeight||i.fontStyle!==e.fontStyle||i.textBackgroundColor!==e.textBackgroundColor||i.deltaY!==e.deltaY||t&&(i.overline!==e.overline||i.underline!==e.underline||i.linethrough!==e.linethrough)},Z0=(i,e)=>{const t=e.split(` -`),r=[];let n=-1,s={};i=tl(i);for(let o=0;o0&&(nl(s,c,!0)?r.push({start:n,end:n+1,style:c}):r[r.length-1].end++),s=c||{}}else n+=a.length,s={}}return r},J0=(i,e)=>{if(!Array.isArray(i))return tl(i);const t=e.split(Ya),r={};let n=-1,s=0;for(let o=0;o{var e;return(e=x0[i])!==null&&e!==void 0?e:i},em=new RegExp("(".concat(Sr,")"),"gi"),tm=i=>i.replace(em," $1 ").replace(/,/gi," ").replace(/\s+/gi," ");var Qc,$c,eu,tu,ru,nu,iu;const nt="(".concat(Sr,")"),rm=String.raw(Qc||(Qc=hr(["(skewX)(",")"],["(skewX)\\(","\\)"])),nt),nm=String.raw($c||($c=hr(["(skewY)(",")"],["(skewY)\\(","\\)"])),nt),im=String.raw(eu||(eu=hr(["(rotate)(","(?: "," ",")?)"],["(rotate)\\(","(?: "," ",")?\\)"])),nt,nt,nt),sm=String.raw(tu||(tu=hr(["(scale)(","(?: ",")?)"],["(scale)\\(","(?: ",")?\\)"])),nt,nt),om=String.raw(ru||(ru=hr(["(translate)(","(?: ",")?)"],["(translate)\\(","(?: ",")?\\)"])),nt,nt),am=String.raw(nu||(nu=hr(["(matrix)("," "," "," "," "," ",")"],["(matrix)\\("," "," "," "," "," ","\\)"])),nt,nt,nt,nt,nt,nt),il="(?:".concat(am,"|").concat(om,"|").concat(im,"|").concat(sm,"|").concat(rm,"|").concat(nm,")"),lm="(?:".concat(il,"*)"),cm=String.raw(iu||(iu=hr(["^s*(?:","?)s*$"],["^\\s*(?:","?)\\s*$"])),lm),um=new RegExp(cm),hm=new RegExp(il),fm=new RegExp(il,"g");function fa(i){const e=[];if(!(i=tm(i).replace(/\s*([()])\s*/gi,"$1"))||i&&!um.test(i))return[...st];for(const t of i.matchAll(fm)){const r=hm.exec(t[0]);if(!r)continue;let n=st;const s=r.filter(g=>!!g),[,o,...a]=s,[l,c,u,h,d,f]=a.map(g=>parseFloat(g));switch(o){case"translate":n=zn(l,c);break;case Xa:n=Vn({angle:l},{x:c,y:u});break;case ss:n=Ha(l,c);break;case on:n=ff(l);break;case an:n=df(l);break;case"matrix":n=[l,c,u,h,d,f]}e.push(n)}return Ga(e)}function dm(i,e,t,r){const n=Array.isArray(e);let s,o=e;if(i!==ze&&i!==ft||e!==ht){if(i==="strokeUniform")return e==="non-scaling-stroke";if(i==="strokeDashArray")o=e===ht?null:e.replace(/,/g," ").split(/\s+/).map(parseFloat);else if(i==="transformMatrix")o=t&&t.transformMatrix?Ye(t.transformMatrix,fa(e)):fa(e);else if(i==="visible")o=e!==ht&&e!=="hidden",t&&t.visible===!1&&(o=!1);else if(i==="opacity")o=parseFloat(e),t&&t.opacity!==void 0&&(o*=t.opacity);else if(i==="textAnchor")o=e==="start"?Ce:e==="end"?je:ue;else if(i==="charSpacing")s=Hr(e,r)/r*1e3;else if(i==="paintFirst"){const a=e.indexOf(ze),l=e.indexOf(ft);o=ze,(a>-1&&l>-1&&l-1)&&(o=ft)}else{if(i==="href"||i==="xlink:href"||i==="font"||i==="id")return e;if(i==="imageSmoothing")return e==="optimizeQuality";s=n?e.map(Hr):Hr(e,r)}}else o="";return!n&&isNaN(s)?o:s}function gm(i,e){const t=i.match(C0);if(!t)return;const r=t[1],n=t[3],s=t[4],o=t[5],a=t[6];r&&(e.fontStyle=r),n&&(e.fontWeight=isNaN(parseFloat(n))?n:parseFloat(n)),s&&(e.fontSize=Hr(s)),a&&(e.fontFamily=a),o&&(e.lineHeight=o==="normal"?1:o)}function mm(i,e){i.replace(/;\s*$/,"").split(";").forEach(t=>{if(!t)return;const[r,n]=t.split(":");e[r.trim().toLowerCase()]=n.trim()})}function pm(i){const e={},t=i.getAttribute("style");return t&&(typeof t=="string"?mm(t,e):function(r,n){Object.entries(r).forEach(s=>{let[o,a]=s;a!==void 0&&(n[o.toLowerCase()]=a)})}(t,e)),e}const vm={stroke:"strokeOpacity",fill:"fillOpacity"};function $t(i,e,t){if(!i)return{};let r,n={},s=Va;i.parentNode&&Hc.test(i.parentNode.nodeName)&&(n=$t(i.parentElement,e,t),n.fontSize&&(r=s=Hr(n.fontSize)));const o=D(D(D({},e.reduce((c,u)=>{const h=i.getAttribute(u);return h&&(c[u]=h),c},{})),function(c){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h={};for(const d in u)Q0(c,d.split(" "))&&(h=D(D({},h),u[d]));return h}(i,t)),pm(i));o[Ro]&&i.setAttribute(Ro,o[Ro]),o[Fo]&&(r=Hr(o[Fo],s),o[Fo]="".concat(r));const a={};for(const c in o){const u=$0(c),h=dm(u,o[c],n,r);a[u]=h}a&&a.font&&gm(a.font,a);const l=D(D({},n),a);return Hc.test(i.nodeName)?l:function(c){const u=et.getDefaults();return Object.entries(vm).forEach(h=>{let[d,f]=h;if(c[f]===void 0||c[d]==="")return;if(c[d]===void 0){if(!u[d])return;c[d]=u[d]}if(c[d].indexOf("url(")===0)return;const g=new ke(c[d]);c[d]=g.setAlpha(Ae(g.getAlpha()*c[f],2)).toRgba()}),c}(l)}const _m=["left","top","width","height","visible"],Wf=["rx","ry"];class kt extends et{static getDefaults(){return D(D({},super.getDefaults()),kt.ownDefaults)}constructor(e){super(),Object.assign(this,kt.ownDefaults),this.setOptions(e),this._initRxRy()}_initRxRy(){const{rx:e,ry:t}=this;e&&!t?this.ry=e:t&&!e&&(this.rx=t)}_render(e){const{width:t,height:r}=this,n=-t/2,s=-r/2,o=this.rx?Math.min(this.rx,t/2):0,a=this.ry?Math.min(this.ry,r/2):0,l=o!==0||a!==0;e.beginPath(),e.moveTo(n+o,s),e.lineTo(n+t-o,s),l&&e.bezierCurveTo(n+t-er*o,s,n+t,s+er*a,n+t,s+a),e.lineTo(n+t,s+r-a),l&&e.bezierCurveTo(n+t,s+r-er*a,n+t-er*o,s+r,n+t-o,s+r),e.lineTo(n+o,s+r),l&&e.bezierCurveTo(n+er*o,s+r,n,s+r-er*a,n,s+r-a),e.lineTo(n,s+a),l&&e.bezierCurveTo(n,s+er*a,n+er*o,s,n+o,s),e.closePath(),this._renderPaintInOrder(e)}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return super.toObject([...Wf,...e])}_toSVG(){const{width:e,height:t,rx:r,ry:n}=this;return[" -`)]}static fromElement(e,t,r){return Me(this,null,function*(){const n=$t(e,this.ATTRIBUTE_NAMES,r),{left:s=0,top:o=0,width:a=0,height:l=0,visible:c=!0}=n,u=De(n,_m);return new this(D(D(D({},t),u),{},{left:s,top:o,width:a,height:l,visible:!!(c&&a&&l)}))})}}M(kt,"type","Rect"),M(kt,"cacheProperties",[...Qt,...Wf]),M(kt,"ownDefaults",{rx:0,ry:0}),M(kt,"ATTRIBUTE_NAMES",[...dr,"x","y","rx","ry","width","height"]),$.setClass(kt),$.setSVGClass(kt);const Ht="initialization",Wi="added",sl="removed",Gi="imperative",Gf=(i,e)=>{const{strokeUniform:t,strokeWidth:r,width:n,height:s,group:o}=e,a=o&&o!==i?ls(o.calcTransformMatrix(),i.calcTransformMatrix()):null,l=a?e.getRelativeCenterPoint().transform(a):e.getRelativeCenterPoint(),c=!e.isStrokeAccountedForInDimensions(),u=t&&c?b0(new L(r,r),void 0,i.calcTransformMatrix()):Wa,h=!t&&c?r:0,d=Ua(n+h,s+h,Ga([a,e.calcOwnMatrix()],!0)).add(u).scalarDivide(2);return[l.subtract(d),l.add(d)]};class fs{calcLayoutResult(e,t){if(this.shouldPerformLayout(e))return this.calcBoundingBox(t,e)}shouldPerformLayout(e){let{type:t,prevStrategy:r,strategy:n}=e;return t===Ht||t===Gi||!!r&&n!==r}shouldLayoutClipPath(e){let{type:t,target:{clipPath:r}}=e;return t!==Ht&&r&&!r.absolutePositioned}getInitialSize(e,t){return t.size}calcBoundingBox(e,t){const{type:r,target:n}=t;if(r===Gi&&t.overrides)return t.overrides;if(e.length===0)return;const{left:s,top:o,width:a,height:l}=Ut(e.map(h=>Gf(n,h)).reduce((h,d)=>h.concat(d),[])),c=new L(a,l),u=new L(s,o).add(c.scalarDivide(2));if(r===Ht){const h=this.getInitialSize(t,{size:c,center:u});return{center:u,relativeCorrection:new L(0,0),size:h}}return{center:u.transform(n.calcOwnMatrix()),size:c}}}M(fs,"type","strategy");class da extends fs{shouldPerformLayout(e){return!0}}M(da,"type","fit-content"),$.setClass(da);const bm=["strategy"],ym=["target","strategy","bubbles","prevStrategy"],Hf="layoutManager";class jn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new da;M(this,"strategy",void 0),this.strategy=e,this._subscriptions=new Map}performLayout(e){const t=D(D({bubbles:!0,strategy:this.strategy},e),{},{prevStrategy:this._prevLayoutStrategy,stopPropagation(){this.bubbles=!1}});this.onBeforeLayout(t);const r=this.getLayoutResult(t);r&&this.commitLayout(t,r),this.onAfterLayout(t,r),this._prevLayoutStrategy=t.strategy}attachHandlers(e,t){const{target:r}=t;return[Ii,rf,Mn,nf,is,sf,Ni,of,s0].map(n=>e.on(n,s=>this.performLayout(n===Ii?{type:"object_modified",trigger:n,e:s,target:r}:{type:"object_modifying",trigger:n,e:s,target:r})))}subscribe(e,t){this.unsubscribe(e,t);const r=this.attachHandlers(e,t);this._subscriptions.set(e,r)}unsubscribe(e,t){(this._subscriptions.get(e)||[]).forEach(r=>r()),this._subscriptions.delete(e)}unsubscribeTargets(e){e.targets.forEach(t=>this.unsubscribe(t,e))}subscribeTargets(e){e.targets.forEach(t=>this.subscribe(t,e))}onBeforeLayout(e){const{target:t,type:r}=e,{canvas:n}=t;if(r===Ht||r===Wi?this.subscribeTargets(e):r===sl&&this.unsubscribeTargets(e),t.fire("layout:before",{context:e}),n&&n.fire("object:layout:before",{target:t,context:e}),r===Gi&&e.deep){const s=De(e,bm);t.forEachObject(o=>o.layoutManager&&o.layoutManager.performLayout(D(D({},s),{},{bubbles:!1,target:o})))}}getLayoutResult(e){const{target:t,strategy:r,type:n}=e,s=r.calcLayoutResult(e,t.getObjects());if(!s)return;const o=n===Ht?new L:t.getRelativeCenterPoint(),{center:a,correction:l=new L,relativeCorrection:c=new L}=s,u=o.subtract(a).add(l).transform(n===Ht?st:Tt(t.calcOwnMatrix()),!0).add(c);return{result:s,prevCenter:o,nextCenter:a,offset:u}}commitLayout(e,t){const{target:r}=e,{result:{size:n},nextCenter:s}=t;var o,a;r.set({width:n.x,height:n.y}),this.layoutObjects(e,t),e.type===Ht?r.set({left:(o=e.x)!==null&&o!==void 0?o:s.x+n.x*Be(r.originX),top:(a=e.y)!==null&&a!==void 0?a:s.y+n.y*Be(r.originY)}):(r.setPositionByOrigin(s,ue,ue),r.setCoords(),r.set("dirty",!0))}layoutObjects(e,t){const{target:r}=e;r.forEachObject(n=>{n.group===r&&this.layoutObject(e,t,n)}),e.strategy.shouldLayoutClipPath(e)&&this.layoutObject(e,t,r.clipPath)}layoutObject(e,t,r){let{offset:n}=t;r.set({left:r.left+n.x,top:r.top+n.y})}onAfterLayout(e,t){const{target:r,strategy:n,bubbles:s,prevStrategy:o}=e,a=De(e,ym),{canvas:l}=r;r.fire("layout:after",{context:e,result:t}),l&&l.fire("object:layout:after",{context:e,result:t,target:r});const c=r.parent;s&&c!=null&&c.layoutManager&&((a.path||(a.path=[])).push(r),c.layoutManager.performLayout(D(D({},a),{},{target:c}))),r.set("dirty",!0)}dispose(){const{_subscriptions:e}=this;e.forEach(t=>t.forEach(r=>r())),e.clear()}toObject(){return{type:Hf,strategy:this.strategy.constructor.type}}toJSON(){return this.toObject()}}$.setClass(jn,Hf);const wm=["type","objects","layoutManager"];class Cm extends jn{performLayout(){}}class Nt extends af(et){static getDefaults(){return D(D({},super.getDefaults()),Nt.ownDefaults)}constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),M(this,"_activeObjects",[]),M(this,"__objectSelectionTracker",void 0),M(this,"__objectSelectionDisposer",void 0),Object.assign(this,Nt.ownDefaults),this.setOptions(t),this.groupInit(e,t)}groupInit(e,t){var r;this._objects=[...e],this.__objectSelectionTracker=this.__objectSelectionMonitor.bind(this,!0),this.__objectSelectionDisposer=this.__objectSelectionMonitor.bind(this,!1),this.forEachObject(n=>{this.enterGroup(n,!1)}),this.layoutManager=(r=t.layoutManager)!==null&&r!==void 0?r:new jn,this.layoutManager.performLayout({type:Ht,target:this,targets:[...e],x:t.left,y:t.top})}canEnterGroup(e){return e===this||this.isDescendantOf(e)?(ar("error","Group: circular object trees are not supported, this call has no effect"),!1):this._objects.indexOf(e)===-1||(ar("error","Group: duplicate objects are not supported inside group, this call has no effect"),!1)}_filterObjectsBeforeEnteringGroup(e){return e.filter((t,r,n)=>this.canEnterGroup(t)&&n.indexOf(t)===r)}add(){for(var e=arguments.length,t=new Array(e),r=0;r1?t-1:0),n=1;n{n._set(e,t)}),this}_shouldSetNestedCoords(){return this.subTargetCheck}removeAll(){return this._activeObjects=[],this.remove(...this._objects)}__objectSelectionMonitor(e,t){let{target:r}=t;const n=this._activeObjects;if(e)n.push(r),this._set("dirty",!0);else if(n.length>0){const s=n.indexOf(r);s>-1&&(n.splice(s,1),this._set("dirty",!0))}}_watchObject(e,t){e&&this._watchObject(!1,t),e?(t.on("selected",this.__objectSelectionTracker),t.on("deselected",this.__objectSelectionDisposer)):(t.off("selected",this.__objectSelectionTracker),t.off("deselected",this.__objectSelectionDisposer))}enterGroup(e,t){e.group&&e.group.remove(e),e._set("parent",this),this._enterGroup(e,t)}_enterGroup(e,t){t&&Yi(e,Ye(Tt(this.calcTransformMatrix()),e.calcTransformMatrix())),this._shouldSetNestedCoords()&&e.setCoords(),e._set("group",this),e._set("canvas",this.canvas),this._watchObject(!0,e);const r=this.canvas&&this.canvas.getActiveObject&&this.canvas.getActiveObject();r&&(r===e||e.isDescendantOf(r))&&this._activeObjects.push(e)}exitGroup(e,t){this._exitGroup(e,t),e._set("parent",void 0),e._set("canvas",void 0)}_exitGroup(e,t){e._set("group",void 0),t||(Yi(e,Ye(this.calcTransformMatrix(),e.calcTransformMatrix())),e.setCoords()),this._watchObject(!1,e);const r=this._activeObjects.length>0?this._activeObjects.indexOf(e):-1;r>-1&&this._activeObjects.splice(r,1)}shouldCache(){const e=et.prototype.shouldCache.call(this);if(e){for(let t=0;te.setCoords())}triggerLayout(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.layoutManager.performLayout(D({target:this,type:Gi},e))}render(e){this._transformDone=!0,super.render(e),this._transformDone=!1}__serializeObjects(e,t){const r=this.includeDefaultValues;return this._objects.filter(function(n){return!n.excludeFromExport}).map(function(n){const s=n.includeDefaultValues;n.includeDefaultValues=r;const o=n[e||"toObject"](t);return n.includeDefaultValues=s,o})}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const t=this.layoutManager.toObject();return D(D(D({},super.toObject(["subTargetCheck","interactive",...e])),t.strategy!=="fit-content"||this.includeDefaultValues?{layoutManager:t}:{}),{},{objects:this.__serializeObjects("toObject",e)})}toString(){return"#")}dispose(){this.layoutManager.unsubscribeTargets({targets:this.getObjects(),target:this}),this._activeObjects=[],this.forEachObject(e=>{this._watchObject(!1,e),e.dispose()}),super.dispose()}_createSVGBgRect(e){if(!this.backgroundColor)return"";const t=kt.prototype._toSVG.call(this),r=t.indexOf("COMMON_PARTS");t[r]='for="group" ';const n=t.join("");return e?e(n):n}_toSVG(e){const t=[" -`],r=this._createSVGBgRect(e);r&&t.push(" ",r);for(let n=0;n -`),t}getSvgStyles(){const e=this.opacity!==void 0&&this.opacity!==1?"opacity: ".concat(this.opacity,";"):"",t=this.visible?"":" visibility: hidden;";return[e,this.getSvgFilter(),t].join("")}toClipPathSVG(e){const t=[],r=this._createSVGBgRect(e);r&&t.push(" ",r);for(let n=0;n{let[l,c]=a;const u=new this(l,D(D(D({},o),c),{},{layoutManager:new Cm}));if(s){const h=$.getClass(s.type),d=$.getClass(s.strategy);u.layoutManager=new h(new d)}else u.layoutManager=new jn;return u.layoutManager.subscribeTargets({type:Ht,target:u,targets:u.getObjects()}),u.setCoords(),u})}}M(Nt,"type","Group"),M(Nt,"ownDefaults",{strokeWidth:0,subTargetCheck:!1,interactive:!1}),$.setClass(Nt);const xm=(i,e)=>Math.min(e.width/i.width,e.height/i.height),km=(i,e)=>Math.max(e.width/i.width,e.height/i.height),ga="\\s*,?\\s*",dn="".concat(ga,"(").concat(Sr,")"),Sm="".concat(dn).concat(dn).concat(dn).concat(ga,"([01])").concat(ga,"([01])").concat(dn).concat(dn),Tm={m:"l",M:"L"},Em=(i,e,t,r,n,s,o,a,l,c,u)=>{const h=Zt(i),d=Jt(i),f=Zt(e),g=Jt(e),m=t*n*f-r*s*g+o,v=r*n*f+t*s*g+a;return["C",c+l*(-t*n*d-r*s*h),u+l*(-r*n*d+t*s*h),m+l*(t*n*g+r*s*f),v+l*(r*n*g-t*s*f),m,v]},su=(i,e,t,r)=>{const n=Math.atan2(e,i),s=Math.atan2(r,t);return s>=n?s-n:2*Math.PI-(n-s)};function ou(i,e,t,r,n,s,o,a){let l;if(pe.cachesBoundsOfCurve&&(l=[...arguments].join(),xn.boundsOfCurveCache[l]))return xn.boundsOfCurveCache[l];const c=Math.sqrt,u=Math.abs,h=[],d=[[0,0],[0,0]];let f=6*i-12*t+6*n,g=-3*i+9*t-9*n+3*o,m=3*t-3*i;for(let y=0;y<2;++y){if(y>0&&(f=6*e-12*r+6*s,g=-3*e+9*r-9*s+3*a,m=3*r-3*e),u(g)<1e-12){if(u(f)<1e-12)continue;const O=-m/f;0{let[r,n,s,o,a,l,c,u]=t;const h=((d,f,g,m,v,p,b)=>{if(g===0||m===0)return[];let C=0,y=0,w=0;const x=Math.PI,k=b*za,S=Jt(k),O=Zt(k),_=.5*(-O*d-S*f),W=.5*(-O*f+S*d),F=Te(g,2),R=Te(m,2),A=Te(W,2),E=Te(_,2),P=F*R-F*A-R*E;let T=Math.abs(g),N=Math.abs(m);if(P<0){const te=Math.sqrt(1-P/(F*R));T*=te,N*=te}else w=(v===p?-1:1)*Math.sqrt(P/(F*A+R*E));const q=w*T*W/N,B=-w*N*_/T,se=O*q-S*B+.5*d,fe=S*q+O*B+.5*f;let Se=su(1,0,(_-q)/T,(W-B)/N),me=su((_-q)/T,(W-B)/N,(-_-q)/T,(-W-B)/N);p===0&&me>0?me-=2*x:p===1&&me<0&&(me+=2*x);const tt=Math.ceil(Math.abs(me/x*2)),Ge=[],Z=me/tt,I=8/3*Math.sin(Z/4)*Math.sin(Z/4)/Math.sin(Z/2);let K=Se+Z;for(let te=0;te{let e=0,t=0,r=0,n=0;const s=[];let o,a=0,l=0;for(const c of i){const u=[...c];let h;switch(u[0]){case"l":u[1]+=e,u[2]+=t;case"L":e=u[1],t=u[2],h=["L",e,t];break;case"h":u[1]+=e;case"H":e=u[1],h=["L",e,t];break;case"v":u[1]+=t;case"V":t=u[1],h=["L",e,t];break;case"m":u[1]+=e,u[2]+=t;case"M":e=u[1],t=u[2],r=u[1],n=u[2],h=["M",e,t];break;case"c":u[1]+=e,u[2]+=t,u[3]+=e,u[4]+=t,u[5]+=e,u[6]+=t;case"C":a=u[3],l=u[4],e=u[5],t=u[6],h=["C",u[1],u[2],a,l,e,t];break;case"s":u[1]+=e,u[2]+=t,u[3]+=e,u[4]+=t;case"S":o==="C"?(a=2*e-a,l=2*t-l):(a=e,l=t),e=u[3],t=u[4],h=["C",a,l,u[1],u[2],e,t],a=h[3],l=h[4];break;case"q":u[1]+=e,u[2]+=t,u[3]+=e,u[4]+=t;case"Q":a=u[1],l=u[2],e=u[3],t=u[4],h=["Q",a,l,e,t];break;case"t":u[1]+=e,u[2]+=t;case"T":o==="Q"?(a=2*e-a,l=2*t-l):(a=e,l=t),e=u[1],t=u[2],h=["Q",a,l,e,t];break;case"a":u[6]+=e,u[7]+=t;case"A":Om(e,t,u).forEach(d=>s.push(d)),e=u[6],t=u[7];break;case"z":case"Z":e=r,t=n,h=["Z"]}h?(s.push(h),o=h[0]):o=""}return s},Hi=(i,e,t,r)=>Math.sqrt(Te(t-i,2)+Te(r-e,2)),qf=(i,e,t,r,n,s,o,a)=>l=>{const c=Te(l,3),u=(f=>3*Te(f,2)*(1-f))(l),h=(f=>3*f*Te(1-f,2))(l),d=(f=>Te(1-f,3))(l);return new L(o*c+n*u+t*h+i*d,a*c+s*u+r*h+e*d)},Uf=i=>Te(i,2),Kf=i=>2*i*(1-i),Zf=i=>Te(1-i,2),Mm=(i,e,t,r,n,s,o,a)=>l=>{const c=Uf(l),u=Kf(l),h=Zf(l),d=3*(h*(t-i)+u*(n-t)+c*(o-n)),f=3*(h*(r-e)+u*(s-r)+c*(a-s));return Math.atan2(f,d)},Pm=(i,e,t,r,n,s)=>o=>{const a=Uf(o),l=Kf(o),c=Zf(o);return new L(n*a+t*l+i*c,s*a+r*l+e*c)},Am=(i,e,t,r,n,s)=>o=>{const a=1-o,l=2*(a*(t-i)+o*(n-t)),c=2*(a*(r-e)+o*(s-r));return Math.atan2(c,l)},au=(i,e,t)=>{let r=new L(e,t),n=0;for(let s=1;s<=100;s+=1){const o=i(s/100);n+=Hi(r.x,r.y,o.x,o.y),r=o}return n},Lm=(i,e)=>{let t,r=0,n=0,s={x:i.x,y:i.y},o=D({},s),a=.01,l=0;const c=i.iterator,u=i.angleFinder;for(;n1e-4;)o=c(r),l=r,t=Hi(s.x,s.y,o.x,o.y),t+n>e?(r-=a,a/=2):(s=o,r+=a,n+=t);return D(D({},o),{},{angle:u(l)})},Jf=i=>{let e,t,r=0,n=0,s=0,o=0,a=0;const l=[];for(const c of i){const u={x:n,y:s,command:c[0],length:0};switch(c[0]){case"M":t=u,t.x=o=n=c[1],t.y=a=s=c[2];break;case"L":t=u,t.length=Hi(n,s,c[1],c[2]),n=c[1],s=c[2];break;case"C":e=qf(n,s,c[1],c[2],c[3],c[4],c[5],c[6]),t=u,t.iterator=e,t.angleFinder=Mm(n,s,c[1],c[2],c[3],c[4],c[5],c[6]),t.length=au(e,n,s),n=c[5],s=c[6];break;case"Q":e=Pm(n,s,c[1],c[2],c[3],c[4]),t=u,t.iterator=e,t.angleFinder=Am(n,s,c[1],c[2],c[3],c[4]),t.length=au(e,n,s),n=c[3],s=c[4];break;case"Z":t=u,t.destX=o,t.destY=a,t.length=Hi(n,s,o,a),n=o,s=a}r+=t.length,l.push(t)}return l.push({length:r,x:n,y:s}),l},jm=function(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Jf(i),r=0;for(;e-t[r].length>0&&r{var e;const t=[],r=(e=i.match(Fm))!==null&&e!==void 0?e:[];for(const n of r){const s=n[0];if(s==="z"||s==="Z"){t.push([s]);continue}const o=Nm[s.toLowerCase()];let a=[];if(s==="a"||s==="A"){lu.lastIndex=0;for(let l=null;l=lu.exec(n);)a.push(...l.slice(1))}else a=n.match(Rm)||[];for(let l=0;l0&&u?u:s;for(let h=0;hi.map(t=>t.map((r,n)=>n===0||e===void 0?r:Ae(r,e)).join(" ")).join(" ");function ma(i,e){const t=i.style;t&&e&&(typeof e=="string"?t.cssText+=";"+e:Object.entries(e).forEach(r=>{let[n,s]=r;return t.setProperty(n,s)}))}class zm extends _f{constructor(e){let{allowTouchScrolling:t=!1,containerClass:r=""}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(e),M(this,"upper",void 0),M(this,"container",void 0);const{el:n}=this.lower,s=this.createUpperCanvas();this.upper={el:s,ctx:s.getContext("2d")},this.applyCanvasStyle(n,{allowTouchScrolling:t}),this.applyCanvasStyle(s,{allowTouchScrolling:t,styles:{position:"absolute",left:"0",top:"0"}});const o=this.createContainerElement();o.classList.add(r),n.parentNode&&n.parentNode.replaceChild(o,n),o.append(n,s),this.container=o}createUpperCanvas(){const{el:e}=this.lower,t=Xe();return t.className=e.className,t.classList.remove("lower-canvas"),t.classList.add("upper-canvas"),t.setAttribute("data-fabric","top"),t.style.cssText=e.style.cssText,t.setAttribute("draggable","true"),t}createContainerElement(){const e=sn().createElement("div");return e.setAttribute("data-fabric","wrapper"),ma(e,{position:"relative"}),Xc(e),e}applyCanvasStyle(e,t){const{styles:r,allowTouchScrolling:n}=t;ma(e,D(D({},r),{},{"touch-action":n?"manipulation":ht})),Xc(e)}setDimensions(e,t){super.setDimensions(e,t);const{el:r,ctx:n}=this.upper;vf(r,n,e,t)}setCSSDimensions(e){super.setCSSDimensions(e),na(this.upper.el,e),na(this.container,e)}cleanupDOM(e){const t=this.container,{el:r}=this.lower,{el:n}=this.upper;super.cleanupDOM(e),t.removeChild(n),t.removeChild(r),t.parentNode&&t.parentNode.replaceChild(r,t)}dispose(){super.dispose(),Bt().dispose(this.upper.el),delete this.upper,delete this.container}}class ds extends Yn{constructor(){super(...arguments),M(this,"targets",[]),M(this,"_hoveredTargets",[]),M(this,"_objectsToRender",void 0),M(this,"_currentTransform",null),M(this,"_groupSelector",null),M(this,"contextTopDirty",!1)}static getDefaults(){return D(D({},super.getDefaults()),ds.ownDefaults)}get upperCanvasEl(){var e;return(e=this.elements.upper)===null||e===void 0?void 0:e.el}get contextTop(){var e;return(e=this.elements.upper)===null||e===void 0?void 0:e.ctx}get wrapperEl(){return this.elements.container}initElements(e){this.elements=new zm(e,{allowTouchScrolling:this.allowTouchScrolling,containerClass:this.containerClass}),this._createCacheCanvas()}_onObjectAdded(e){this._objectsToRender=void 0,super._onObjectAdded(e)}_onObjectRemoved(e){this._objectsToRender=void 0,e===this._activeObject&&(this.fire("before:selection:cleared",{deselected:[e]}),this._discardActiveObject(),this.fire("selection:cleared",{deselected:[e]}),e.fire("deselected",{target:e})),e===this._hoveredTarget&&(this._hoveredTarget=void 0,this._hoveredTargets=[]),super._onObjectRemoved(e)}_onStackOrderChanged(){this._objectsToRender=void 0,super._onStackOrderChanged()}_chooseObjectsToRender(){const e=this._activeObject;return!this.preserveObjectStacking&&e?this._objects.filter(t=>!t.group&&t!==e).concat(e):this._objects}renderAll(){this.cancelRequestedRender(),this.destroyed||(!this.contextTopDirty||this._groupSelector||this.isDrawingMode||(this.clearContext(this.contextTop),this.contextTopDirty=!1),this.hasLostContext&&(this.renderTopLayer(this.contextTop),this.hasLostContext=!1),!this._objectsToRender&&(this._objectsToRender=this._chooseObjectsToRender()),this.renderCanvas(this.getContext(),this._objectsToRender))}renderTopLayer(e){e.save(),this.isDrawingMode&&this._isCurrentlyDrawing&&(this.freeDrawingBrush&&this.freeDrawingBrush._render(),this.contextTopDirty=!0),this.selection&&this._groupSelector&&(this._drawSelection(e),this.contextTopDirty=!0),e.restore()}renderTop(){const e=this.contextTop;this.clearContext(e),this.renderTopLayer(e),this.fire("after:render",{ctx:e})}setTargetFindTolerance(e){e=Math.round(e),this.targetFindTolerance=e;const t=this.getRetinaScaling(),r=Math.ceil((2*e+1)*t);this.pixelFindCanvasEl.width=this.pixelFindCanvasEl.height=r,this.pixelFindContext.scale(t,t)}isTargetTransparent(e,t,r){const n=this.targetFindTolerance,s=this.pixelFindContext;this.clearContext(s),s.save(),s.translate(-t+n,-r+n),s.transform(...this.viewportTransform);const o=e.selectionBackgroundColor;e.selectionBackgroundColor="",e.render(s),e.selectionBackgroundColor=o,s.restore();const a=Math.round(n*this.getRetinaScaling());return G0(s,a,a,a)}_isSelectionKeyPressed(e){const t=this.selectionKey;return!!t&&(Array.isArray(t)?!!t.find(r=>!!r&&e[r]===!0):e[t])}_shouldClearSelection(e,t){const r=this.getActiveObjects(),n=this._activeObject;return!!(!t||t&&n&&r.length>1&&r.indexOf(t)===-1&&n!==t&&!this._isSelectionKeyPressed(e)||t&&!t.evented||t&&!t.selectable&&n&&n!==t)}_shouldCenterTransform(e,t,r){if(!e)return;let n;return t===ss||t===dt||t===wt||t===Mn?n=this.centeredScaling||e.centeredScaling:t===Xa&&(n=this.centeredRotation||e.centeredRotation),n?!r:r}_getOriginFromCorner(e,t){const r={x:e.originX,y:e.originY};return t&&(["ml","tl","bl"].includes(t)?r.x=je:["mr","tr","br"].includes(t)&&(r.x=Ce),["tl","mt","tr"].includes(t)?r.y=ra:["bl","mb","br"].includes(t)&&(r.y=ut)),r}_setupCurrentTransform(e,t,r){var n;const s=t.group?or(this.getScenePoint(e),void 0,t.group.calcTransformMatrix()):this.getScenePoint(e),{key:o="",control:a}=t.getActiveControl()||{},l=r&&a?(n=a.getActionHandler(e,t,a))===null||n===void 0?void 0:n.bind(a):Cf,c=((f,g,m,v)=>{if(!g||!f)return"drag";const p=v.controls[g];return p.getActionName(m,p,v)})(r,o,e,t),u=e[this.centeredKey],h=this._shouldCenterTransform(t,c,u)?{x:ue,y:ue}:this._getOriginFromCorner(t,o),d={target:t,action:c,actionHandler:l,actionPerformed:!1,corner:o,scaleX:t.scaleX,scaleY:t.scaleY,skewX:t.skewX,skewY:t.skewY,offsetX:s.x-t.left,offsetY:s.y-t.top,originX:h.x,originY:h.y,ex:s.x,ey:s.y,lastX:s.x,lastY:s.y,theta:Fe(t.angle),width:t.width,height:t.height,shiftKey:e.shiftKey,altKey:u,original:D(D({},bf(t)),{},{originX:h.x,originY:h.y})};this._currentTransform=d,this.fire("before:transform",{e,transform:d})}setCursor(e){this.upperCanvasEl.style.cursor=e}_drawSelection(e){const{x:t,y:r,deltaX:n,deltaY:s}=this._groupSelector,o=new L(t,r).transform(this.viewportTransform),a=new L(t+n,r+s).transform(this.viewportTransform),l=this.selectionLineWidth/2;let c=Math.min(o.x,a.x),u=Math.min(o.y,a.y),h=Math.max(o.x,a.x),d=Math.max(o.y,a.y);this.selectionColor&&(e.fillStyle=this.selectionColor,e.fillRect(c,u,h-c,d-u)),this.selectionLineWidth&&this.selectionBorderColor&&(e.lineWidth=this.selectionLineWidth,e.strokeStyle=this.selectionBorderColor,c+=l,u+=l,h-=l,d-=l,et.prototype._setLineDash.call(this,e,this.selectionDashArray),e.strokeRect(c,u,h-c,d-u))}findTarget(e){if(this.skipTargetFind)return;const t=this.getViewportPoint(e),r=this._activeObject,n=this.getActiveObjects();if(this.targets=[],r&&n.length>=1){if(r.findControl(t,ia(e))||n.length>1&&this.searchPossibleTargets([r],t))return r;if(r===this.searchPossibleTargets([r],t)){if(this.preserveObjectStacking){const s=this.targets;this.targets=[];const o=this.searchPossibleTargets(this._objects,t);return e[this.altSelectionKey]&&o&&o!==r?(this.targets=s,r):o}return r}}return this.searchPossibleTargets(this._objects,t)}_pointIsInObjectSelectionArea(e,t){let r=e.getCoords();const n=this.getZoom(),s=e.padding/n;if(s){const[o,a,l,c]=r,u=Math.atan2(a.y-o.y,a.x-o.x),h=Zt(u)*s,d=Jt(u)*s,f=h+d,g=h-d;r=[new L(o.x-g,o.y-f),new L(a.x+f,a.y-g),new L(l.x+g,l.y+f),new L(c.x-f,c.y+g)]}return Pe.isPointInPolygon(t,r)}_checkTarget(e,t){return!!(e&&e.visible&&e.evented&&this._pointIsInObjectSelectionArea(e,or(t,void 0,this.viewportTransform))&&(!this.perPixelTargetFind&&!e.perPixelTargetFind||e.isEditing||!this.isTargetTransparent(e,t.x,t.y)))}_searchPossibleTargets(e,t){let r=e.length;for(;r--;){const n=e[r];if(this._checkTarget(n,t)){if(Ti(n)&&n.subTargetCheck){const s=this._searchPossibleTargets(n._objects,t);s&&this.targets.push(s)}return n}}}searchPossibleTargets(e,t){const r=this._searchPossibleTargets(e,t);if(r&&Ti(r)&&r.interactive&&this.targets[0]){const n=this.targets;for(let s=n.length-1;s>0;s--){const o=n[s];if(!Ti(o)||!o.interactive)return o}return n[0]}return r}getViewportPoint(e){return this._pointer?this._pointer:this.getPointer(e,!0)}getScenePoint(e){return this._absolutePointer?this._absolutePointer:this.getPointer(e)}getPointer(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];const r=this.upperCanvasEl,n=r.getBoundingClientRect();let s=m0(e),o=n.width||0,a=n.height||0;o&&a||(ut in n&&ra in n&&(a=Math.abs(n.top-n.bottom)),je in n&&Ce in n&&(o=Math.abs(n.right-n.left))),this.calcOffset(),s.x=s.x-this._offset.left,s.y=s.y-this._offset.top,t||(s=or(s,void 0,this.viewportTransform));const l=this.getRetinaScaling();l!==1&&(s.x/=l,s.y/=l);const c=o===0||a===0?new L(1,1):new L(r.width/o,r.height/a);return s.multiply(c)}_setDimensionsImpl(e,t){this._resetTransformEventData(),super._setDimensionsImpl(e,t),this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._setBrushStyles(this.contextTop)}_createCacheCanvas(){this.pixelFindCanvasEl=Xe(),this.pixelFindContext=this.pixelFindCanvasEl.getContext("2d",{willReadFrequently:!0}),this.setTargetFindTolerance(this.targetFindTolerance)}getTopContext(){return this.elements.upper.ctx}getSelectionContext(){return this.elements.upper.ctx}getSelectionElement(){return this.elements.upper.el}getActiveObject(){return this._activeObject}getActiveObjects(){const e=this._activeObject;return vr(e)?e.getObjects():e?[e]:[]}_fireSelectionEvents(e,t){let r=!1,n=!1;const s=this.getActiveObjects(),o=[],a=[];e.forEach(l=>{s.includes(l)||(r=!0,l.fire("deselected",{e:t,target:l}),a.push(l))}),s.forEach(l=>{e.includes(l)||(r=!0,l.fire("selected",{e:t,target:l}),o.push(l))}),e.length>0&&s.length>0?(n=!0,r&&this.fire("selection:updated",{e:t,selected:o,deselected:a})):s.length>0?(n=!0,this.fire("selection:created",{e:t,selected:o})):e.length>0&&(n=!0,this.fire("selection:cleared",{e:t,deselected:a})),n&&(this._objectsToRender=void 0)}setActiveObject(e,t){const r=this.getActiveObjects(),n=this._setActiveObject(e,t);return this._fireSelectionEvents(r,t),n}_setActiveObject(e,t){const r=this._activeObject;return r!==e&&!(!this._discardActiveObject(t,e)&&this._activeObject)&&!e.onSelect({e:t})&&(this._activeObject=e,vr(e)&&r!==e&&e.set("canvas",this),e.setCoords(),!0)}_discardActiveObject(e,t){const r=this._activeObject;return!!r&&!r.onDeselect({e,object:t})&&(this._currentTransform&&this._currentTransform.target===r&&this.endCurrentTransform(e),vr(r)&&r===this._hoveredTarget&&(this._hoveredTarget=void 0),this._activeObject=void 0,!0)}discardActiveObject(e){const t=this.getActiveObjects(),r=this.getActiveObject();t.length&&this.fire("before:selection:cleared",{e,deselected:[r]});const n=this._discardActiveObject(e);return this._fireSelectionEvents(t,e),n}endCurrentTransform(e){const t=this._currentTransform;this._finalizeCurrentTransform(e),t&&t.target&&(t.target.isMoving=!1),this._currentTransform=null}_finalizeCurrentTransform(e){const t=this._currentTransform,r=t.target,n={e,target:r,transform:t,action:t.action};r._scaling&&(r._scaling=!1),r.setCoords(),t.actionPerformed&&(this.fire("object:modified",n),r.fire(Ii,n))}setViewportTransform(e){super.setViewportTransform(e);const t=this._activeObject;t&&t.setCoords()}destroy(){const e=this._activeObject;vr(e)&&(e.removeAll(),e.dispose()),delete this._activeObject,super.destroy(),this.pixelFindContext=null,this.pixelFindCanvasEl=void 0}clear(){this.discardActiveObject(),this._activeObject=void 0,this.clearContext(this.contextTop),super.clear()}drawControls(e){const t=this._activeObject;t&&t._renderControls(e)}_toObject(e,t,r){const n=this._realizeGroupTransformOnObject(e),s=super._toObject(e,t,r);return e.set(n),s}_realizeGroupTransformOnObject(e){const{group:t}=e;if(t&&vr(t)&&this._activeObject===t){const r=ln(e,["angle","flipX","flipY",Ce,dt,wt,on,an,ut]);return v0(e,t.calcOwnMatrix()),r}return{}}_setSVGObject(e,t,r){const n=this._realizeGroupTransformOnObject(t);super._setSVGObject(e,t,r),t.set(n)}}M(ds,"ownDefaults",{uniformScaling:!0,uniScaleKey:"shiftKey",centeredScaling:!1,centeredRotation:!1,centeredKey:"altKey",altActionKey:"shiftKey",selection:!0,selectionKey:"shiftKey",selectionColor:"rgba(100, 100, 255, 0.3)",selectionDashArray:[],selectionBorderColor:"rgba(255, 255, 255, 0.3)",selectionLineWidth:1,selectionFullyContained:!1,hoverCursor:"move",moveCursor:"move",defaultCursor:"default",freeDrawingCursor:"crosshair",notAllowedCursor:"not-allowed",perPixelTargetFind:!1,targetFindTolerance:0,skipTargetFind:!1,stopContextMenu:!1,fireRightClick:!1,fireMiddleClick:!1,enablePointerEvents:!1,containerClass:"canvas-container",preserveObjectStacking:!1});class Vm{constructor(e){M(this,"targets",[]),M(this,"__disposer",void 0);const t=()=>{const{hiddenTextarea:n}=e.getActiveObject()||{};n&&n.focus()},r=e.upperCanvasEl;r.addEventListener("click",t),this.__disposer=()=>r.removeEventListener("click",t)}exitTextEditing(){this.target=void 0,this.targets.forEach(e=>{e.isEditing&&e.exitEditing()})}add(e){this.targets.push(e)}remove(e){this.unregister(e),Br(this.targets,e)}register(e){this.target=e}unregister(e){e===this.target&&(this.target=void 0)}onMouseMove(e){var t;!((t=this.target)===null||t===void 0)&&t.isEditing&&this.target.updateSelectionOnMouseMove(e)}clear(){this.targets=[],this.target=void 0}dispose(){this.clear(),this.__disposer(),delete this.__disposer}}const Ym=["target","oldTarget","fireCanvas","e"],gt={passive:!1},Nr=(i,e)=>{const t=i.getViewportPoint(e),r=i.getScenePoint(e);return{viewportPoint:t,scenePoint:r,pointer:t,absolutePointer:r}},tr=function(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r1?e-1:0),r=1;r1&&arguments[1]!==void 0?arguments[1]:{}),M(this,"_isClick",void 0),M(this,"textEditingManager",new Vm(this)),["_onMouseDown","_onTouchStart","_onMouseMove","_onMouseUp","_onTouchEnd","_onResize","_onMouseWheel","_onMouseOut","_onMouseEnter","_onContextMenu","_onDoubleClick","_onDragStart","_onDragEnd","_onDragProgress","_onDragOver","_onDragEnter","_onDragLeave","_onDrop"].forEach(t=>{this[t]=this[t].bind(this)}),this.addOrRemove(tr,"add")}_getEventPrefix(){return this.enablePointerEvents?"pointer":"mouse"}addOrRemove(e,t){const r=this.upperCanvasEl,n=this._getEventPrefix();e(pf(r),"resize",this._onResize),e(r,n+"down",this._onMouseDown),e(r,"".concat(n,"move"),this._onMouseMove,gt),e(r,"".concat(n,"out"),this._onMouseOut),e(r,"".concat(n,"enter"),this._onMouseEnter),e(r,"wheel",this._onMouseWheel),e(r,"contextmenu",this._onContextMenu),e(r,"dblclick",this._onDoubleClick),e(r,"dragstart",this._onDragStart),e(r,"dragend",this._onDragEnd),e(r,"dragover",this._onDragOver),e(r,"dragenter",this._onDragEnter),e(r,"dragleave",this._onDragLeave),e(r,"drop",this._onDrop),this.enablePointerEvents||e(r,"touchstart",this._onTouchStart,gt)}removeListeners(){this.addOrRemove(_t,"remove");const e=this._getEventPrefix(),t=St(this.upperCanvasEl);_t(t,"".concat(e,"up"),this._onMouseUp),_t(t,"touchend",this._onTouchEnd,gt),_t(t,"".concat(e,"move"),this._onMouseMove,gt),_t(t,"touchmove",this._onMouseMove,gt)}_onMouseWheel(e){this.__onMouseWheel(e)}_onMouseOut(e){const t=this._hoveredTarget,r=D({e},Nr(this,e));this.fire("mouse:out",D(D({},r),{},{target:t})),this._hoveredTarget=void 0,t&&t.fire("mouseout",D({},r)),this._hoveredTargets.forEach(n=>{this.fire("mouse:out",D(D({},r),{},{target:n})),n&&n.fire("mouseout",D({},r))}),this._hoveredTargets=[]}_onMouseEnter(e){this._currentTransform||this.findTarget(e)||(this.fire("mouse:over",D({e},Nr(this,e))),this._hoveredTarget=void 0,this._hoveredTargets=[])}_onDragStart(e){this._isClick=!1;const t=this.getActiveObject();if(t&&t.onDragStart(e)){this._dragSource=t;const r={e,target:t};return this.fire("dragstart",r),t.fire("dragstart",r),void tr(this.upperCanvasEl,"drag",this._onDragProgress)}sa(e)}_renderDragEffects(e,t,r){let n=!1;const s=this._dropTarget;s&&s!==t&&s!==r&&(s.clearContextTop(),n=!0),t==null||t.clearContextTop(),r!==t&&(r==null||r.clearContextTop());const o=this.contextTop;o.save(),o.transform(...this.viewportTransform),t&&(o.save(),t.transform(o),t.renderDragSourceEffect(e),o.restore(),n=!0),r&&(o.save(),r.transform(o),r.renderDropTargetEffect(e),o.restore(),n=!0),o.restore(),n&&(this.contextTopDirty=!0)}_onDragEnd(e){const t=!!e.dataTransfer&&e.dataTransfer.dropEffect!==ht,r=t?this._activeObject:void 0,n={e,target:this._dragSource,subTargets:this.targets,dragSource:this._dragSource,didDrop:t,dropTarget:r};_t(this.upperCanvasEl,"drag",this._onDragProgress),this.fire("dragend",n),this._dragSource&&this._dragSource.fire("dragend",n),delete this._dragSource,this._onMouseUp(e)}_onDragProgress(e){const t={e,target:this._dragSource,dragSource:this._dragSource,dropTarget:this._draggedoverTarget};this.fire("drag",t),this._dragSource&&this._dragSource.fire("drag",t)}findDragTargets(e){return this.targets=[],{target:this._searchPossibleTargets(this._objects,this.getViewportPoint(e)),targets:[...this.targets]}}_onDragOver(e){const t="dragover",{target:r,targets:n}=this.findDragTargets(e),s=this._dragSource,o={e,target:r,subTargets:n,dragSource:s,canDrop:!1,dropTarget:void 0};let a;this.fire(t,o),this._fireEnterLeaveEvents(r,o),r&&(r.canDrop(e)&&(a=r),r.fire(t,o));for(let l=0;l0)return;this.__onMouseUp(e),this._resetTransformEventData(),delete this.mainTouchId;const t=this._getEventPrefix(),r=St(this.upperCanvasEl);_t(r,"touchend",this._onTouchEnd,gt),_t(r,"touchmove",this._onMouseMove,gt),this._willAddMouseDown&&clearTimeout(this._willAddMouseDown),this._willAddMouseDown=setTimeout(()=>{tr(this.upperCanvasEl,"".concat(t,"down"),this._onMouseDown),this._willAddMouseDown=0},400)}_onMouseUp(e){this.__onMouseUp(e),this._resetTransformEventData();const t=this.upperCanvasEl,r=this._getEventPrefix();if(this._isMainEvent(e)){const n=St(this.upperCanvasEl);_t(n,"".concat(r,"up"),this._onMouseUp),_t(n,"".concat(r,"move"),this._onMouseMove,gt),tr(t,"".concat(r,"move"),this._onMouseMove,gt)}}_onMouseMove(e){const t=this.getActiveObject();!this.allowTouchScrolling&&(!t||!t.shouldStartDragging(e))&&e.preventDefault&&e.preventDefault(),this.__onMouseMove(e)}_onResize(){this.calcOffset(),this._resetTransformEventData()}_shouldRender(e){const t=this.getActiveObject();return!!t!=!!e||t&&e&&t!==e}__onMouseUp(e){var t;this._cacheTransformEventData(e),this._handleEvent(e,"up:before");const r=this._currentTransform,n=this._isClick,s=this._target,{button:o}=e;if(o)return(this.fireMiddleClick&&o===1||this.fireRightClick&&o===2)&&this._handleEvent(e,"up"),void this._resetTransformEventData();if(this.isDrawingMode&&this._isCurrentlyDrawing)return void this._onMouseUpInDrawingMode(e);if(!this._isMainEvent(e))return;let a,l,c=!1;if(r&&(this._finalizeCurrentTransform(e),c=r.actionPerformed),!n){const u=s===this._activeObject;this.handleSelection(e),c||(c=this._shouldRender(s)||!u&&s===this._activeObject)}if(s){const u=s.findControl(this.getViewportPoint(e),ia(e)),{key:h,control:d}=u||{};if(l=h,s.selectable&&s!==this._activeObject&&s.activeOn==="up")this.setActiveObject(s,e),c=!0;else if(d){const f=d.getMouseUpHandler(e,s,d);f&&(a=this.getScenePoint(e),f.call(d,e,r,a.x,a.y))}s.isMoving=!1}if(r&&(r.target!==s||r.corner!==l)){const u=r.target&&r.target.controls[r.corner],h=u&&u.getMouseUpHandler(e,r.target,u);a=a||this.getScenePoint(e),h&&h.call(u,e,r,a.x,a.y)}this._setCursorFromEvent(e,s),this._handleEvent(e,"up"),this._groupSelector=null,this._currentTransform=null,s&&(s.__corner=void 0),c?this.requestRenderAll():n||(t=this._activeObject)!==null&&t!==void 0&&t.isEditing||this.renderTop()}_basicEventHandler(e,t){const{target:r,subTargets:n=[]}=t;this.fire(e,t),r&&r.fire(e,t);for(let s=0;s{r=o.hoverCursor||r}),this.setCursor(r)}handleMultiSelection(e,t){const r=this._activeObject,n=vr(r);if(r&&this._isSelectionKeyPressed(e)&&this.selection&&t&&t.selectable&&(r!==t||n)&&(n||!t.isDescendantOf(r)&&!r.isDescendantOf(t))&&!t.onSelect({e})&&!r.getActiveControl()){if(n){const s=r.getObjects();if(t===r){const o=this.getViewportPoint(e);if(!(t=this.searchPossibleTargets(s,o)||this.searchPossibleTargets(this._objects,o))||!t.selectable)return!1}t.group===r?(r.remove(t),this._hoveredTarget=t,this._hoveredTargets=[...this.targets],r.size()===1&&this._setActiveObject(r.item(0),e)):(r.multiSelectAdd(t),this._hoveredTarget=r,this._hoveredTargets=[...this.targets]),this._fireSelectionEvents(s,e)}else{r.exitEditing&&r.exitEditing();const s=new($.getClass("ActiveSelection"))([],{canvas:this});s.multiSelectAdd(r,t),this._hoveredTarget=s,this._setActiveObject(s,e),this._fireSelectionEvents([r],e)}return!0}return!1}handleSelection(e){if(!this.selection||!this._groupSelector)return!1;const{x:t,y:r,deltaX:n,deltaY:s}=this._groupSelector,o=new L(t,r),a=o.add(new L(n,s)),l=o.min(a),c=o.max(a).subtract(l),u=this.collectObjects({left:l.x,top:l.y,width:c.x,height:c.y},{includeIntersecting:!this.selectionFullyContained}),h=o.eq(a)?u[0]?[u[0]]:[]:u.length>1?u.filter(d=>!d.onSelect({e})).reverse():u;if(h.length===1)this.setActiveObject(h[0],e);else if(h.length>1){const d=$.getClass("ActiveSelection");this.setActiveObject(new d(h,{canvas:this}),e)}return this._groupSelector=null,!0}clear(){this.textEditingManager.clear(),super.clear()}destroy(){this.removeListeners(),this.textEditingManager.dispose(),super.destroy()}}const Qf={x1:0,y1:0,x2:0,y2:0},Wm=D(D({},Qf),{},{r1:0,r2:0}),Vr=(i,e)=>isNaN(i)&&typeof e=="number"?e:i,Gm=/^(\d+\.\d+)%|(\d+)%$/;function $f(i){return i&&Gm.test(i)}function ed(i,e){const t=typeof i=="number"?i:typeof i=="string"?parseFloat(i)/($f(i)?100:1):NaN;return Jr(0,Vr(t,e),1)}const Hm=/\s*;\s*/,qm=/\s*:\s*/;function Um(i,e){let t,r;const n=i.getAttribute("style");if(n){const o=n.split(Hm);o[o.length-1]===""&&o.pop();for(let a=o.length;a--;){const[l,c]=o[a].split(qm).map(u=>u.trim());l==="stop-color"?t=c:l==="stop-opacity"&&(r=c)}}const s=new ke(t||i.getAttribute("stop-color")||"rgb(0,0,0)");return{offset:ed(i.getAttribute("offset"),0),color:s.toRgb(),opacity:Vr(parseFloat(r||i.getAttribute("stop-opacity")||""),1)*s.getAlpha()*e}}function Km(i,e){const t=[],r=i.getElementsByTagName("stop"),n=ed(e,1);for(let s=r.length;s--;)t.push(Um(r[s],n));return t}function td(i){return i.nodeName==="linearGradient"||i.nodeName==="LINEARGRADIENT"?"linear":"radial"}function rd(i){return i.getAttribute("gradientUnits")==="userSpaceOnUse"?"pixels":"percentage"}function Ct(i,e){return i.getAttribute(e)}function Zm(i,e){return function(t,r){let n,{width:s,height:o,gradientUnits:a}=r;return Object.keys(t).reduce((l,c)=>{const u=t[c];return u==="Infinity"?n=1:u==="-Infinity"?n=0:(n=typeof u=="string"?parseFloat(u):u,typeof u=="string"&&$f(u)&&(n*=.01,a==="pixels"&&(c!=="x1"&&c!=="x2"&&c!=="r2"||(n*=s),c!=="y1"&&c!=="y2"||(n*=o)))),l[c]=n,l},{})}(td(i)==="linear"?function(t){return{x1:Ct(t,"x1")||0,y1:Ct(t,"y1")||0,x2:Ct(t,"x2")||"100%",y2:Ct(t,"y2")||0}}(i):function(t){return{x1:Ct(t,"fx")||Ct(t,"cx")||"50%",y1:Ct(t,"fy")||Ct(t,"cy")||"50%",r1:0,x2:Ct(t,"cx")||"50%",y2:Ct(t,"cy")||"50%",r2:Ct(t,"r")||"50%"}}(i),D(D({},e),{},{gradientUnits:rd(i)}))}class $n{constructor(e){const{type:t="linear",gradientUnits:r="pixels",coords:n={},colorStops:s=[],offsetX:o=0,offsetY:a=0,gradientTransform:l,id:c}=e||{};Object.assign(this,{type:t,gradientUnits:r,coords:D(D({},t==="radial"?Wm:Qf),n),colorStops:s,offsetX:o,offsetY:a,gradientTransform:l,id:c?"".concat(c,"_").concat(lr()):lr()})}addColorStop(e){for(const t in e){const r=new ke(e[t]);this.colorStops.push({offset:parseFloat(t),color:r.toRgb(),opacity:r.getAlpha()})}return this}toObject(e){return D(D({},ln(this,e)),{},{type:this.type,coords:D({},this.coords),colorStops:this.colorStops.map(t=>D({},t)),offsetX:this.offsetX,offsetY:this.offsetY,gradientUnits:this.gradientUnits,gradientTransform:this.gradientTransform?[...this.gradientTransform]:void 0})}toSVG(e){let{additionalTransform:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=[],n=this.gradientTransform?this.gradientTransform.concat():st.concat(),s=this.gradientUnits==="pixels"?"userSpaceOnUse":"objectBoundingBox",o=this.colorStops.map(h=>D({},h)).sort((h,d)=>h.offset-d.offset);let a=-this.offsetX,l=-this.offsetY;var c;s==="objectBoundingBox"?(a/=e.width,l/=e.height):(a+=e.width/2,l+=e.height/2),(c=e)&&typeof c._renderPathCommands=="function"&&this.gradientUnits!=="percentage"&&(a-=e.pathOffset.x,l-=e.pathOffset.y),n[4]-=a,n[5]-=l;const u=['id="SVGID_'.concat(this.id,'"'),'gradientUnits="'.concat(s,'"'),'gradientTransform="'.concat(t?t+" ":"").concat(Vi(n),'"'),""].join(" ");if(this.type==="linear"){const{x1:h,y1:d,x2:f,y2:g}=this.coords;r.push(" -`)}else if(this.type==="radial"){const{x1:h,y1:d,x2:f,y2:g,r1:m,r2:v}=this.coords,p=m>v;r.push(" -`),p&&(o.reverse(),o.forEach(C=>{C.offset=1-C.offset}));const b=Math.min(m,v);if(b>0){const C=b/Math.max(m,v);o.forEach(y=>{y.offset+=C*(1-y.offset)})}}return o.forEach(h=>{let{color:d,offset:f,opacity:g}=h;r.push(" -`)}),r.push(this.type==="linear"?"":"",` -`),r.join("")}toLive(e){const{x1:t,y1:r,x2:n,y2:s,r1:o,r2:a}=this.coords,l=this.type==="linear"?e.createLinearGradient(t,r,n,s):e.createRadialGradient(t,r,o,n,s,a);return this.colorStops.forEach(c=>{let{color:u,opacity:h,offset:d}=c;l.addColorStop(d,h!==void 0?new ke(u).setAlpha(h).toRgba():u)}),l}static fromObject(e){return Me(this,null,function*(){const{colorStops:t,gradientTransform:r}=e;return new this(D(D({},e),{},{colorStops:t?t.map(n=>D({},n)):void 0,gradientTransform:r?[...r]:void 0}))})}static fromElement(e,t,r){const n=rd(e),s=t._findCenterFromElement();return new this(D({id:e.getAttribute("id")||void 0,type:td(e),coords:Zm(e,{width:r.viewBoxWidth||r.width,height:r.viewBoxHeight||r.height}),colorStops:Km(e,r.opacity),gradientUnits:n,gradientTransform:fa(e.getAttribute("gradientTransform")||"")},n==="pixels"?{offsetX:t.width/2-s.x,offsetY:t.height/2-s.y}:{offsetX:0,offsetY:0}))}}M($n,"type","Gradient"),$.setClass($n,"gradient"),$.setClass($n,"linear"),$.setClass($n,"radial");const Jm=["type","source","patternTransform"];class Bo{get type(){return"pattern"}set type(e){ar("warn","Setting type has no effect",e)}constructor(e){M(this,"repeat","repeat"),M(this,"offsetX",0),M(this,"offsetY",0),M(this,"crossOrigin",""),this.id=lr(),Object.assign(this,e)}isImageSource(){return!!this.source&&typeof this.source.src=="string"}isCanvasSource(){return!!this.source&&!!this.source.toDataURL}sourceToString(){return this.isImageSource()?this.source.src:this.isCanvasSource()?this.source.toDataURL():""}toLive(e){return this.source&&(!this.isImageSource()||this.source.complete&&this.source.naturalWidth!==0&&this.source.naturalHeight!==0)?e.createPattern(this.source,this.repeat):null}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const{repeat:t,crossOrigin:r}=this;return D(D({},ln(this,e)),{},{type:"pattern",source:this.sourceToString(),repeat:t,crossOrigin:r,offsetX:Ae(this.offsetX,pe.NUM_FRACTION_DIGITS),offsetY:Ae(this.offsetY,pe.NUM_FRACTION_DIGITS),patternTransform:this.patternTransform?[...this.patternTransform]:null})}toSVG(e){let{width:t,height:r}=e;const{source:n,repeat:s,id:o}=this,a=Vr(this.offsetX/t,0),l=Vr(this.offsetY/r,0),c=s==="repeat-y"||s==="no-repeat"?1+Math.abs(a||0):Vr(n.width/t,0),u=s==="repeat-x"||s==="no-repeat"?1+Math.abs(l||0):Vr(n.height/r,0);return[''),''),"",""].join(` -`)}static fromObject(e,t){return Me(this,null,function*(){let{type:r,source:n,patternTransform:s}=e,o=De(e,Jm);const a=yield Oi(n,D(D({},t),{},{crossOrigin:o.crossOrigin}));return new this(D(D({},o),{},{patternTransform:s&&s.slice(0),source:a}))})}}M(Bo,"type","Pattern"),$.setClass(Bo),$.setClass(Bo,"pattern");const Qm=["path","left","top"],$m=["d"];class _r extends et{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{path:r,left:n,top:s}=t,o=De(t,Qm);super(),Object.assign(this,_r.ownDefaults),this.setOptions(o),this._setPath(e||[],!0),typeof n=="number"&&this.set(Ce,n),typeof s=="number"&&this.set(ut,s)}_setPath(e,t){this.path=Dm(Array.isArray(e)?e:Im(e)),this.setBoundingBox(t)}_findCenterFromElement(){const e=this._calcBoundsFromPath();return new L(e.left+e.width/2,e.top+e.height/2)}_renderPathCommands(e){const t=-this.pathOffset.x,r=-this.pathOffset.y;e.beginPath();for(const n of this.path)switch(n[0]){case"L":e.lineTo(n[1]+t,n[2]+r);break;case"M":e.moveTo(n[1]+t,n[2]+r);break;case"C":e.bezierCurveTo(n[1]+t,n[2]+r,n[3]+t,n[4]+r,n[5]+t,n[6]+r);break;case"Q":e.quadraticCurveTo(n[1]+t,n[2]+r,n[3]+t,n[4]+r);break;case"Z":e.closePath()}}_render(e){this._renderPathCommands(e),this._renderPaintInOrder(e)}toString(){return"#")}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D(D({},super.toObject(e)),{},{path:this.path.map(t=>t.slice())})}toDatalessObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const t=this.toObject(e);return this.sourcePath&&(delete t.path,t.sourcePath=this.sourcePath),t}_toSVG(){const e=Bm(this.path,pe.NUM_FRACTION_DIGITS);return[" -`)]}_getOffsetTransform(){const e=pe.NUM_FRACTION_DIGITS;return" translate(".concat(Ae(-this.pathOffset.x,e),", ").concat(Ae(-this.pathOffset.y,e),")")}toClipPathSVG(e){const t=this._getOffsetTransform();return" "+this._createBaseClipPathSVGMarkup(this._toSVG(),{reviver:e,additionalTransform:t})}toSVG(e){const t=this._getOffsetTransform();return this._createBaseSVGMarkup(this._toSVG(),{reviver:e,additionalTransform:t})}complexity(){return this.path.length}setDimensions(){this.setBoundingBox()}setBoundingBox(e){const{width:t,height:r,pathOffset:n}=this._calcDimensions();this.set({width:t,height:r,pathOffset:n}),e&&this.setPositionByOrigin(n,ue,ue)}_calcBoundsFromPath(){const e=[];let t=0,r=0,n=0,s=0;for(const o of this.path)switch(o[0]){case"L":n=o[1],s=o[2],e.push({x:t,y:r},{x:n,y:s});break;case"M":n=o[1],s=o[2],t=n,r=s;break;case"C":e.push(...ou(n,s,o[1],o[2],o[3],o[4],o[5],o[6])),n=o[5],s=o[6];break;case"Q":e.push(...ou(n,s,o[1],o[2],o[1],o[2],o[3],o[4])),n=o[3],s=o[4];break;case"Z":n=t,s=r}return Ut(e)}_calcDimensions(){const e=this._calcBoundsFromPath();return D(D({},e),{},{pathOffset:new L(e.left+e.width/2,e.top+e.height/2)})}static fromObject(e){return this._fromObject(e,{extraParam:"path"})}static fromElement(e,t,r){return Me(this,null,function*(){const n=$t(e,this.ATTRIBUTE_NAMES,r),{d:s}=n;return new this(s,D(D(D({},De(n,$m)),t),{},{left:void 0,top:void 0}))})}}M(_r,"type","Path"),M(_r,"cacheProperties",[...Qt,"path","fillRule"]),M(_r,"ATTRIBUTE_NAMES",[...dr,"d"]),$.setClass(_r),$.setSVGClass(_r);const ep=["left","top","radius"],nd=["radius","startAngle","endAngle","counterClockwise"];class Wt extends et{static getDefaults(){return D(D({},super.getDefaults()),Wt.ownDefaults)}constructor(e){super(),Object.assign(this,Wt.ownDefaults),this.setOptions(e)}_set(e,t){return super._set(e,t),e==="radius"&&this.setRadius(t),this}_render(e){e.beginPath(),e.arc(0,0,this.radius,Fe(this.startAngle),Fe(this.endAngle),this.counterClockwise),this._renderPaintInOrder(e)}getRadiusX(){return this.get("radius")*this.get(dt)}getRadiusY(){return this.get("radius")*this.get(wt)}setRadius(e){this.radius=e,this.set({width:2*e,height:2*e})}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return super.toObject([...nd,...e])}_toSVG(){const e=(this.endAngle-this.startAngle)%360;if(e===0)return[" -`];{const{radius:t}=this,r=Fe(this.startAngle),n=Fe(this.endAngle),s=Zt(r)*t,o=Jt(r)*t,a=Zt(n)*t,l=Jt(n)*t,c=e>180?1:0,u=this.counterClockwise?0:1;return[' -`]}}static fromElement(e,t,r){return Me(this,null,function*(){const n=$t(e,this.ATTRIBUTE_NAMES,r),{left:s=0,top:o=0,radius:a=0}=n;return new this(D(D({},De(n,ep)),{},{radius:a,left:s-a,top:o-a}))})}static fromObject(e){return super._fromObject(e)}}M(Wt,"type","Circle"),M(Wt,"cacheProperties",[...Qt,...nd]),M(Wt,"ownDefaults",{radius:0,startAngle:0,endAngle:360,counterClockwise:!1}),M(Wt,"ATTRIBUTE_NAMES",["cx","cy","r",...dr]),$.setClass(Wt),$.setSVGClass(Wt);const tp=["x1","y1","x2","y2"],rp=["x1","y1","x2","y2"],va=["x1","x2","y1","y2"];class sr extends et{constructor(){let[e,t,r,n]=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[0,0,0,0],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Object.assign(this,sr.ownDefaults),this.setOptions(s),this.x1=e,this.x2=r,this.y1=t,this.y2=n,this._setWidthHeight();const{left:o,top:a}=s;typeof o=="number"&&this.set(Ce,o),typeof a=="number"&&this.set(ut,a)}_setWidthHeight(){const{x1:e,y1:t,x2:r,y2:n}=this;this.width=Math.abs(r-e),this.height=Math.abs(n-t);const{left:s,top:o,width:a,height:l}=Ut([{x:e,y:t},{x:r,y:n}]),c=new L(s+a/2,o+l/2);this.setPositionByOrigin(c,ue,ue)}_set(e,t){return super._set(e,t),va.includes(e)&&this._setWidthHeight(),this}_render(e){e.beginPath();const t=this.calcLinePoints();e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2),e.lineWidth=this.strokeWidth;const r=e.strokeStyle;var n;yt(this.stroke)?e.strokeStyle=this.stroke.toLive(e):e.strokeStyle=(n=this.stroke)!==null&&n!==void 0?n:e.fillStyle,this.stroke&&this._renderStroke(e),e.strokeStyle=r}_findCenterFromElement(){return new L((this.x1+this.x2)/2,(this.y1+this.y2)/2)}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D(D({},super.toObject(e)),this.calcLinePoints())}_getNonTransformedDimensions(){const e=super._getNonTransformedDimensions();return this.strokeLineCap==="butt"&&(this.width===0&&(e.y-=this.strokeWidth),this.height===0&&(e.x-=this.strokeWidth)),e}calcLinePoints(){const{x1:e,x2:t,y1:r,y2:n,width:s,height:o}=this,a=e<=t?-1:1,l=r<=n?-1:1;return{x1:a*s/2,x2:a*-s/2,y1:l*o/2,y2:l*-o/2}}_toSVG(){const{x1:e,x2:t,y1:r,y2:n}=this.calcLinePoints();return[" -`)]}static fromElement(e,t,r){return Me(this,null,function*(){const n=$t(e,this.ATTRIBUTE_NAMES,r),{x1:s=0,y1:o=0,x2:a=0,y2:l=0}=n;return new this([s,o,a,l],De(n,tp))})}static fromObject(e){let{x1:t,y1:r,x2:n,y2:s}=e,o=De(e,rp);return this._fromObject(D(D({},o),{},{points:[t,r,n,s]}),{extraParam:"points"})}}M(sr,"type","Line"),M(sr,"cacheProperties",[...Qt,...va]),M(sr,"ATTRIBUTE_NAMES",dr.concat(va)),$.setClass(sr),$.setSVGClass(sr);class yr extends et{static getDefaults(){return D(D({},super.getDefaults()),yr.ownDefaults)}constructor(e){super(),Object.assign(this,yr.ownDefaults),this.setOptions(e)}_render(e){const t=this.width/2,r=this.height/2;e.beginPath(),e.moveTo(-t,r),e.lineTo(0,-r),e.lineTo(t,r),e.closePath(),this._renderPaintInOrder(e)}_toSVG(){const e=this.width/2,t=this.height/2;return["']}}M(yr,"type","Triangle"),M(yr,"ownDefaults",{width:100,height:100}),$.setClass(yr),$.setSVGClass(yr);const id=["rx","ry"];class Gt extends et{static getDefaults(){return D(D({},super.getDefaults()),Gt.ownDefaults)}constructor(e){super(),Object.assign(this,Gt.ownDefaults),this.setOptions(e)}_set(e,t){switch(super._set(e,t),e){case"rx":this.rx=t,this.set("width",2*t);break;case"ry":this.ry=t,this.set("height",2*t)}return this}getRx(){return this.get("rx")*this.get(dt)}getRy(){return this.get("ry")*this.get(wt)}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return super.toObject([...id,...e])}_toSVG(){return[" -`)]}_render(e){e.beginPath(),e.save(),e.transform(1,0,0,this.ry/this.rx,0,0),e.arc(0,0,this.rx,0,Ri,!1),e.restore(),this._renderPaintInOrder(e)}static fromElement(e,t,r){return Me(this,null,function*(){const n=$t(e,this.ATTRIBUTE_NAMES,r);return n.left=(n.left||0)-n.rx,n.top=(n.top||0)-n.ry,new this(n)})}}function np(i){if(!i)return[];const e=i.replace(/,/g," ").trim().split(/\s+/),t=[];for(let r=0;r0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),M(this,"strokeDiff",void 0),Object.assign(this,xt.ownDefaults),this.setOptions(t),this.points=e;const{left:r,top:n}=t;this.initialized=!0,this.setBoundingBox(!0),typeof r=="number"&&this.set(Ce,r),typeof n=="number"&&this.set(ut,n)}isOpen(){return!0}_projectStrokeOnPoints(e){return q0(this.points,e,this.isOpen())}_calcDimensions(e){e=D({scaleX:this.scaleX,scaleY:this.scaleY,skewX:this.skewX,skewY:this.skewY,strokeLineCap:this.strokeLineCap,strokeLineJoin:this.strokeLineJoin,strokeMiterLimit:this.strokeMiterLimit,strokeUniform:this.strokeUniform,strokeWidth:this.strokeWidth},e||{});const t=this.exactBoundingBox?this._projectStrokeOnPoints(e).map(c=>c.projectedPoint):this.points;if(t.length===0)return{left:0,top:0,width:0,height:0,pathOffset:new L,strokeOffset:new L,strokeDiff:new L};const r=Ut(t),n=os(D(D({},e),{},{scaleX:1,scaleY:1})),s=Ut(this.points.map(c=>lt(c,n,!0))),o=new L(this.scaleX,this.scaleY);let a=r.left+r.width/2,l=r.top+r.height/2;return this.exactBoundingBox&&(a-=l*Math.tan(Fe(this.skewX)),l-=a*Math.tan(Fe(this.skewY))),D(D({},r),{},{pathOffset:new L(a,l),strokeOffset:new L(s.left,s.top).subtract(new L(r.left,r.top)).multiply(o),strokeDiff:new L(r.width,r.height).subtract(new L(s.width,s.height)).multiply(o)})}_findCenterFromElement(){const e=Ut(this.points);return new L(e.left+e.width/2,e.top+e.height/2)}setDimensions(){this.setBoundingBox()}setBoundingBox(e){const{left:t,top:r,width:n,height:s,pathOffset:o,strokeOffset:a,strokeDiff:l}=this._calcDimensions();this.set({width:n,height:s,pathOffset:o,strokeOffset:a,strokeDiff:l}),e&&this.setPositionByOrigin(new L(t+n/2,r+s/2),ue,ue)}isStrokeAccountedForInDimensions(){return this.exactBoundingBox}_getNonTransformedDimensions(){return this.exactBoundingBox?new L(this.width,this.height):super._getNonTransformedDimensions()}_getTransformedDimensions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.exactBoundingBox){let o;if(Object.keys(e).some(a=>this.strokeUniform||this.constructor.layoutProperties.includes(a))){var t,r;const{width:a,height:l}=this._calcDimensions(e);o=new L((t=e.width)!==null&&t!==void 0?t:a,(r=e.height)!==null&&r!==void 0?r:l)}else{var n,s;o=new L((n=e.width)!==null&&n!==void 0?n:this.width,(s=e.height)!==null&&s!==void 0?s:this.height)}return o.multiply(new L(e.scaleX||this.scaleX,e.scaleY||this.scaleY))}return super._getTransformedDimensions(e)}_set(e,t){const r=this.initialized&&this[e]!==t,n=super._set(e,t);return this.exactBoundingBox&&r&&((e===dt||e===wt)&&this.strokeUniform&&this.constructor.layoutProperties.includes("strokeUniform")||this.constructor.layoutProperties.includes(e))&&this.setDimensions(),n}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D(D({},super.toObject(e)),{},{points:this.points.map(t=>{let{x:r,y:n}=t;return{x:r,y:n}})})}_toSVG(){const e=[],t=this.pathOffset.x,r=this.pathOffset.y,n=pe.NUM_FRACTION_DIGITS;for(let s=0,o=this.points.length;s -`)]}_render(e){const t=this.points.length,r=this.pathOffset.x,n=this.pathOffset.y;if(t&&!isNaN(this.points[t-1].y)){e.beginPath(),e.moveTo(this.points[0].x-r,this.points[0].y-n);for(let s=0;so!==void 0);this._setStyleDeclaration(r,n,s)}getSelectionStyles(e,t,r){const n=[];for(let s=e;s<(t||e);s++)n.push(this.getStyleAtPosition(s,r));return n}getStyleAtPosition(e,t){const{lineIndex:r,charIndex:n}=this.get2DCursorLocation(e);return t?this.getCompleteStyleDeclaration(r,n):this._getStyleDeclaration(r,n)}setSelectionStyles(e,t,r){for(let n=t;n<(r||t);n++)this._extendStyles(n,e);this._forceClearCache=!0}_getStyleDeclaration(e,t){var r;const n=this.styles&&this.styles[e];return n&&(r=n[t])!==null&&r!==void 0?r:{}}getCompleteStyleDeclaration(e,t){return D(D({},ln(this,this.constructor._styleProperties)),this._getStyleDeclaration(e,t))}_setStyleDeclaration(e,t,r){this.styles[e][t]=r}_deleteStyleDeclaration(e,t){delete this.styles[e][t]}_getLineStyle(e){return!!this.styles[e]}_setLineStyle(e){this.styles[e]={}}_deleteLineStyle(e){delete this.styles[e]}}M(ud,"_styleProperties",sp);const ap=/ +/g,lp=/"/g;function zo(i,e,t,r,n){return" ".concat(function(s,o){let{left:a,top:l,width:c,height:u}=o,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pe.NUM_FRACTION_DIGITS;const d=An(ze,s,!1),[f,g,m,v]=[a,l,c,u].map(p=>Ae(p,h));return"')}(i,{left:e,top:t,width:r,height:n}),` -`)}const cp=["textAnchor","textDecoration","dx","dy","top","left","fontSize","strokeWidth"];let Vo;class rt extends ud{static getDefaults(){return D(D({},super.getDefaults()),rt.ownDefaults)}constructor(e,t){super(),M(this,"__charBounds",[]),Object.assign(this,rt.ownDefaults),this.setOptions(t),this.styles||(this.styles={}),this.text=e,this.initialized=!0,this.path&&this.setPathInfo(),this.initDimensions(),this.setCoords()}setPathInfo(){const e=this.path;e&&(e.segmentsInfo=Jf(e.path))}_splitText(){const e=this._splitTextIntoLines(this.text);return this.textLines=e.lines,this._textLines=e.graphemeLines,this._unwrappedTextLines=e._unwrappedLines,this._text=e.graphemeText,e}initDimensions(){this._splitText(),this._clearCache(),this.dirty=!0,this.path?(this.width=this.path.width,this.height=this.path.height):(this.width=this.calcTextWidth()||this.cursorWidth||this.MIN_TEXT_WIDTH,this.height=this.calcTextHeight()),this.textAlign.includes(Lt)&&this.enlargeSpaces()}enlargeSpaces(){let e,t,r,n,s,o,a;for(let l=0,c=this._textLines.length;l')}_getCacheCanvasDimensions(){const e=super._getCacheCanvasDimensions(),t=this.fontSize;return e.width+=t*e.zoomX,e.height+=t*e.zoomY,e}_render(e){const t=this.path;t&&!t.isNotVisible()&&t._render(e),this._setTextStyles(e),this._renderTextLinesBackground(e),this._renderTextDecoration(e,"underline"),this._renderText(e),this._renderTextDecoration(e,"overline"),this._renderTextDecoration(e,"linethrough")}_renderText(e){this.paintFirst===ft?(this._renderTextStroke(e),this._renderTextFill(e)):(this._renderTextFill(e),this._renderTextStroke(e))}_setTextStyles(e,t,r){if(e.textBaseline="alphabetic",this.path)switch(this.pathAlign){case ue:e.textBaseline="middle";break;case"ascender":e.textBaseline=ut;break;case"descender":e.textBaseline=ra}e.font=this._getFontDeclaration(t,r)}calcTextWidth(){let e=this.getLineWidth(0);for(let t=1,r=this._textLines.length;te&&(e=n)}return e}_renderTextLine(e,t,r,n,s,o){this._renderChars(e,t,r,n,s,o)}_renderTextLinesBackground(e){if(!this.textBackgroundColor&&!this.styleHas("textBackgroundColor"))return;const t=e.fillStyle,r=this._getLeftOffset();let n=this._getTopOffset();for(let s=0,o=this._textLines.length;s=0:dh?u%=h:u<0&&(u+=h),this._setGraphemeOnPath(u,r),u+=r.kernedWidth}return{width:n,numOfSpaces:0}}_setGraphemeOnPath(e,t){const r=e+t.kernedWidth/2,n=this.path,s=jm(n.path,r,n.segmentsInfo);t.renderLeft=s.x-n.pathOffset.x,t.renderTop=s.y-n.pathOffset.y,t.angle=s.angle+(this.pathSide===je?Math.PI:0)}_getGraphemeBox(e,t,r,n,s){const o=this.getCompleteStyleDeclaration(t,r),a=n?this.getCompleteStyleDeclaration(t,r-1):{},l=this._measureChar(e,o,n,a);let c,u=l.kernedWidth,h=l.width;this.charSpacing!==0&&(c=this._getWidthOfCharSpacing(),h+=c,u+=c);const d={width:h,left:0,height:o.fontSize,kernedWidth:u,deltaY:o.deltaY};if(r>0&&!s){const f=this.__charBounds[t][r-1];d.left=f.left+f.width+l.kernedWidth-l.width}return d}getHeightOfLine(e){if(this.__lineHeights[e])return this.__lineHeights[e];let t=this.getHeightOfChar(e,0);for(let r=1,n=this._textLines[e].length;r0){let R=n+f+v;this.direction==="rtl"&&(R=this.width-R-p),b&&C&&(e.fillStyle=C,e.fillRect(R,y+a*w+x,p,this.fontSize/15)),v=_.left,p=_.width,b=g,C=m,w=W,x=F}else p+=_.kernedWidth}let k=n+f+v;this.direction==="rtl"&&(k=this.width-k-p),e.fillStyle=m,g&&m&&e.fillRect(k,y+a*w+x,p-o,this.fontSize/15),r+=u}this._removeShadow(e)}_getFontDeclaration(){let{fontFamily:e=this.fontFamily,fontStyle:t=this.fontStyle,fontWeight:r=this.fontWeight,fontSize:n=this.fontSize}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;const o=e.includes("'")||e.includes('"')||e.includes(",")||rt.genericFonts.includes(e.toLowerCase())?e:'"'.concat(e,'"');return[t,r,"".concat(s?this.CACHE_FONT_SIZE:n,"px"),o].join(" ")}render(e){this.visible&&(this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(this._forceClearCache&&this.initDimensions(),super.render(e)))}graphemeSplit(e){return rl(e)}_splitTextIntoLines(e){const t=e.split(this._reNewline),r=new Array(t.length),n=[` -`];let s=[];for(let o=0;o0&&arguments[0]!==void 0?arguments[0]:[];return D(D({},super.toObject([...cd,...e])),{},{styles:Z0(this.styles,this.text)},this.path?{path:this.path.toObject()}:{})}set(e,t){const{textLayoutProperties:r}=this.constructor;super.set(e,t);let n=!1,s=!1;if(typeof e=="object")for(const o in e)o==="path"&&this.setPathInfo(),n=n||r.includes(o),s=s||o==="path";else n=r.includes(e),s=e==="path";return s&&this.setPathInfo(),n&&this.initialized&&(this.initDimensions(),this.setCoords()),this}complexity(){return 1}static fromElement(e,t,r){return Me(this,null,function*(){const n=$t(e,rt.ATTRIBUTE_NAMES,r),s=D(D({},t),n),{textAnchor:o=Ce,textDecoration:a="",dx:l=0,dy:c=0,top:u=0,left:h=0,fontSize:d=Va,strokeWidth:f=1}=s,g=De(s,cp),m=new this((e.textContent||"").replace(/^\s+|\s+$|\n+/g,"").replace(/\s+/g," "),D({left:h+l,top:u+c,underline:a.includes("underline"),overline:a.includes("overline"),linethrough:a.includes("line-through"),strokeWidth:0,fontSize:d},g)),v=m.getScaledHeight()/m.height,p=((m.height+m.strokeWidth)*m.lineHeight-m.height)*v,b=m.getScaledHeight()+p;let C=0;return o===ue&&(C=m.getScaledWidth()/2),o===je&&(C=m.getScaledWidth()),m.set({left:m.left-C,top:m.top-(b-m.fontSize*(.07+m._fontSizeFraction))/m.lineHeight,strokeWidth:f}),m})}static fromObject(e){return this._fromObject(D(D({},e),{},{styles:J0(e.styles||{},e.text)}),{extraParam:"text"})}}M(rt,"textLayoutProperties",ld),M(rt,"cacheProperties",[...Qt,...cd]),M(rt,"ownDefaults",op),M(rt,"type","Text"),M(rt,"genericFonts",["sans-serif","serif","cursive","fantasy","monospace"]),M(rt,"ATTRIBUTE_NAMES",dr.concat("x","y","dx","dy","font-family","font-style","font-weight","font-size","letter-spacing","text-decoration","text-anchor")),Yf(rt,[class extends xf{_toSVG(){const i=this._getSVGLeftTopOffsets(),e=this._getSVGTextAndBg(i.textTop,i.textLeft);return this._wrapSVGTextAndBg(e)}toSVG(i){return this._createBaseSVGMarkup(this._toSVG(),{reviver:i,noStyle:!0,withShadow:!0})}_getSVGLeftTopOffsets(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}}_wrapSVGTextAndBg(i){let{textBgRects:e,textSpans:t}=i;const r=this.getSvgTextDecoration(this);return[e.join(""),' ",t.join(""),` -`]}_getSVGTextAndBg(i,e){const t=[],r=[];let n,s=i;this.backgroundColor&&r.push(...zo(this.backgroundColor,-this.width/2,-this.height/2,this.width,this.height));for(let o=0,a=this._textLines.length;o").concat(U0(i),"")}_setSVGTextLineText(i,e,t,r){const n=this.getHeightOfLine(e),s=this.textAlign.includes(Lt),o=this._textLines[e];let a,l,c,u,h,d="",f=0;r+=n*(1-this._fontSizeFraction)/this.lineHeight;for(let g=0,m=o.length-1;g<=m;g++)h=g===m||this.charSpacing,d+=o[g],c=this.__charBounds[e][g],f===0?(t+=c.kernedWidth-c.width,f+=c.width):f+=c.kernedWidth,s&&!h&&this._reSpaceAndTab.test(o[g])&&(h=!0),h||(a=a||this.getCompleteStyleDeclaration(e,g),l=this.getCompleteStyleDeclaration(e,g+1),h=nl(a,l,!0)),h&&(u=this._getStyleDeclaration(e,g),i.push(this._createTextCharSpan(d,u,t,r)),d="",a=l,this.direction==="rtl"?t-=f:t+=f,f=0)}_setSVGTextLineBg(i,e,t,r){const n=this._textLines[e],s=this.getHeightOfLine(e)/this.lineHeight;let o,a=0,l=0,c=this.getValueOfPropertyAt(e,0,"textBackgroundColor");for(let u=0;ui[e.replace("-","")]).join(" ")}}]),$.setClass(rt),$.setSVGClass(rt);class up{constructor(e){M(this,"target",void 0),M(this,"__mouseDownInPlace",!1),M(this,"__dragStartFired",!1),M(this,"__isDraggingOver",!1),M(this,"__dragStartSelection",void 0),M(this,"__dragImageDisposer",void 0),M(this,"_dispose",void 0),this.target=e;const t=[this.target.on("dragenter",this.dragEnterHandler.bind(this)),this.target.on("dragover",this.dragOverHandler.bind(this)),this.target.on("dragleave",this.dragLeaveHandler.bind(this)),this.target.on("dragend",this.dragEndHandler.bind(this)),this.target.on("drop",this.dropHandler.bind(this))];this._dispose=()=>{t.forEach(r=>r()),this._dispose=void 0}}isPointerOverSelection(e){const t=this.target,r=t.getSelectionStartFromPointer(e);return t.isEditing&&r>=t.selectionStart&&r<=t.selectionEnd&&t.selectionStart{y.remove()},St(e.target||this.target.hiddenTextarea).body.appendChild(y),(r=e.dataTransfer)===null||r===void 0||r.setDragImage(y,v.x,v.y)}onDragStart(e){this.__dragStartFired=!0;const t=this.target,r=this.isActive();if(r&&e.dataTransfer){const n=this.__dragStartSelection={selectionStart:t.selectionStart,selectionEnd:t.selectionEnd},s=t._text.slice(n.selectionStart,n.selectionEnd).join(""),o=D({text:t.text,value:s},n);e.dataTransfer.setData("text/plain",s),e.dataTransfer.setData("application/fabric",JSON.stringify({value:s,styles:t.getSelectionStyles(n.selectionStart,n.selectionEnd,!0)})),e.dataTransfer.effectAllowed="copyMove",this.setDragImage(e,o)}return t.abortCursorAnimation(),r}canDrop(e){if(this.target.editable&&!this.target.getActiveControl()&&!e.defaultPrevented){if(this.isActive()&&this.__dragStartSelection){const t=this.target.getSelectionStartFromPointer(e),r=this.__dragStartSelection;return tr.selectionEnd}return!0}return!1}targetCanDrop(e){return this.target.canDrop(e)}dragEnterHandler(e){let{e:t}=e;const r=this.targetCanDrop(t);!this.__isDraggingOver&&r&&(this.__isDraggingOver=!0)}dragOverHandler(e){const{e:t}=e,r=this.targetCanDrop(t);!this.__isDraggingOver&&r?this.__isDraggingOver=!0:this.__isDraggingOver&&!r&&(this.__isDraggingOver=!1),this.__isDraggingOver&&(t.preventDefault(),e.canDrop=!0,e.dropTarget=this.target)}dragLeaveHandler(){(this.__isDraggingOver||this.isActive())&&(this.__isDraggingOver=!1)}dropHandler(e){var t;const{e:r}=e,n=r.defaultPrevented;this.__isDraggingOver=!1,r.preventDefault();let s=(t=r.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain");if(s&&!n){const o=this.target,a=o.canvas;let l=o.getSelectionStartFromPointer(r);const{styles:c}=r.dataTransfer.types.includes("application/fabric")?JSON.parse(r.dataTransfer.getData("application/fabric")):{},u=s[Math.max(0,s.length-1)],h=0;if(this.__dragStartSelection){const d=this.__dragStartSelection.selectionStart,f=this.__dragStartSelection.selectionEnd;l>d&&l<=f?l=d:l>f&&(l-=f-d),o.removeChars(d,f),delete this.__dragStartSelection}o._reNewline.test(u)&&(o._reNewline.test(o._text[l])||l===o._text.length)&&(s=s.trimEnd()),e.didDrop=!0,e.dropTarget=o,o.insertChars(s,c,l),a.setActiveObject(o),o.enterEditing(r),o.selectionStart=Math.min(l+h,o._text.length),o.selectionEnd=Math.min(o.selectionStart+s.length,o._text.length),o.hiddenTextarea.value=o.text,o._updateTextarea(),o.hiddenTextarea.focus(),o.fire(Ni,{index:l+h,action:"drop"}),a.fire("text:changed",{target:o}),a.contextTopDirty=!0,a.requestRenderAll()}}dragEndHandler(e){let{e:t}=e;if(this.isActive()&&this.__dragStartFired&&this.__dragStartSelection){var r;const n=this.target,s=this.target.canvas,{selectionStart:o,selectionEnd:a}=this.__dragStartSelection,l=((r=t.dataTransfer)===null||r===void 0?void 0:r.dropEffect)||ht;l===ht?(n.selectionStart=o,n.selectionEnd=a,n._updateTextarea(),n.hiddenTextarea.focus()):(n.clearContextTop(),l==="move"&&(n.removeChars(o,a),n.selectionStart=n.selectionEnd=o,n.hiddenTextarea&&(n.hiddenTextarea.value=n.text),n._updateTextarea(),n.fire(Ni,{index:o,action:"dragend"}),s.fire("text:changed",{target:n}),s.requestRenderAll()),n.exitEditing())}this.__dragImageDisposer&&this.__dragImageDisposer(),delete this.__dragImageDisposer,delete this.__dragStartSelection,this.__isDraggingOver=!1}dispose(){this._dispose&&this._dispose()}}const cu=/[ \n\.,;!\?\-]/;class hp extends rt{constructor(){super(...arguments),M(this,"_currentCursorOpacity",1)}initBehavior(){this._tick=this._tick.bind(this),this._onTickComplete=this._onTickComplete.bind(this),this.updateSelectionOnMouseMove=this.updateSelectionOnMouseMove.bind(this)}onDeselect(e){return this.isEditing&&this.exitEditing(),this.selected=!1,super.onDeselect(e)}_animateCursor(e){let{toValue:t,duration:r,delay:n,onComplete:s}=e;return Ef({startValue:this._currentCursorOpacity,endValue:t,duration:r,delay:n,onComplete:s,abort:()=>!this.canvas||this.selectionStart!==this.selectionEnd,onChange:o=>{this._currentCursorOpacity=o,this.renderCursorOrSelection()}})}_tick(e){this._currentTickState=this._animateCursor({toValue:0,duration:this.cursorDuration/2,delay:Math.max(e||0,100),onComplete:this._onTickComplete})}_onTickComplete(){var e;(e=this._currentTickCompleteState)===null||e===void 0||e.abort(),this._currentTickCompleteState=this._animateCursor({toValue:1,duration:this.cursorDuration,onComplete:this._tick})}initDelayedCursor(e){this.abortCursorAnimation(),this._tick(e?0:this.cursorDelay)}abortCursorAnimation(){let e=!1;[this._currentTickState,this._currentTickCompleteState].forEach(t=>{t&&!t.isDone()&&(e=!0,t.abort())}),this._currentCursorOpacity=1,e&&this.clearContextTop()}restartCursorIfNeeded(){[this._currentTickState,this._currentTickCompleteState].some(e=>!e||e.isDone())&&this.initDelayedCursor()}selectAll(){return this.selectionStart=0,this.selectionEnd=this._text.length,this._fireSelectionChanged(),this._updateTextarea(),this}getSelectedText(){return this._text.slice(this.selectionStart,this.selectionEnd).join("")}findWordBoundaryLeft(e){let t=0,r=e-1;if(this._reSpace.test(this._text[r]))for(;this._reSpace.test(this._text[r]);)t++,r--;for(;/\S/.test(this._text[r])&&r>-1;)t++,r--;return e-t}findWordBoundaryRight(e){let t=0,r=e;if(this._reSpace.test(this._text[r]))for(;this._reSpace.test(this._text[r]);)t++,r++;for(;/\S/.test(this._text[r])&&r-1;)t++,r--;return e-t}findLineBoundaryRight(e){let t=0,r=e;for(;!/\n/.test(this._text[r])&&r0&&this._reSpace.test(r[e])&&(t===-1||!Ya.test(r[e-1]))?e-1:e,s=r[n];for(;n>0&&nthis.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=r):(this.selectionStart=r,this.selectionEnd=this.__selectionStartOnMouseDown),this.selectionStart===n&&this.selectionEnd===s||(this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}_setEditingProps(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0}fromStringToGraphemeSelection(e,t,r){const n=r.slice(0,e),s=this.graphemeSplit(n).length;if(e===t)return{selectionStart:s,selectionEnd:s};const o=r.slice(e,t);return{selectionStart:s,selectionEnd:s+this.graphemeSplit(o).length}}fromGraphemeToStringSelection(e,t,r){const n=r.slice(0,e).join("").length;return e===t?{selectionStart:n,selectionEnd:n}:{selectionStart:n,selectionEnd:n+r.slice(e,t).join("").length}}_updateTextarea(){if(this.cursorOffsetCache={},this.hiddenTextarea){if(!this.inCompositionMode){const e=this.fromGraphemeToStringSelection(this.selectionStart,this.selectionEnd,this._text);this.hiddenTextarea.selectionStart=e.selectionStart,this.hiddenTextarea.selectionEnd=e.selectionEnd}this.updateTextareaPosition()}}updateFromTextArea(){if(!this.hiddenTextarea)return;this.cursorOffsetCache={};const e=this.hiddenTextarea;this.text=e.value,this.set("dirty",!0),this.initDimensions(),this.setCoords();const t=this.fromStringToGraphemeSelection(e.selectionStart,e.selectionEnd,e.value);this.selectionEnd=this.selectionStart=t.selectionEnd,this.inCompositionMode||(this.selectionStart=t.selectionStart),this.updateTextareaPosition()}updateTextareaPosition(){if(this.selectionStart===this.selectionEnd){const e=this._calcTextareaPosition();this.hiddenTextarea.style.left=e.left,this.hiddenTextarea.style.top=e.top}}_calcTextareaPosition(){if(!this.canvas)return{left:"1px",top:"1px"};const e=this.inCompositionMode?this.compositionStart:this.selectionStart,t=this._getCursorBoundaries(e),r=this.get2DCursorLocation(e),n=r.lineIndex,s=r.charIndex,o=this.getValueOfPropertyAt(n,s,"fontSize")*this.lineHeight,a=t.leftOffset,l=this.getCanvasRetinaScaling(),c=this.canvas.upperCanvasEl,u=c.width/l,h=c.height/l,d=u-o,f=h-o,g=new L(t.left+a,t.top+t.topOffset+o).transform(this.calcTransformMatrix()).transform(this.canvas.viewportTransform).multiply(new L(c.clientWidth/u,c.clientHeight/h));return g.x<0&&(g.x=0),g.x>d&&(g.x=d),g.y<0&&(g.y=0),g.y>f&&(g.y=f),g.x+=this.canvas._offset.left,g.y+=this.canvas._offset.top,{left:"".concat(g.x,"px"),top:"".concat(g.y,"px"),fontSize:"".concat(o,"px"),charHeight:o}}_saveEditingProps(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,selectable:this.selectable,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}}_restoreEditingProps(){this._savedProps&&(this.hoverCursor=this._savedProps.hoverCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.selectable=this._savedProps.selectable,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor||this.canvas.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor||this.canvas.moveCursor),delete this._savedProps)}_exitEditing(){const e=this.hiddenTextarea;this.selected=!1,this.isEditing=!1,e&&(e.blur&&e.blur(),e.parentNode&&e.parentNode.removeChild(e)),this.hiddenTextarea=null,this.abortCursorAnimation(),this.selectionStart!==this.selectionEnd&&this.clearContextTop()}exitEditing(){const e=this._textBeforeEdit!==this.text;return this._exitEditing(),this.selectionEnd=this.selectionStart,this._restoreEditingProps(),this._forceClearCache&&(this.initDimensions(),this.setCoords()),this.fire("editing:exited"),e&&this.fire(Ii),this.canvas&&(this.canvas.fire("text:editing:exited",{target:this}),e&&this.canvas.fire("object:modified",{target:this})),this}_removeExtraneousStyles(){for(const e in this.styles)this._textLines[e]||delete this.styles[e]}removeStyleFromTo(e,t){const{lineIndex:r,charIndex:n}=this.get2DCursorLocation(e,!0),{lineIndex:s,charIndex:o}=this.get2DCursorLocation(t,!0);if(r!==s){if(this.styles[r])for(let a=n;a=o&&(a[u-l]=a[c],delete a[c])}}}shiftLineStyles(e,t){const r=Object.assign({},this.styles);for(const n in this.styles){const s=parseInt(n,10);s>e&&(this.styles[s+t]=r[s],r[s-t]||delete this.styles[s])}}insertNewlineStyleObject(e,t,r,n){const s={},o=this._unwrappedTextLines[e].length,a=o===t;let l=!1;r||(r=1),this.shiftLineStyles(e,r);const c=this.styles[e]?this.styles[e][t===0?t:t-1]:void 0;for(const h in this.styles[e]){const d=parseInt(h,10);d>=t&&(l=!0,s[d-t]=this.styles[e][h],a&&t===0||delete this.styles[e][h])}let u=!1;for(l&&!a&&(this.styles[e+r]=s,u=!0),(u||o>t)&&r--;r>0;)n&&n[r-1]?this.styles[e+r]={0:D({},n[r-1])}:c?this.styles[e+r]={0:D({},c)}:delete this.styles[e+r],r--;this._forceClearCache=!0}insertCharStyleObject(e,t,r,n){this.styles||(this.styles={});const s=this.styles[e],o=s?D({},s):{};r||(r=1);for(const l in o){const c=parseInt(l,10);c>=t&&(s[c+r]=o[c],o[c-r]||delete s[c])}if(this._forceClearCache=!0,n){for(;r--;)Object.keys(n[r]).length&&(this.styles[e]||(this.styles[e]={}),this.styles[e][t+r]=D({},n[r]));return}if(!s)return;const a=s[t?t-1:1];for(;a&&r--;)this.styles[e][t+r]=D({},a)}insertNewStyleBlock(e,t,r){const n=this.get2DCursorLocation(t,!0),s=[0];let o,a=0;for(let l=0;l0&&(this.insertCharStyleObject(n.lineIndex,n.charIndex,s[0],r),r=r&&r.slice(s[0]+1)),a&&this.insertNewlineStyleObject(n.lineIndex,n.charIndex+s[0],a),o=1;o0?this.insertCharStyleObject(n.lineIndex+o,0,s[o],r):r&&this.styles[n.lineIndex+o]&&r[0]&&(this.styles[n.lineIndex+o][0]=r[0]),r=r&&r.slice(s[o]+1);s[o]>0&&this.insertCharStyleObject(n.lineIndex+o,0,s[o],r)}removeChars(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e+1;this.removeStyleFromTo(e,t),this._text.splice(e,t-e),this.text=this._text.join(""),this.set("dirty",!0),this.initDimensions(),this.setCoords(),this._removeExtraneousStyles()}insertChars(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:r;n>r&&this.removeStyleFromTo(r,n);const s=this.graphemeSplit(e);this.insertNewStyleBlock(s,r,t),this._text=[...this._text.slice(0,r),...s,...this._text.slice(n)],this.text=this._text.join(""),this.set("dirty",!0),this.initDimensions(),this.setCoords(),this._removeExtraneousStyles()}setSelectionStartEndWithShift(e,t,r){r<=e?(t===e?this._selectionDirection=Ce:this._selectionDirection===je&&(this._selectionDirection=Ce,this.selectionEnd=e),this.selectionStart=r):r>e&&r{let[a,l]=o;return t.setAttribute(a,l)});const{top:r,left:n,fontSize:s}=this._calcTextareaPosition();t.style.cssText="position: absolute; top: ".concat(r,"; left: ").concat(n,"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding-top: ").concat(s,";"),(this.hiddenTextareaContainer||e.body).appendChild(t),Object.entries({blur:"blur",keydown:"onKeyDown",keyup:"onKeyUp",input:"onInput",copy:"copy",cut:"copy",paste:"paste",compositionstart:"onCompositionStart",compositionupdate:"onCompositionUpdate",compositionend:"onCompositionEnd"}).map(o=>{let[a,l]=o;return t.addEventListener(a,this[l].bind(this))}),this.hiddenTextarea=t}blur(){this.abortCursorAnimation()}onKeyDown(e){if(!this.isEditing)return;const t=this.direction==="rtl"?this.keysMapRtl:this.keysMap;if(e.keyCode in t)this[t[e.keyCode]](e);else{if(!(e.keyCode in this.ctrlKeysMapDown)||!e.ctrlKey&&!e.metaKey)return;this[this.ctrlKeysMapDown[e.keyCode]](e)}e.stopImmediatePropagation(),e.preventDefault(),e.keyCode>=33&&e.keyCode<=40?(this.inCompositionMode=!1,this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}onKeyUp(e){!this.isEditing||this._copyDone||this.inCompositionMode?this._copyDone=!1:e.keyCode in this.ctrlKeysMapUp&&(e.ctrlKey||e.metaKey)&&(this[this.ctrlKeysMapUp[e.keyCode]](e),e.stopImmediatePropagation(),e.preventDefault(),this.canvas&&this.canvas.requestRenderAll())}onInput(e){const t=this.fromPaste;if(this.fromPaste=!1,e&&e.stopPropagation(),!this.isEditing)return;const r=()=>{this.updateFromTextArea(),this.fire(Ni),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll())};if(this.hiddenTextarea.value==="")return this.styles={},void r();const n=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,s=this._text.length,o=n.length,a=this.selectionStart,l=this.selectionEnd,c=a!==l;let u,h,d,f,g=o-s;const m=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),v=a>m.selectionStart;c?(h=this._text.slice(a,l),g+=l-a):ou[0])),c?(d=a,f=l):v?(d=l-h.length,f=l):(d=l,f=l+h.length),this.removeStyleFromTo(d,f)),p.length){const{copyPasteData:b}=Bt();t&&p.join("")===b.copiedText&&!pe.disableStyleCopyPaste&&(u=b.copiedTextStyle),this.insertNewStyleBlock(p,a,u)}r()}onCompositionStart(){this.inCompositionMode=!0}onCompositionEnd(){this.inCompositionMode=!1}onCompositionUpdate(e){let{target:t}=e;const{selectionStart:r,selectionEnd:n}=t;this.compositionStart=r,this.compositionEnd=n,this.updateTextareaPosition()}copy(){if(this.selectionStart===this.selectionEnd)return;const{copyPasteData:e}=Bt();e.copiedText=this.getSelectedText(),pe.disableStyleCopyPaste?e.copiedTextStyle=void 0:e.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0}paste(){this.fromPaste=!0}_getWidthBeforeCursor(e,t){let r,n=this._getLineLeftOffset(e);return t>0&&(r=this.__charBounds[e][t-1],n+=r.left+r.width),n}getDownCursorOffset(e,t){const r=this._getSelectionForOffset(e,t),n=this.get2DCursorLocation(r),s=n.lineIndex;if(s===this._textLines.length-1||e.metaKey||e.keyCode===34)return this._text.length-r;const o=n.charIndex,a=this._getWidthBeforeCursor(s,o),l=this._getIndexOnLine(s+1,a);return this._textLines[s].slice(o).length+l+1+this.missingNewlineOffset(s)}_getSelectionForOffset(e,t){return e.shiftKey&&this.selectionStart!==this.selectionEnd&&t?this.selectionEnd:this.selectionStart}getUpCursorOffset(e,t){const r=this._getSelectionForOffset(e,t),n=this.get2DCursorLocation(r),s=n.lineIndex;if(s===0||e.metaKey||e.keyCode===33)return-r;const o=n.charIndex,a=this._getWidthBeforeCursor(s,o),l=this._getIndexOnLine(s-1,a),c=this._textLines[s].slice(0,o),u=this.missingNewlineOffset(s-1);return-this._textLines[s-1].length+l-c.length+(1-u)}_getIndexOnLine(e,t){const r=this._textLines[e];let n,s,o=this._getLineLeftOffset(e),a=0;for(let l=0,c=r.length;lt){s=!0;const u=o-n,h=o,d=Math.abs(u-t);a=Math.abs(h-t)=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",e)}moveCursorUp(e){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorUpOrDown("Up",e)}_moveCursorUpOrDown(e,t){const r=this["get".concat(e,"CursorOffset")](t,this._selectionDirection===je);if(t.shiftKey?this.moveCursorWithShift(r):this.moveCursorWithoutShift(r),r!==0){const n=this.text.length;this.selectionStart=Jr(0,this.selectionStart,n),this.selectionEnd=Jr(0,this.selectionEnd,n),this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea()}}moveCursorWithShift(e){const t=this._selectionDirection===Ce?this.selectionStart+e:this.selectionEnd+e;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,t),e!==0}moveCursorWithoutShift(e){return e<0?(this.selectionStart+=e,this.selectionEnd=this.selectionStart):(this.selectionEnd+=e,this.selectionStart=this.selectionEnd),e!==0}moveCursorLeft(e){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorLeftOrRight("Left",e)}_move(e,t,r){let n;if(e.altKey)n=this["findWordBoundary".concat(r)](this[t]);else{if(!e.metaKey&&e.keyCode!==35&&e.keyCode!==36)return this[t]+=r==="Left"?-1:1,!0;n=this["findLineBoundary".concat(r)](this[t])}return n!==void 0&&this[t]!==n&&(this[t]=n,!0)}_moveLeft(e,t){return this._move(e,t,"Left")}_moveRight(e,t){return this._move(e,t,"Right")}moveCursorLeftWithoutShift(e){let t=!0;return this._selectionDirection=Ce,this.selectionEnd===this.selectionStart&&this.selectionStart!==0&&(t=this._moveLeft(e,"selectionStart")),this.selectionEnd=this.selectionStart,t}moveCursorLeftWithShift(e){return this._selectionDirection===je&&this.selectionStart!==this.selectionEnd?this._moveLeft(e,"selectionEnd"):this.selectionStart!==0?(this._selectionDirection=Ce,this._moveLeft(e,"selectionStart")):void 0}moveCursorRight(e){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",e)}_moveCursorLeftOrRight(e,t){const r="moveCursor".concat(e).concat(t.shiftKey?"WithShift":"WithoutShift");this._currentCursorOpacity=1,this[r](t)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())}moveCursorRightWithShift(e){return this._selectionDirection===Ce&&this.selectionStart!==this.selectionEnd?this._moveRight(e,"selectionStart"):this.selectionEnd!==this._text.length?(this._selectionDirection=je,this._moveRight(e,"selectionEnd")):void 0}moveCursorRightWithoutShift(e){let t=!0;return this._selectionDirection=je,this.selectionStart===this.selectionEnd?(t=this._moveRight(e,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,t}}const Yo=i=>!!i.button;class dp extends fp{constructor(){super(...arguments),M(this,"draggableTextDelegate",void 0)}initBehavior(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore),this.on("mouseup",this.mouseUpHandler),this.on("mousedblclick",this.doubleClickHandler),this.on("tripleclick",this.tripleClickHandler),this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown),this.draggableTextDelegate=new up(this),super.initBehavior()}shouldStartDragging(){return this.draggableTextDelegate.isActive()}onDragStart(e){return this.draggableTextDelegate.onDragStart(e)}canDrop(e){return this.draggableTextDelegate.canDrop(e)}onMouseDown(e){if(!this.canvas)return;this.__newClickTime=+new Date;const t=e.pointer;this.isTripleClick(t)&&(this.fire("tripleclick",e),sa(e.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=t,this.__lastSelected=this.selected&&!this.getActiveControl()}isTripleClick(e){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===e.x&&this.__lastPointer.y===e.y}doubleClickHandler(e){this.isEditing&&this.selectWord(this.getSelectionStartFromPointer(e.e))}tripleClickHandler(e){this.isEditing&&this.selectLine(this.getSelectionStartFromPointer(e.e))}_mouseDownHandler(e){let{e:t}=e;this.canvas&&this.editable&&!Yo(t)&&!this.getActiveControl()&&(this.draggableTextDelegate.start(t)||(this.canvas.textEditingManager.register(this),this.selected&&(this.inCompositionMode=!1,this.setCursorByClick(t)),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection())))}_mouseDownHandlerBefore(e){let{e:t}=e;this.canvas&&this.editable&&!Yo(t)&&(this.selected=this===this.canvas._activeObject)}mouseUpHandler(e){let{e:t,transform:r}=e;const n=this.draggableTextDelegate.end(t);if(this.canvas){this.canvas.textEditingManager.unregister(this);const s=this.canvas._activeObject;if(s&&s!==this)return}!this.editable||this.group&&!this.group.interactive||r&&r.actionPerformed||Yo(t)||n||(this.__lastSelected&&!this.getActiveControl()?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(t),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0)}setCursorByClick(e){const t=this.getSelectionStartFromPointer(e),r=this.selectionStart,n=this.selectionEnd;e.shiftKey?this.setSelectionStartEndWithShift(r,n,t):(this.selectionStart=t,this.selectionEnd=t),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())}getSelectionStartFromPointer(e){const t=this.canvas.getScenePoint(e).transform(Tt(this.calcTransformMatrix())).add(new L(-this._getLeftOffset(),-this._getTopOffset()));let r=0,n=0,s=0;for(let c=0;c0&&(n+=this._textLines[c-1].length+this.missingNewlineOffset(c-1));let o=Math.abs(this._getLineLeftOffset(s));const a=this._textLines[s].length,l=this.__charBounds[s];for(let c=0;c0&&arguments[0]!==void 0?arguments[0]:this.selectionStart||0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selectionEnd,r=arguments.length>2?arguments[2]:void 0;return super.getSelectionStyles(e,t,r)}setSelectionStyles(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selectionStart||0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.selectionEnd;return super.setSelectionStyles(e,t,r)}get2DCursorLocation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.selectionStart,t=arguments.length>1?arguments[1]:void 0;return super.get2DCursorLocation(e,t)}render(e){super.render(e),this.cursorOffsetCache={},this.renderCursorOrSelection()}toCanvasElement(e){const t=this.isEditing;this.isEditing=!1;const r=super.toCanvasElement(e);return this.isEditing=t,r}renderCursorOrSelection(){if(!this.isEditing)return;const e=this.clearContextTop(!0);if(!e)return;const t=this._getCursorBoundaries();this.selectionStart===this.selectionEnd?this.renderCursor(e,t):this.renderSelection(e,t),this.canvas.contextTopDirty=!0,e.restore()}_getCursorBoundaries(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.selectionStart,t=arguments.length>1?arguments[1]:void 0;const r=this._getLeftOffset(),n=this._getTopOffset(),s=this._getCursorBoundariesOffsets(e,t);return{left:r,top:n,leftOffset:s.left,topOffset:s.top}}_getCursorBoundariesOffsets(e,t){return t?this.__getCursorBoundariesOffsets(e):this.cursorOffsetCache&&"top"in this.cursorOffsetCache?this.cursorOffsetCache:this.cursorOffsetCache=this.__getCursorBoundariesOffsets(e)}__getCursorBoundariesOffsets(e){let t=0,r=0;const{charIndex:n,lineIndex:s}=this.get2DCursorLocation(e);for(let c=0;c0?r:0)};return this.direction==="rtl"&&(this.textAlign===je||this.textAlign===Lt||this.textAlign===Sn?l.left*=-1:this.textAlign===Ce||this.textAlign===qi?l.left=o-(r>0?r:0):this.textAlign!==ue&&this.textAlign!==Tn||(l.left=o-(r>0?r:0))),l}renderCursorAt(e){const t=this._getCursorBoundaries(e,!0);this._renderCursor(this.canvas.contextTop,t,e)}renderCursor(e,t){this._renderCursor(e,t,this.selectionStart)}_renderCursor(e,t,r){const n=this.get2DCursorLocation(r),s=n.lineIndex,o=n.charIndex>0?n.charIndex-1:0,a=this.getValueOfPropertyAt(s,o,"fontSize"),l=this.getObjectScaling().x*this.canvas.getZoom(),c=this.cursorWidth/l,u=this.getValueOfPropertyAt(s,o,"deltaY"),h=t.topOffset+(1-this._fontSizeFraction)*this.getHeightOfLine(s)/this.lineHeight-a*(1-this._fontSizeFraction);this.inCompositionMode&&this.renderSelection(e,t),e.fillStyle=this.cursorColor||this.getValueOfPropertyAt(s,o,ze),e.globalAlpha=this._currentCursorOpacity,e.fillRect(t.left+t.leftOffset-c/2,h+t.top+u,c,a)}renderSelection(e,t){const r={selectionStart:this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,selectionEnd:this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd};this._renderSelection(e,r,t)}renderDragSourceEffect(){const e=this.draggableTextDelegate.getDragStartSelection();this._renderSelection(this.canvas.contextTop,e,this._getCursorBoundaries(e.selectionStart,!0))}renderDropTargetEffect(e){const t=this.getSelectionStartFromPointer(e);this.renderCursorAt(t)}_renderSelection(e,t,r){const n=t.selectionStart,s=t.selectionEnd,o=this.textAlign.includes(Lt),a=this.get2DCursorLocation(n),l=this.get2DCursorLocation(s),c=a.lineIndex,u=l.lineIndex,h=a.charIndex<0?0:a.charIndex,d=l.charIndex<0?0:l.charIndex;for(let f=c;f<=u;f++){const g=this._getLineLeftOffset(f)||0;let m=this.getHeightOfLine(f),v=0,p=0,b=0;if(f===c&&(p=this.__charBounds[c][h].left),f>=c&&f1)&&(m/=this.lineHeight);let C=r.left+g+p,y=m,w=0;const x=b-p;this.inCompositionMode?(e.fillStyle=this.compositionColor||"black",y=1,w=m):e.fillStyle=this.selectionColor,this.direction==="rtl"&&(this.textAlign===je||this.textAlign===Lt||this.textAlign===Sn?C=this.width-C-x:this.textAlign===Ce||this.textAlign===qi?C=r.left+g-b:this.textAlign!==ue&&this.textAlign!==Tn||(C=r.left+g-b)),e.fillRect(C,r.top+r.topOffset+w,x,y),r.topOffset+=v}}getCurrentCharFontSize(){const e=this._getCurrentCharIndex();return this.getValueOfPropertyAt(e.l,e.c,"fontSize")}getCurrentCharColor(){const e=this._getCurrentCharIndex();return this.getValueOfPropertyAt(e.l,e.c,ze)}_getCurrentCharIndex(){const e=this.get2DCursorLocation(this.selectionStart,!0),t=e.charIndex>0?e.charIndex-1:0;return{l:e.lineIndex,c:t}}dispose(){this._exitEditing(),this.draggableTextDelegate.dispose(),super.dispose()}}M(qt,"ownDefaults",gp),M(qt,"type","IText"),$.setClass(qt),$.setClass(qt,"i-text");class wr extends qt{static getDefaults(){return D(D({},super.getDefaults()),wr.ownDefaults)}constructor(e,t){super(e,D(D({},wr.ownDefaults),t))}static createControls(){return{controls:Vf()}}initDimensions(){this.initialized&&(this.isEditing&&this.initDelayedCursor(),this._clearCache(),this.dynamicMinWidth=0,this._styleMap=this._generateStyleMap(this._splitText()),this.dynamicMinWidth>this.width&&this._set("width",this.dynamicMinWidth),this.textAlign.includes(Lt)&&this.enlargeSpaces(),this.height=this.calcTextHeight())}_generateStyleMap(e){let t=0,r=0,n=0;const s={};for(let o=0;o0?(r=0,n++,t++):!this.splitByGrapheme&&this._reSpaceAndTab.test(e.graphemeText[n])&&o>0&&(r++,n++),s[o]={line:t,offset:r},n+=e.graphemeLines[o].length,r+=e.graphemeLines[o].length;return s}styleHas(e,t){if(this._styleMap&&!this.isWrapping){const r=this._styleMap[t];r&&(t=r.line)}return super.styleHas(e,t)}isEmptyStyles(e){if(!this.styles)return!0;let t,r=0,n=e+1,s=!1;const o=this._styleMap[e],a=this._styleMap[e+1];o&&(e=o.line,r=o.offset),a&&(n=a.line,s=n===e,t=a.offset);const l=e===void 0?this.styles:{line:this.styles[e]};for(const c in l)for(const u in l[c]){const h=parseInt(u,10);if(h>=r&&(!s||h{let a=0;const l=t?this.graphemeSplit(s):this.wordSplit(s);return l.length===0?[{word:[],width:0}]:l.map(c=>{const u=t?[c]:this.graphemeSplit(c),h=this._measureWord(u,o,a);return n=Math.max(h,n),a+=u.length+r.length,{word:u,width:h}})}),largestWordWidth:n}}_measureWord(e,t){let r,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,s=0;for(let o=0,a=e.length;o3&&arguments[3]!==void 0?arguments[3]:0;const a=this._getWidthOfCharSpacing(),l=this.splitByGrapheme,c=[],u=l?"":" ";let h=0,d=[],f=0,g=0,m=!0;t-=o;const v=Math.max(t,n,this.dynamicMinWidth),p=s[e];let b;for(f=0,b=0;bv&&!m?(c.push(d),d=[],h=y,m=!0):h+=a,m||l||d.push(u),d=d.concat(C),g=l?0:this._measureWord([u],e,f),f++,m=!1}return b&&c.push(d),n+o>this.dynamicMinWidth&&(this.dynamicMinWidth=n-a+o),c}isEndOfWrapping(e){return!this._styleMap[e+1]||this._styleMap[e+1].line!==this._styleMap[e].line}missingNewlineOffset(e,t){return this.splitByGrapheme&&!t?this.isEndOfWrapping(e)?1:0:1}_splitTextIntoLines(e){const t=super._splitTextIntoLines(e),r=this._wrapText(t.lines,this.width),n=new Array(r.length);for(let s=0;s0&&arguments[0]!==void 0?arguments[0]:[];return super.toObject(["minWidth","splitByGrapheme",...e])}}M(wr,"type","Textbox"),M(wr,"textLayoutProperties",[...qt.textLayoutProperties,"width"]),M(wr,"ownDefaults",{minWidth:20,dynamicMinWidth:2,lockScalingFlip:!0,noScaleCache:!1,_wordJoiners:/[ \t\r]/,splitByGrapheme:!1}),$.setClass(wr);class uu extends fs{shouldPerformLayout(e){return!!e.target.clipPath&&super.shouldPerformLayout(e)}shouldLayoutClipPath(){return!1}calcLayoutResult(e,t){const{target:r}=e,{clipPath:n,group:s}=r;if(!n||!this.shouldPerformLayout(e))return;const{width:o,height:a}=Ut(Gf(r,n)),l=new L(o,a);if(n.absolutePositioned)return{center:or(n.getRelativeCenterPoint(),void 0,s?s.calcTransformMatrix():void 0),size:l};{const c=n.getRelativeCenterPoint().transform(r.calcOwnMatrix(),!0);if(this.shouldPerformLayout(e)){const{center:u=new L,correction:h=new L}=this.calcBoundingBox(t,e)||{};return{center:u.add(c),correction:h.subtract(c),size:l}}return{center:r.getRelativeCenterPoint().add(c),size:l}}}}M(uu,"type","clip-path"),$.setClass(uu);class hu extends fs{getInitialSize(e,t){let{target:r}=e,{size:n}=t;return new L(r.width||n.x,r.height||n.y)}}M(hu,"type","fixed"),$.setClass(hu);class mp extends jn{subscribeTargets(e){const t=e.target;e.targets.reduce((r,n)=>(n.parent&&r.add(n.parent),r),new Set).forEach(r=>{r.layoutManager.subscribeTargets({target:r,targets:[t]})})}unsubscribeTargets(e){const t=e.target,r=t.getObjects();e.targets.reduce((n,s)=>(s.parent&&n.add(s.parent),n),new Set).forEach(n=>{!r.some(s=>s.parent===n)&&n.layoutManager.unsubscribeTargets({target:n,targets:[t]})})}}class Rt extends Nt{static getDefaults(){return D(D({},super.getDefaults()),Rt.ownDefaults)}constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Object.assign(this,Rt.ownDefaults),this.setOptions(t);const{left:r,top:n,layoutManager:s}=t;this.groupInit(e,{left:r,top:n,layoutManager:s!=null?s:new mp})}_shouldSetNestedCoords(){return!0}__objectSelectionMonitor(){}multiSelectAdd(){for(var e=arguments.length,t=new Array(e),r=0;r{const s=this._objects.findIndex(a=>a.isInFrontOf(n)),o=s===-1?this.size():s;this.insertAt(o,n)})}canEnterGroup(e){return this.getObjects().some(t=>t.isDescendantOf(e)||e.isDescendantOf(t))?(ar("error","ActiveSelection: circular object trees are not supported, this call has no effect"),!1):super.canEnterGroup(e)}enterGroup(e,t){e.parent&&e.parent===e.group?e.parent._exitGroup(e):e.group&&e.parent!==e.group&&e.group.remove(e),this._enterGroup(e,t)}exitGroup(e,t){this._exitGroup(e,t),e.parent&&e.parent._enterGroup(e,!0)}_onAfterObjectsChange(e,t){super._onAfterObjectsChange(e,t);const r=new Set;t.forEach(n=>{const{parent:s}=n;s&&r.add(s)}),e===sl?r.forEach(n=>{n._onAfterObjectsChange(Wi,t)}):r.forEach(n=>{n._set("dirty",!0)})}onDeselect(){return this.removeAll(),!1}toString(){return"#")}shouldCache(){return!1}isOnACache(){return!1}_renderControls(e,t,r){e.save(),e.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1;const n=D(D({hasControls:!1},r),{},{forActiveSelection:!0});for(let s=0;s{c.applyTo(a)});const{imageData:l}=a;return l.width===r&&l.height===n||(s.width=l.width,s.height=l.height),o.putImageData(l,0,0),a}}class hd{constructor(){let{tileSize:e=pe.textureSize}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};M(this,"aPosition",new Float32Array([0,0,0,1,1,0,1,1])),M(this,"resources",{}),this.tileSize=e,this.setupGLContext(e,e),this.captureGPUInfo()}setupGLContext(e,t){this.dispose(),this.createWebGLCanvas(e,t)}createWebGLCanvas(e,t){const r=Xe();r.width=e,r.height=t;const n=r.getContext("webgl",{alpha:!0,premultipliedAlpha:!1,depth:!1,stencil:!1,antialias:!1});n&&(n.clearColor(0,0,0,0),this.canvas=r,this.gl=n)}applyFilters(e,t,r,n,s,o){const a=this.gl,l=s.getContext("2d");if(!a||!l)return;let c;o&&(c=this.getCachedTexture(o,t));const u={originalWidth:t.width||t.originalWidth||0,originalHeight:t.height||t.originalHeight||0,sourceWidth:r,sourceHeight:n,destinationWidth:r,destinationHeight:n,context:a,sourceTexture:this.createTexture(a,r,n,c?void 0:t),targetTexture:this.createTexture(a,r,n),originalTexture:c||this.createTexture(a,r,n,c?void 0:t),passes:e.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:s},h=a.createFramebuffer();return a.bindFramebuffer(a.FRAMEBUFFER,h),e.forEach(d=>{d&&d.applyTo(u)}),function(d){const f=d.targetCanvas,g=f.width,m=f.height,v=d.destinationWidth,p=d.destinationHeight;g===v&&m===p||(f.width=v,f.height=p)}(u),this.copyGLTo2D(a,u),a.bindTexture(a.TEXTURE_2D,null),a.deleteTexture(u.sourceTexture),a.deleteTexture(u.targetTexture),a.deleteFramebuffer(h),l.setTransform(1,0,0,1,0,0),u}dispose(){this.canvas&&(this.canvas=null,this.gl=null),this.clearWebGLCaches()}clearWebGLCaches(){this.programCache={},this.textureCache={}}createTexture(e,t,r,n,s){const{NEAREST:o,TEXTURE_2D:a,RGBA:l,UNSIGNED_BYTE:c,CLAMP_TO_EDGE:u,TEXTURE_MAG_FILTER:h,TEXTURE_MIN_FILTER:d,TEXTURE_WRAP_S:f,TEXTURE_WRAP_T:g}=e,m=e.createTexture();return e.bindTexture(a,m),e.texParameteri(a,h,s||o),e.texParameteri(a,d,s||o),e.texParameteri(a,f,u),e.texParameteri(a,g,u),n?e.texImage2D(a,0,l,l,c,n):e.texImage2D(a,0,l,t,r,0,l,c,null),m}getCachedTexture(e,t,r){const{textureCache:n}=this;if(n[e])return n[e];{const s=this.createTexture(this.gl,t.width,t.height,t,r);return s&&(n[e]=s),s}}evictCachesForKey(e){this.textureCache[e]&&(this.gl.deleteTexture(this.textureCache[e]),delete this.textureCache[e])}copyGLTo2D(e,t){const r=e.canvas,n=t.targetCanvas,s=n.getContext("2d");if(!s)return;s.translate(0,n.height),s.scale(1,-1);const o=r.height-n.height;s.drawImage(r,0,o,n.width,n.height,0,0,n.width,n.height)}copyGLTo2DPutImageData(e,t){const r=t.targetCanvas.getContext("2d"),n=t.destinationWidth,s=t.destinationHeight,o=n*s*4;if(!r)return;const a=new Uint8Array(this.imageBuffer,0,o),l=new Uint8ClampedArray(this.imageBuffer,0,o);e.readPixels(0,0,n,s,e.RGBA,e.UNSIGNED_BYTE,a);const c=new ImageData(l,n,s);r.putImageData(c,0,0)}captureGPUInfo(){if(this.gpuInfo)return this.gpuInfo;const e=this.gl,t={renderer:"",vendor:""};if(!e)return t;const r=e.getExtension("WEBGL_debug_renderer_info");if(r){const n=e.getParameter(r.UNMASKED_RENDERER_WEBGL),s=e.getParameter(r.UNMASKED_VENDOR_WEBGL);n&&(t.renderer=n.toLowerCase()),s&&(t.vendor=s.toLowerCase())}return this.gpuInfo=t,t}}let Xo;function vp(){const{WebGLProbe:i}=Bt();return i.queryWebGL(Xe()),pe.enableGLFiltering&&i.isSupported(pe.textureSize)?new hd({tileSize:pe.textureSize}):new pp}function Wo(){return!Xo&&(!(arguments.length>0&&arguments[0]!==void 0)||arguments[0])&&(Xo=vp()),Xo}const _p=["filters","resizeFilter","src","crossOrigin","type"],fd=["cropX","cropY"];class bt extends et{static getDefaults(){return D(D({},super.getDefaults()),bt.ownDefaults)}constructor(e,t){super(),M(this,"_lastScaleX",1),M(this,"_lastScaleY",1),M(this,"_filterScalingX",1),M(this,"_filterScalingY",1),this.filters=[],Object.assign(this,bt.ownDefaults),this.setOptions(t),this.cacheKey="texture".concat(lr()),this.setElement(typeof e=="string"?(this.canvas&&St(this.canvas.getElement())||sn()).getElementById(e):e,t)}getElement(){return this._element}setElement(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.removeTexture(this.cacheKey),this.removeTexture("".concat(this.cacheKey,"_filtered")),this._element=e,this._originalElement=e,this._setWidthHeight(t),e.classList.add(bt.CSS_CANVAS),this.filters.length!==0&&this.applyFilters(),this.resizeFilter&&this.applyResizeFilters()}removeTexture(e){const t=Wo(!1);t instanceof hd&&t.evictCachesForKey(e)}dispose(){super.dispose(),this.removeTexture(this.cacheKey),this.removeTexture("".concat(this.cacheKey,"_filtered")),this._cacheContext=null,["_originalElement","_element","_filteredEl","_cacheCanvas"].forEach(e=>{const t=this[e];t&&Bt().dispose(t),this[e]=void 0})}getCrossOrigin(){return this._originalElement&&(this._originalElement.crossOrigin||null)}getOriginalSize(){const e=this.getElement();return e?{width:e.naturalWidth||e.width,height:e.naturalHeight||e.height}:{width:0,height:0}}_stroke(e){if(!this.stroke||this.strokeWidth===0)return;const t=this.width/2,r=this.height/2;e.beginPath(),e.moveTo(-t,-r),e.lineTo(t,-r),e.lineTo(t,r),e.lineTo(-t,r),e.lineTo(-t,-r),e.closePath()}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const t=[];return this.filters.forEach(r=>{r&&t.push(r.toObject())}),D(D({},super.toObject([...fd,...e])),{},{src:this.getSrc(),crossOrigin:this.getCrossOrigin(),filters:t},this.resizeFilter?{resizeFilter:this.resizeFilter.toObject()}:{})}hasCrop(){return!!this.cropX||!!this.cropY||this.width -`,' +`)}toObject(){const e={color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke,nonScaling:this.nonScaling,type:this.constructor.type},t=As.ownDefaults;return this.includeDefaultValues?e:cv(e,(i,n)=>i!==t[n])}static fromObject(e){return le(this,null,function*(){return new this(e)})}}Z(As,"ownDefaults",{color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,nonScaling:!1}),Z(As,"type","shadow"),pt.setClass(As,"shadow");const Tl=(r,e,t)=>Math.max(r,Math.min(e,t)),x5=[Jr,hi,tn,bn,"flipX","flipY","originX","originY","angle","opacity","globalCompositeOperation","shadow","visible",Gl,Vl],Rs=[or,$r,"strokeWidth","strokeDashArray","width","height","paintFirst","strokeUniform","strokeLineCap","strokeDashOffset","strokeLineJoin","strokeMiterLimit","backgroundColor","clipPath"],w5={top:0,left:0,width:0,height:0,angle:0,flipX:!1,flipY:!1,scaleX:1,scaleY:1,minScaleLimit:0,skewX:0,skewY:0,originX:hi,originY:Jr,strokeWidth:1,strokeUniform:!1,padding:0,opacity:1,paintFirst:or,fill:"rgb(0,0,0)",fillRule:"nonzero",stroke:null,strokeDashArray:null,strokeDashOffset:0,strokeLineCap:"butt",strokeLineJoin:"miter",strokeMiterLimit:4,globalCompositeOperation:"source-over",backgroundColor:"",shadow:null,visible:!0,includeDefaultValues:!0,excludeFromExport:!1,objectCaching:!0,clipPath:void 0,inverted:!1,absolutePositioned:!1,centeredRotation:!0,centeredScaling:!1,dirty:!0},S5=(r,e,t,i)=>-t*Math.cos(r/i*md)+t+e,T5=()=>!1;class mv{constructor(e){let{startValue:t,byValue:i,duration:n=500,delay:s=0,easing:o=S5,onStart:a=dh,onChange:l=dh,onComplete:c=dh,abort:d=T5,target:u}=e;Z(this,"_state","pending"),Z(this,"durationProgress",0),Z(this,"valueProgress",0),this.tick=this.tick.bind(this),this.duration=n,this.delay=s,this.easing=o,this._onStart=a,this._onChange=l,this._onComplete=c,this._abort=d,this.target=u,this.startValue=t,this.byValue=i,this.value=this.startValue,this.endValue=Object.freeze(this.calculate(this.duration).value)}get state(){return this._state}isDone(){return this._state==="aborted"||this._state==="completed"}start(){const e=t=>{this._state==="pending"&&(this.startTime=t||+new Date,this._state="running",this._onStart(),this.tick(this.startTime))};this.register(),this.delay>0?setTimeout(()=>hh(e),this.delay):hh(e)}tick(e){const t=(e||+new Date)-this.startTime,i=Math.min(t,this.duration);this.durationProgress=i/this.duration;const{value:n,valueProgress:s}=this.calculate(i);this.value=Object.freeze(n),this.valueProgress=s,this._state!=="aborted"&&(this._abort(this.value,this.valueProgress,this.durationProgress)?(this._state="aborted",this.unregister()):t>=this.duration?(this.durationProgress=this.valueProgress=1,this._onChange(this.endValue,this.valueProgress,this.durationProgress),this._state="completed",this._onComplete(this.endValue,this.valueProgress,this.durationProgress),this.unregister()):(this._onChange(this.value,this.valueProgress,this.durationProgress),hh(this.tick)))}register(){Lh.push(this)}unregister(){Lh.remove(this)}abort(){this._state="aborted",this.unregister()}}const C5=["startValue","endValue"];class k5 extends mv{constructor(e){let{startValue:t=0,endValue:i=100}=e;super(q(q({},Mi(e,C5)),{},{startValue:t,byValue:i-t}))}calculate(e){const t=this.easing(e,this.startValue,this.byValue,this.duration);return{value:t,valueProgress:Math.abs((t-this.startValue)/this.byValue)}}}const E5=["startValue","endValue"];class A5 extends mv{constructor(e){let{startValue:t=[0],endValue:i=[100]}=e;super(q(q({},Mi(e,E5)),{},{startValue:t,byValue:i.map((n,s)=>n-t[s])}))}calculate(e){const t=this.startValue.map((i,n)=>this.easing(e,i,this.byValue[n],this.duration,n));return{value:t,valueProgress:Math.abs((t[0]-this.startValue[0])/this.byValue[0])}}}const O5=["startValue","endValue","easing","onChange","onComplete","abort"],I5=(r,e,t,i)=>e+t*(1-Math.cos(r/i*md)),np=r=>r&&((e,t,i)=>r(new mi(e).toRgba(),t,i));class L5 extends mv{constructor(e){let{startValue:t,endValue:i,easing:n=I5,onChange:s,onComplete:o,abort:a}=e,l=Mi(e,O5);const c=new mi(t).getSource(),d=new mi(i).getSource();super(q(q({},l),{},{startValue:c,byValue:d.map((u,h)=>u-c[h]),easing:n,onChange:np(s),onComplete:np(o),abort:np(a)}))}calculate(e){const[t,i,n,s]=this.startValue.map((a,l)=>this.easing(e,a,this.byValue[l],this.duration,l)),o=[...[t,i,n].map(Math.round),Tl(0,s,1)];return{value:o,valueProgress:o.map((a,l)=>this.byValue[l]!==0?Math.abs((a-this.startValue[l])/this.byValue[l]):0).find(a=>a!==0)||0}}}function FS(r){const e=(t=>Array.isArray(t.startValue)||Array.isArray(t.endValue))(r)?new A5(r):new k5(r);return e.start(),e}function P5(r){const e=new L5(r);return e.start(),e}class zi{constructor(e){this.status=e,this.points=[]}includes(e){return this.points.some(t=>t.eq(e))}append(){for(var e=arguments.length,t=new Array(e),i=0;i!this.includes(n))),this}static isPointContained(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(t.eq(i))return e.eq(t);if(t.x===i.x)return e.x===t.x&&(n||e.y>=Math.min(t.y,i.y)&&e.y<=Math.max(t.y,i.y));if(t.y===i.y)return e.y===t.y&&(n||e.x>=Math.min(t.x,i.x)&&e.x<=Math.max(t.x,i.x));{const s=e0(t,i),o=e0(t,e).divide(s);return n?Math.abs(o.x)===Math.abs(o.y):o.x===o.y&&o.x>=0&&o.x<=1}}static isPointInPolygon(e,t){const i=new ve(e).setX(Math.min(e.x-1,...t.map(s=>s.x)));let n=0;for(let s=0;s4&&arguments[4]!==void 0)||arguments[4],o=!(arguments.length>5&&arguments[5]!==void 0)||arguments[5];const a=t.x-e.x,l=t.y-e.y,c=n.x-i.x,d=n.y-i.y,u=e.x-i.x,h=e.y-i.y,f=c*h-d*u,m=a*h-l*u,p=d*a-c*l;if(p!==0){const g=f/p,v=m/p;return(s||0<=g&&g<=1)&&(o||0<=v&&v<=1)?new zi("Intersection").append(new ve(e.x+g*a,e.y+g*l)):new zi}if(f===0||m===0){const g=s||o||zi.isPointContained(e,i,n)||zi.isPointContained(t,i,n)||zi.isPointContained(i,e,t)||zi.isPointContained(n,e,t);return new zi(g?"Coincident":void 0)}return new zi("Parallel")}static intersectSegmentLine(e,t,i,n){return zi.intersectLineLine(e,t,i,n,!1,!0)}static intersectSegmentSegment(e,t,i,n){return zi.intersectLineLine(e,t,i,n,!1,!1)}static intersectLinePolygon(e,t,i){let n=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];const s=new zi,o=i.length;for(let a,l,c,d=0;d0&&(s.status="Intersection"),s}static intersectSegmentPolygon(e,t,i){return zi.intersectLinePolygon(e,t,i,!1)}static intersectPolygonPolygon(e,t){const i=new zi,n=e.length,s=[];for(let o=0;o0&&s.length===e.length?new zi("Coincident"):(i.points.length>0&&(i.status="Intersection"),i)}static intersectPolygonRectangle(e,t,i){const n=t.min(i),s=t.max(i),o=new ve(s.x,n.y),a=new ve(n.x,s.y);return zi.intersectPolygonPolygon(e,[n,o,s,a])}}class D5 extends vS{getX(){return this.getXY().x}setX(e){this.setXY(this.getXY().setX(e))}getY(){return this.getXY().y}setY(e){this.setXY(this.getXY().setY(e))}getRelativeX(){return this.left}setRelativeX(e){this.left=e}getRelativeY(){return this.top}setRelativeY(e){this.top=e}getXY(){const e=this.getRelativeXY();return this.group?qr(e,this.group.calcTransformMatrix()):e}setXY(e,t,i){this.group&&(e=qr(e,Rn(this.group.calcTransformMatrix()))),this.setRelativeXY(e,t,i)}getRelativeXY(){return new ve(this.left,this.top)}setRelativeXY(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.originX,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.originY;this.setPositionByOrigin(e,t,i)}isStrokeAccountedForInDimensions(){return!1}getCoords(){const{tl:e,tr:t,br:i,bl:n}=this.aCoords||(this.aCoords=this.calcACoords()),s=[e,t,i,n];if(this.group){const o=this.group.calcTransformMatrix();return s.map(a=>qr(a,o))}return s}intersectsWithRect(e,t){return zi.intersectPolygonRectangle(this.getCoords(),e,t).status==="Intersection"}intersectsWithObject(e){const t=zi.intersectPolygonPolygon(this.getCoords(),e.getCoords());return t.status==="Intersection"||t.status==="Coincident"||e.isContainedWithinObject(this)||this.isContainedWithinObject(e)}isContainedWithinObject(e){return this.getCoords().every(t=>e.containsPoint(t))}isContainedWithinRect(e,t){const{left:i,top:n,width:s,height:o}=this.getBoundingRect();return i>=e.x&&i+s<=t.x&&n>=e.y&&n+o<=t.y}isOverlapping(e){return this.intersectsWithObject(e)||this.isContainedWithinObject(e)||e.isContainedWithinObject(this)}containsPoint(e){return zi.isPointInPolygon(e,this.getCoords())}isOnScreen(){if(!this.canvas)return!1;const{tl:e,br:t}=this.canvas.vptCoords;return!!this.getCoords().some(i=>i.x<=t.x&&i.x>=e.x&&i.y<=t.y&&i.y>=e.y)||!!this.intersectsWithRect(e,t)||this.containsPoint(e.midPointFrom(t))}isPartiallyOnScreen(){if(!this.canvas)return!1;const{tl:e,br:t}=this.canvas.vptCoords;return this.intersectsWithRect(e,t)?!0:this.getCoords().every(i=>(i.x>=t.x||i.x<=e.x)&&(i.y>=t.y||i.y<=e.y))&&this.containsPoint(e.midPointFrom(t))}getBoundingRect(){return Es(this.getCoords())}getScaledWidth(){return this._getTransformedDimensions().x}getScaledHeight(){return this._getTransformedDimensions().y}scale(e){this._set(tn,e),this._set(bn,e),this.setCoords()}scaleToWidth(e){const t=this.getBoundingRect().width/this.getScaledWidth();return this.scale(e/this.width/t)}scaleToHeight(e){const t=this.getBoundingRect().height/this.getScaledHeight();return this.scale(e/this.height/t)}getCanvasRetinaScaling(){var e;return((e=this.canvas)===null||e===void 0?void 0:e.getRetinaScaling())||1}getTotalAngle(){return this.group?aa(yS(this.calcTransformMatrix())):this.angle}getViewportTransform(){var e;return((e=this.canvas)===null||e===void 0?void 0:e.viewportTransform)||Ur.concat()}calcACoords(){const e=gd({angle:this.angle}),{x:t,y:i}=this.getRelativeCenterPoint(),n=pd(t,i),s=fr(n,e),o=this._getTransformedDimensions(),a=o.x/2,l=o.y/2;return{tl:qr({x:-a,y:-l},s),tr:qr({x:a,y:-l},s),bl:qr({x:-a,y:l},s),br:qr({x:a,y:l},s)}}setCoords(){this.aCoords=this.calcACoords()}transformMatrixKey(){let e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=[];return!e&&this.group&&(t=this.group.transformMatrixKey(e)),t.push(this.top,this.left,this.width,this.height,this.scaleX,this.scaleY,this.angle,this.strokeWidth,this.skewX,this.skewY,+this.flipX,+this.flipY,sr(this.originX),sr(this.originY)),t}calcTransformMatrix(){let e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=this.calcOwnMatrix();if(e||!this.group)return t;const i=this.transformMatrixKey(e),n=this.matrixCache;return n&&n.key.every((s,o)=>s===i[o])?n.value:(this.group&&(t=fr(this.group.calcTransformMatrix(!1),t)),this.matrixCache={key:i,value:t},t)}calcOwnMatrix(){const e=this.transformMatrixKey(!0),t=this.ownMatrixCache;if(t&&t.key===e)return t.value;const i=this.getRelativeCenterPoint(),n={angle:this.angle,translateX:i.x,translateY:i.y,scaleX:this.scaleX,scaleY:this.scaleY,skewX:this.skewX,skewY:this.skewY,flipX:this.flipX,flipY:this.flipY},s=s5(n);return this.ownMatrixCache={key:e,value:s},s}_getNonTransformedDimensions(){return new ve(this.width,this.height).scalarAdd(this.strokeWidth)}_calculateCurrentDimensions(e){return this._getTransformedDimensions(e).transform(this.getViewportTransform(),!0).scalarAdd(2*this.padding)}_getTransformedDimensions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=q({scaleX:this.scaleX,scaleY:this.scaleY,skewX:this.skewX,skewY:this.skewY,width:this.width,height:this.height,strokeWidth:this.strokeWidth},e),i=t.strokeWidth;let n=i,s=0;this.strokeUniform&&(n=0,s=i);const o=t.width+n,a=t.height+n;let l;return l=t.skewX===0&&t.skewY===0?new ve(o*t.scaleX,a*t.scaleY):dv(o,a,mf(t)),l.scalarAdd(s)}translateToGivenOrigin(e,t,i,n,s){let o=e.x,a=e.y;const l=sr(n)-sr(t),c=sr(s)-sr(i);if(l||c){const d=this._getTransformedDimensions();o+=l*d.x,a+=c*d.y}return new ve(o,a)}translateToCenterPoint(e,t,i){if(t===Zt&&i===Zt)return e;const n=this.translateToGivenOrigin(e,t,i,Zt,Zt);return this.angle?n.rotate($i(this.angle),e):n}translateToOriginPoint(e,t,i){const n=this.translateToGivenOrigin(e,Zt,Zt,t,i);return this.angle?n.rotate($i(this.angle),e):n}getCenterPoint(){const e=this.getRelativeCenterPoint();return this.group?qr(e,this.group.calcTransformMatrix()):e}getRelativeCenterPoint(){return this.translateToCenterPoint(new ve(this.left,this.top),this.originX,this.originY)}getPointByOrigin(e,t){return this.translateToOriginPoint(this.getRelativeCenterPoint(),e,t)}setPositionByOrigin(e,t,i){const n=this.translateToCenterPoint(e,t,i),s=this.translateToOriginPoint(n,this.originX,this.originY);this.set({left:s.x,top:s.y})}_getLeftTopCoords(){return this.translateToOriginPoint(this.getRelativeCenterPoint(),hi,Jr)}}const M5=["type"],R5=["extraParam"];let bs=class mh extends D5{static getDefaults(){return mh.ownDefaults}get type(){const e=this.constructor.type;return e==="FabricObject"?"object":e.toLowerCase()}set type(e){_o("warn","Setting type has no effect",e)}constructor(e){super(),Z(this,"_cacheContext",null),Object.assign(this,mh.ownDefaults),this.setOptions(e)}_createCacheCanvas(){this._cacheCanvas=mr(),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas(),this.dirty=!0}_limitCacheSize(e){const t=e.width,i=e.height,n=ri.maxCacheSideLimit,s=ri.minCacheSideLimit;if(t<=n&&i<=n&&t*i<=ri.perfLimitSizeTotal)return tc&&(e.zoomX/=t/c,e.width=c,e.capped=!0),i>d&&(e.zoomY/=i/d,e.height=d,e.capped=!0),e}_getCacheCanvasDimensions(){const e=this.getTotalObjectScaling(),t=this._getTransformedDimensions({skewX:0,skewY:0}),i=t.x*e.x/this.scaleX,n=t.y*e.y/this.scaleY;return{width:i+2,height:n+2,zoomX:e.x,zoomY:e.y,x:i,y:n}}_updateCacheCanvas(){const e=this._cacheCanvas,t=this._cacheContext,i=this._limitCacheSize(this._getCacheCanvasDimensions()),n=ri.minCacheSideLimit,s=i.width,o=i.height,a=i.zoomX,l=i.zoomY,c=s!==e.width||o!==e.height,d=this.zoomX!==a||this.zoomY!==l;if(!e||!t)return!1;let u,h,f=c||d,m=0,p=0,g=!1;if(c){const v=this._cacheCanvas.width,b=this._cacheCanvas.height,S=s>v||o>b;g=S||(s<.9*v||o<.9*b)&&v>n&&b>n,S&&!i.capped&&(s>n||o>n)&&(m=.1*s,p=.1*o)}return SS(this)&&this.path&&(f=!0,g=!0,m+=this.getHeightOfLine(0)*this.zoomX,p+=this.getHeightOfLine(0)*this.zoomY),!!f&&(g?(e.width=Math.ceil(s+m),e.height=Math.ceil(o+p)):(t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height)),u=i.x/2,h=i.y/2,this.cacheTranslationX=Math.round(e.width/2-u)+u,this.cacheTranslationY=Math.round(e.height/2-h)+h,t.translate(this.cacheTranslationX,this.cacheTranslationY),t.scale(a,l),this.zoomX=a,this.zoomY=l,!0)}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._setOptions(e)}transform(e){const t=this.group&&!this.group._transformDone||this.group&&this.canvas&&e===this.canvas.contextTop,i=this.calcTransformMatrix(!t);e.transform(i[0],i[1],i[2],i[3],i[4],i[5])}getObjectScaling(){if(!this.group)return new ve(Math.abs(this.scaleX),Math.abs(this.scaleY));const e=Ph(this.calcTransformMatrix());return new ve(Math.abs(e.scaleX),Math.abs(e.scaleY))}getTotalObjectScaling(){const e=this.getObjectScaling();if(this.canvas){const t=this.canvas.getZoom(),i=this.getCanvasRetinaScaling();return e.scalarMultiply(t*i)}return e}getObjectOpacity(){let e=this.opacity;return this.group&&(e*=this.group.getObjectOpacity()),e}_constrainScale(e){return Math.abs(e)0&&arguments[0]!==void 0&&arguments[0];if(this.isNotVisible())return!1;const t=this._cacheCanvas,i=this._cacheContext;return!(!t||!i||e||!this._updateCacheCanvas())||!!(this.dirty||this.clipPath&&this.clipPath.absolutePositioned)&&(t&&i&&!e&&(i.save(),i.setTransform(1,0,0,1,0,0),i.clearRect(0,0,t.width,t.height),i.restore()),!0)}_renderBackground(e){if(!this.backgroundColor)return;const t=this._getNonTransformedDimensions();e.fillStyle=this.backgroundColor,e.fillRect(-t.x/2,-t.y/2,t.x,t.y),this._removeShadow(e)}_setOpacity(e){this.group&&!this.group._transformDone?e.globalAlpha=this.getObjectOpacity():e.globalAlpha*=this.opacity}_setStrokeStyles(e,t){const i=t.stroke;i&&(e.lineWidth=t.strokeWidth,e.lineCap=t.strokeLineCap,e.lineDashOffset=t.strokeDashOffset,e.lineJoin=t.strokeLineJoin,e.miterLimit=t.strokeMiterLimit,_n(i)?i.gradientUnits==="percentage"||i.gradientTransform||i.patternTransform?this._applyPatternForTransformedGradient(e,i):(e.strokeStyle=i.toLive(e),this._applyPatternGradientTransform(e,i)):e.strokeStyle=t.stroke)}_setFillStyles(e,t){let{fill:i}=t;i&&(_n(i)?(e.fillStyle=i.toLive(e),this._applyPatternGradientTransform(e,i)):e.fillStyle=i)}_setClippingProperties(e){e.globalAlpha=1,e.strokeStyle="transparent",e.fillStyle="#000000"}_setLineDash(e,t){t&&t.length!==0&&(1&t.length&&t.push(...t),e.setLineDash(t))}_setShadow(e){if(!this.shadow)return;const t=this.shadow,i=this.canvas,n=this.getCanvasRetinaScaling(),[s,,,o]=(i==null?void 0:i.viewportTransform)||Ur,a=s*n,l=o*n,c=t.nonScaling?new ve(1,1):this.getObjectScaling();e.shadowColor=t.color,e.shadowBlur=t.blur*ri.browserShadowBlurConstant*(a+l)*(c.x+c.y)/4,e.shadowOffsetX=t.offsetX*a*c.x,e.shadowOffsetY=t.offsetY*l*c.y}_removeShadow(e){this.shadow&&(e.shadowColor="",e.shadowBlur=e.shadowOffsetX=e.shadowOffsetY=0)}_applyPatternGradientTransform(e,t){if(!_n(t))return{offsetX:0,offsetY:0};const i=t.gradientTransform||t.patternTransform,n=-this.width/2+t.offsetX||0,s=-this.height/2+t.offsetY||0;return t.gradientUnits==="percentage"?e.transform(this.width,0,0,this.height,n,s):e.transform(1,0,0,1,n,s),i&&e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),{offsetX:n,offsetY:s}}_renderPaintInOrder(e){this.paintFirst===$r?(this._renderStroke(e),this._renderFill(e)):(this._renderFill(e),this._renderStroke(e))}_render(e){}_renderFill(e){this.fill&&(e.save(),this._setFillStyles(e,this),this.fillRule==="evenodd"?e.fill("evenodd"):e.fill(),e.restore())}_renderStroke(e){if(this.stroke&&this.strokeWidth!==0){if(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(e),e.save(),this.strokeUniform){const t=this.getObjectScaling();e.scale(1/t.x,1/t.y)}this._setLineDash(e,this.strokeDashArray),this._setStrokeStyles(e,this),e.stroke(),e.restore()}}_applyPatternForTransformedGradient(e,t){var i;const n=this._limitCacheSize(this._getCacheCanvasDimensions()),s=mr(),o=this.getCanvasRetinaScaling(),a=n.x/this.scaleX/o,l=n.y/this.scaleY/o;s.width=Math.ceil(a),s.height=Math.ceil(l);const c=s.getContext("2d");c&&(c.beginPath(),c.moveTo(0,0),c.lineTo(a,0),c.lineTo(a,l),c.lineTo(0,l),c.closePath(),c.translate(a/2,l/2),c.scale(n.zoomX/this.scaleX/o,n.zoomY/this.scaleY/o),this._applyPatternGradientTransform(c,t),c.fillStyle=t.toLive(e),c.fill(),e.translate(-this.width/2-this.strokeWidth/2,-this.height/2-this.strokeWidth/2),e.scale(o*this.scaleX/n.zoomX,o*this.scaleY/n.zoomY),e.strokeStyle=(i=c.createPattern(s,"no-repeat"))!==null&&i!==void 0?i:"")}_findCenterFromElement(){return new ve(this.left+this.width/2,this.top+this.height/2)}clone(e){const t=this.toObject(e);return this.constructor.fromObject(t)}cloneAsImage(e){const t=this.toCanvasElement(e);return new(pt.getClass("image"))(t)}toCanvasElement(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=AS(this),i=this.group,n=this.shadow,s=Math.abs,o=e.enableRetinaScaling?uS():1,a=(e.multiplier||1)*o,l=e.canvasProvider||(b=>new vd(b,{enableRetinaScaling:!1,renderOnAddRemove:!1,skipOffscreen:!1}));delete this.group,e.withoutTransform&&h5(this),e.withoutShadow&&(this.shadow=null),e.viewportTransform&&m5(this,this.getViewportTransform()),this.setCoords();const c=mr(),d=this.getBoundingRect(),u=this.shadow,h=new ve;if(u){const b=u.blur,S=u.nonScaling?new ve(1,1):this.getObjectScaling();h.x=2*Math.round(s(u.offsetX)+b)*s(S.x),h.y=2*Math.round(s(u.offsetY)+b)*s(S.y)}const f=d.width+h.x,m=d.height+h.y;c.width=Math.ceil(f),c.height=Math.ceil(m);const p=l(c);e.format==="jpeg"&&(p.backgroundColor="#fff"),this.setPositionByOrigin(new ve(p.width/2,p.height/2),Zt,Zt);const g=this.canvas;p._objects=[this],this.set("canvas",p),this.setCoords();const v=p.toCanvasElement(a||1,e);return this.set("canvas",g),this.shadow=n,i&&(this.group=i),this.set(t),this.setCoords(),p._objects=[],p.destroy(),v}toDataURL(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return _S(this.toCanvasElement(e),e.format||"png",e.quality||1)}isType(){for(var e=arguments.length,t=new Array(e),i=0;i{let[s,o]=n;return i[s]=this._animate(s,o,t),i},{})}_animate(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=e.split("."),s=this.constructor.colorProperties.includes(n[n.length-1]),{abort:o,startValue:a,onChange:l,onComplete:c}=i,d=q(q({},i),{},{target:this,startValue:a!=null?a:n.reduce((u,h)=>u[h],this),endValue:t,abort:o==null?void 0:o.bind(this),onChange:(u,h,f)=>{n.reduce((m,p,g)=>(g===n.length-1&&(m[p]=u),m[p]),this),l&&l(u,h,f)},onComplete:(u,h,f)=>{this.setCoords(),c&&c(u,h,f)}});return s?P5(d):FS(d)}isDescendantOf(e){const{parent:t,group:i}=this;return t===e||i===e||!!t&&t.isDescendantOf(e)||!!i&&i!==t&&i.isDescendantOf(e)}getAncestors(){const e=[];let t=this;do t=t.parent,t&&e.push(t);while(t);return e}findCommonAncestors(e){if(this===e)return{fork:[],otherFork:[],common:[this,...this.getAncestors()]};const t=this.getAncestors(),i=e.getAncestors();if(t.length===0&&i.length>0&&this===i[i.length-1])return{fork:[],otherFork:[e,...i.slice(0,i.length-1)],common:[this]};for(let n,s=0;s-1&&o>a}toObject(){const e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).concat(mh.customProperties,this.constructor.customProperties||[]);let t;const i=ri.NUM_FRACTION_DIGITS,{clipPath:n,fill:s,stroke:o,shadow:a,strokeDashArray:l,left:c,top:d,originX:u,originY:h,width:f,height:m,strokeWidth:p,strokeLineCap:g,strokeDashOffset:v,strokeLineJoin:b,strokeUniform:S,strokeMiterLimit:_,scaleX:x,scaleY:I,angle:T,flipX:O,flipY:E,opacity:w,visible:X,backgroundColor:H,fillRule:Y,paintFirst:k,globalCompositeOperation:D,skewX:M,skewY:L}=this;n&&!n.excludeFromExport&&(t=n.toObject(e.concat("inverted","absolutePositioned")));const J=te=>Bi(te,i),ce=q(q({},Ul(this,e)),{},{type:this.constructor.type,version:Zg,originX:u,originY:h,left:J(c),top:J(d),width:J(f),height:J(m),fill:Cb(s)?s.toObject():s,stroke:Cb(o)?o.toObject():o,strokeWidth:J(p),strokeDashArray:l&&l.concat(),strokeLineCap:g,strokeDashOffset:v,strokeLineJoin:b,strokeUniform:S,strokeMiterLimit:J(_),scaleX:J(x),scaleY:J(I),angle:J(T),flipX:O,flipY:E,opacity:J(w),shadow:a&&a.toObject(),visible:X,backgroundColor:H,fillRule:Y,paintFirst:k,globalCompositeOperation:D,skewX:J(M),skewY:J(L)},t?{clipPath:t}:null);return this.includeDefaultValues?ce:this._removeDefaultValues(ce)}toDatalessObject(e){return this.toObject(e)}_removeDefaultValues(e){const t=this.constructor.getDefaults(),i=Object.keys(t).length>0?t:Object.getPrototypeOf(this);return cv(e,(n,s)=>{if(s===hi||s===Jr||s==="type")return!0;const o=i[s];return n!==o&&!(Array.isArray(n)&&Array.isArray(o)&&n.length===0&&o.length===0)})}toString(){return"#<".concat(this.constructor.type,">")}static _fromObject(e){let t=Mi(e,M5),i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{extraParam:n}=i,s=Mi(i,R5);return pf(t,s).then(o=>n?(delete o[n],new this(t[n],o)):new this(o))}static fromObject(e,t){return this._fromObject(e,t)}};Z(bs,"stateProperties",x5),Z(bs,"cacheProperties",Rs),Z(bs,"ownDefaults",w5),Z(bs,"type","FabricObject"),Z(bs,"colorProperties",[or,$r,"backgroundColor"]),Z(bs,"customProperties",[]),pt.setClass(bs),pt.setClass(bs,"object");const To=(r,e,t)=>(i,n,s,o)=>{const a=e(i,n,s,o);return a&&uv(r,q(q({},hv(i,n,s,o)),t)),a};function pa(r){return(e,t,i,n)=>{const{target:s,originX:o,originY:a}=t,l=s.getRelativeCenterPoint(),c=s.translateToOriginPoint(l,o,a),d=r(e,t,i,n);return s.setPositionByOrigin(c,t.originX,t.originY),d}}const r0=To(Kc,pa((r,e,t,i)=>{const n=vf(e,e.originX,e.originY,t,i);if(sr(e.originX)===sr(Zt)||sr(e.originX)===sr(Qi)&&n.x<0||sr(e.originX)===sr(hi)&&n.x>0){const{target:s}=e,o=s.strokeWidth/(s.strokeUniform?s.scaleX:1),a=OS(e)?2:1,l=s.width,c=Math.ceil(Math.abs(n.x*a/s.scaleX)-o);return s.set("width",Math.max(c,0)),l!==s.width}return!1}));function NS(r,e,t,i,n){i=i||{};const s=this.sizeX||i.cornerSize||n.cornerSize,o=this.sizeY||i.cornerSize||n.cornerSize,a=i.transparentCorners!==void 0?i.transparentCorners:n.transparentCorners,l=a?$r:or,c=!a&&(i.cornerStrokeColor||n.cornerStrokeColor);let d,u=e,h=t;r.save(),r.fillStyle=i.cornerColor||n.cornerColor||"",r.strokeStyle=i.cornerStrokeColor||n.cornerStrokeColor||"",s>o?(d=s,r.scale(1,o/s),h=t*s/o):o>s?(d=o,r.scale(s/o,1),u=e*o/s):d=s,r.lineWidth=1,r.beginPath(),r.arc(u,h,d/2,0,Ah,!1),r[l](),c&&r.stroke(),r.restore()}function zS(r,e,t,i,n){i=i||{};const s=this.sizeX||i.cornerSize||n.cornerSize,o=this.sizeY||i.cornerSize||n.cornerSize,a=i.transparentCorners!==void 0?i.transparentCorners:n.transparentCorners,l=a?$r:or,c=!a&&(i.cornerStrokeColor||n.cornerStrokeColor),d=s/2,u=o/2;r.save(),r.fillStyle=i.cornerColor||n.cornerColor||"",r.strokeStyle=i.cornerStrokeColor||n.cornerStrokeColor||"",r.lineWidth=1,r.translate(e,t);const h=n.getTotalAngle();r.rotate($i(h)),r["".concat(l,"Rect")](-d,-u,s,o),c&&r.strokeRect(-d,-u,s,o),r.restore()}class an{constructor(e){Z(this,"visible",!0),Z(this,"actionName",ff),Z(this,"angle",0),Z(this,"x",0),Z(this,"y",0),Z(this,"offsetX",0),Z(this,"offsetY",0),Z(this,"sizeX",0),Z(this,"sizeY",0),Z(this,"touchSizeX",0),Z(this,"touchSizeY",0),Z(this,"cursorStyle","crosshair"),Z(this,"withConnection",!1),Object.assign(this,e)}shouldActivate(e,t,i,n){var s;let{tl:o,tr:a,br:l,bl:c}=n;return((s=t.canvas)===null||s===void 0?void 0:s.getActiveObject())===t&&t.isControlVisible(e)&&zi.isPointInPolygon(i,[o,a,l,c])}getActionHandler(e,t,i){return this.actionHandler}getMouseDownHandler(e,t,i){return this.mouseDownHandler}getMouseUpHandler(e,t,i){return this.mouseUpHandler}cursorStyleHandler(e,t,i){return t.cursorStyle}getActionName(e,t,i){return t.actionName}getVisibility(e,t){var i,n;return(i=(n=e._controlsVisibility)===null||n===void 0?void 0:n[t])!==null&&i!==void 0?i:this.visible}setVisibility(e,t,i){this.visible=e}positionHandler(e,t,i,n){return new ve(this.x*e.x+this.offsetX,this.y*e.y+this.offsetY).transform(t)}calcCornerCoords(e,t,i,n,s,o){const a=av([pd(i,n),gd({angle:e}),lv((s?this.touchSizeX:this.sizeX)||t,(s?this.touchSizeY:this.sizeY)||t)]);return{tl:new ve(-.5,-.5).transform(a),tr:new ve(.5,-.5).transform(a),br:new ve(.5,.5).transform(a),bl:new ve(-.5,.5).transform(a)}}render(e,t,i,n,s){((n=n||{}).cornerStyle||s.cornerStyle)==="circle"?NS.call(this,e,t,i,n,s):zS.call(this,e,t,i,n,s)}}const BS=(r,e,t)=>t.lockRotation?Rh:e.cursorStyle,jS=To(fS,pa((r,e,t,i)=>{let{target:n,ex:s,ey:o,theta:a,originX:l,originY:c}=e;const d=n.translateToOriginPoint(n.getRelativeCenterPoint(),l,c);if(Nn(n,"lockRotation"))return!1;const u=Math.atan2(o-d.y,s-d.x),h=Math.atan2(i-d.y,t-d.x);let f=aa(h-u+a);if(n.snapAngle&&n.snapAngle>0){const p=n.snapAngle,g=n.snapThreshold||p,v=Math.ceil(f/p)*p,b=Math.floor(f/p)*p;Math.abs(f-b){const i=GS(r,t);if(VS(t,e.x!==0&&e.y===0?"x":e.x===0&&e.y!==0?"y":"",i))return Rh;const n=IS(t,e);return"".concat(F5[n],"-resize")};function pv(r,e,t,i){let n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};const s=e.target,o=n.by,a=GS(r,s);let l,c,d,u,h,f;if(VS(s,o,a))return!1;if(e.gestureScale)c=e.scaleX*e.gestureScale,d=e.scaleY*e.gestureScale;else{if(l=vf(e,e.originX,e.originY,t,i),h=o!=="y"?Math.sign(l.x||e.signX||1):1,f=o!=="x"?Math.sign(l.y||e.signY||1):1,e.signX||(e.signX=h),e.signY||(e.signY=f),Nn(s,"lockScalingFlip")&&(e.signX!==h||e.signY!==f))return!1;if(u=s._getTransformedDimensions(),a&&!o){const g=Math.abs(l.x)+Math.abs(l.y),{original:v}=e,b=g/(Math.abs(u.x*v.scaleX/s.scaleX)+Math.abs(u.y*v.scaleY/s.scaleY));c=v.scaleX*b,d=v.scaleY*b}else c=Math.abs(l.x*s.scaleX/u.x),d=Math.abs(l.y*s.scaleY/u.y);OS(e)&&(c*=2,d*=2),e.signX!==h&&o!=="y"&&(e.originX=Ab(e.originX),c*=-1,e.signX=h),e.signY!==f&&o!=="x"&&(e.originY=Ab(e.originY),d*=-1,e.signY=f)}const m=s.scaleX,p=s.scaleY;return o?(o==="x"&&s.set(tn,c),o==="y"&&s.set(bn,d)):(!Nn(s,"lockScalingX")&&s.set(tn,c),!Nn(s,"lockScalingY")&&s.set(bn,d)),m!==s.scaleX||p!==s.scaleY}const Pc=To(hf,pa((r,e,t,i)=>pv(r,e,t,i))),US=To(hf,pa((r,e,t,i)=>pv(r,e,t,i,{by:"x"}))),HS=To(hf,pa((r,e,t,i)=>pv(r,e,t,i,{by:"y"}))),N5=["target","ex","ey","skewingSide"],sp={x:{counterAxis:"y",scale:tn,skew:Gl,lockSkewing:"lockSkewingX",origin:"originX",flip:"flipX"},y:{counterAxis:"x",scale:bn,skew:Vl,lockSkewing:"lockSkewingY",origin:"originY",flip:"flipY"}},z5=["ns","nesw","ew","nwse"],XS=(r,e,t)=>{if(e.x!==0&&Nn(t,"lockSkewingY")||e.y!==0&&Nn(t,"lockSkewingX"))return Rh;const i=IS(t,e)%4;return"".concat(z5[i],"-resize")};function WS(r,e,t,i,n){const{target:s}=t,{counterAxis:o,origin:a,lockSkewing:l,skew:c,flip:d}=sp[r];if(Nn(s,l))return!1;const{origin:u,flip:h}=sp[o],f=sr(t[u])*(s[h]?-1:1),m=-Math.sign(f)*(s[d]?-1:1),p=.5*-((s[c]===0&&vf(t,Zt,Zt,i,n)[r]>0||s[c]>0?1:-1)*m)+.5;return To(mS,pa((v,b,S,_)=>function(x,I,T){let{target:O,ex:E,ey:w,skewingSide:X}=I,H=Mi(I,N5);const{skew:Y}=sp[x],k=T.subtract(new ve(E,w)).divide(new ve(O.scaleX,O.scaleY))[x],D=O[Y],M=H[Y],L=Math.tan($i(M)),J=x==="y"?O._getTransformedDimensions({scaleX:1,scaleY:1,skewX:0}).x:O._getTransformedDimensions({scaleX:1,scaleY:1}).y,ce=2*k*X/Math.max(J,1)+L,te=aa(Math.atan(ce));O.set(Y,te);const et=D!==O[Y];if(et&&x==="y"){const{skewX:ot,scaleX:Ot}=O,gt=O._getTransformedDimensions({skewY:D}),je=O._getTransformedDimensions(),At=ot!==0?gt.x/je.x:1;At!==1&&O.set(tn,At*Ot)}return et}(r,b,new ve(S,_))))(e,q(q({},t),{},{[a]:p,skewingSide:m}),i,n)}const YS=(r,e,t,i)=>WS("x",r,e,t,i),qS=(r,e,t,i)=>WS("y",r,e,t,i);function yf(r,e){return r[e.canvas.altActionKey]}const Dc=(r,e,t)=>{const i=yf(r,t);return e.x===0?i?Gl:bn:e.y===0?i?Vl:tn:""},Qo=(r,e,t)=>yf(r,t)?XS(0,e,t):ol(r,e,t),n0=(r,e,t,i)=>yf(r,e.target)?qS(r,e,t,i):US(r,e,t,i),s0=(r,e,t,i)=>yf(r,e.target)?YS(r,e,t,i):HS(r,e,t,i),gv=()=>({ml:new an({x:-.5,y:0,cursorStyleHandler:Qo,actionHandler:n0,getActionName:Dc}),mr:new an({x:.5,y:0,cursorStyleHandler:Qo,actionHandler:n0,getActionName:Dc}),mb:new an({x:0,y:.5,cursorStyleHandler:Qo,actionHandler:s0,getActionName:Dc}),mt:new an({x:0,y:-.5,cursorStyleHandler:Qo,actionHandler:s0,getActionName:Dc}),tl:new an({x:-.5,y:-.5,cursorStyleHandler:ol,actionHandler:Pc}),tr:new an({x:.5,y:-.5,cursorStyleHandler:ol,actionHandler:Pc}),bl:new an({x:-.5,y:.5,cursorStyleHandler:ol,actionHandler:Pc}),br:new an({x:.5,y:.5,cursorStyleHandler:ol,actionHandler:Pc}),mtr:new an({x:0,y:-.5,actionHandler:jS,cursorStyleHandler:BS,offsetY:-40,withConnection:!0,actionName:sv})}),ZS=()=>({mr:new an({x:.5,y:0,actionHandler:r0,cursorStyleHandler:Qo,actionName:Kc}),ml:new an({x:-.5,y:0,actionHandler:r0,cursorStyleHandler:Qo,actionName:Kc})}),KS=()=>q(q({},gv()),ZS());class $c extends bs{static getDefaults(){return q(q({},super.getDefaults()),$c.ownDefaults)}constructor(e){super(),Object.assign(this,this.constructor.createControls(),$c.ownDefaults),this.setOptions(e)}static createControls(){return{controls:gv()}}_updateCacheCanvas(){const e=this.canvas;if(this.noScaleCache&&e&&e._currentTransform){const t=e._currentTransform,i=t.target,n=t.action;if(this===i&&n&&n.startsWith(ff))return!1}return super._updateCacheCanvas()}getActiveControl(){const e=this.__corner;return e?{key:e,control:this.controls[e],coord:this.oCoords[e]}:void 0}findControl(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!this.hasControls||!this.canvas)return;this.__corner=void 0;const i=Object.entries(this.oCoords);for(let n=i.length-1;n>=0;n--){const[s,o]=i[n],a=this.controls[s];if(a.shouldActivate(s,this,e,t?o.touchCorner:o.corner))return this.__corner=s,{key:s,control:a,coord:this.oCoords[s]}}}calcOCoords(){const e=this.getViewportTransform(),t=this.getCenterPoint(),i=pd(t.x,t.y),n=gd({angle:this.getTotalAngle()-(this.group&&this.flipX?180:0)}),s=fr(i,n),o=fr(e,s),a=fr(o,[1/e[0],0,0,1/e[3],0,0]),l=this.group?Ph(this.calcTransformMatrix()):void 0;l&&(l.scaleX=Math.abs(l.scaleX),l.scaleY=Math.abs(l.scaleY));const c=this._calculateCurrentDimensions(l),d={};return this.forEachControl((u,h)=>{const f=u.positionHandler(c,a,this,u);d[h]=Object.assign(f,this._calcCornerCoords(u,f))}),d}_calcCornerCoords(e,t){const i=this.getTotalAngle();return{corner:e.calcCornerCoords(i,this.cornerSize,t.x,t.y,!1,this),touchCorner:e.calcCornerCoords(i,this.touchCornerSize,t.x,t.y,!0,this)}}setCoords(){super.setCoords(),this.canvas&&(this.oCoords=this.calcOCoords())}forEachControl(e){for(const t in this.controls)e(this.controls[t],t,this)}drawSelectionBackground(e){if(!this.selectionBackgroundColor||this.canvas&&this.canvas._activeObject!==this)return;e.save();const t=this.getRelativeCenterPoint(),i=this._calculateCurrentDimensions(),n=this.getViewportTransform();e.translate(t.x,t.y),e.scale(1/n[0],1/n[3]),e.rotate($i(this.angle)),e.fillStyle=this.selectionBackgroundColor,e.fillRect(-i.x/2,-i.y/2,i.x,i.y),e.restore()}strokeBorders(e,t){e.strokeRect(-t.x/2,-t.y/2,t.x,t.y)}_drawBorders(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=q({hasControls:this.hasControls,borderColor:this.borderColor,borderDashArray:this.borderDashArray},i);e.save(),e.strokeStyle=n.borderColor,this._setLineDash(e,n.borderDashArray),this.strokeBorders(e,t),n.hasControls&&this.drawControlsConnectingLines(e,t),e.restore()}_renderControls(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{hasBorders:i,hasControls:n}=this,s=q({hasBorders:i,hasControls:n},t),o=this.getViewportTransform(),a=s.hasBorders,l=s.hasControls,c=fr(o,this.calcTransformMatrix()),d=Ph(c);e.save(),e.translate(d.translateX,d.translateY),e.lineWidth=1*this.borderScaleFactor,this.group===this.parent&&(e.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),this.flipX&&(d.angle-=180),e.rotate($i(this.group?d.angle:this.angle)),a&&this.drawBorders(e,d,t),l&&this.drawControls(e,t),e.restore()}drawBorders(e,t,i){let n;if(i&&i.forActiveSelection||this.group){const s=dv(this.width,this.height,mf(t)),o=this.isStrokeAccountedForInDimensions()?ov:(this.strokeUniform?new ve().scalarAdd(this.canvas?this.canvas.getZoom():1):new ve(t.scaleX,t.scaleY)).scalarMultiply(this.strokeWidth);n=s.add(o).scalarAdd(this.borderScaleFactor).scalarAdd(2*this.padding)}else n=this._calculateCurrentDimensions().scalarAdd(this.borderScaleFactor);this._drawBorders(e,n,i)}drawControlsConnectingLines(e,t){let i=!1;e.beginPath(),this.forEachControl((n,s)=>{n.withConnection&&n.getVisibility(this,s)&&(i=!0,e.moveTo(n.x*t.x,n.y*t.y),e.lineTo(n.x*t.x+n.offsetX,n.y*t.y+n.offsetY))}),i&&e.stroke()}drawControls(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};e.save();const i=this.getCanvasRetinaScaling(),{cornerStrokeColor:n,cornerDashArray:s,cornerColor:o}=this,a=q({cornerStrokeColor:n,cornerDashArray:s,cornerColor:o},t);e.setTransform(i,0,0,i,0,0),e.strokeStyle=e.fillStyle=a.cornerColor,this.transparentCorners||(e.strokeStyle=a.cornerStrokeColor),this._setLineDash(e,a.cornerDashArray),this.forEachControl((l,c)=>{if(l.getVisibility(this,c)){const d=this.oCoords[c];l.render(e,d.x,d.y,a,this)}}),e.restore()}isControlVisible(e){return this.controls[e]&&this.controls[e].getVisibility(this,e)}setControlVisible(e,t){this._controlsVisibility||(this._controlsVisibility={}),this._controlsVisibility[e]=t}setControlsVisibility(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Object.entries(e).forEach(t=>{let[i,n]=t;return this.setControlVisible(i,n)})}clearContextTop(e){if(!this.canvas)return;const t=this.canvas.contextTop;if(!t)return;const i=this.canvas.viewportTransform;t.save(),t.transform(i[0],i[1],i[2],i[3],i[4],i[5]),this.transform(t);const n=this.width+4,s=this.height+4;return t.clearRect(-n/2,-s/2,n,s),e||t.restore(),t}onDeselect(e){return!1}onSelect(e){return!1}shouldStartDragging(e){return!1}onDragStart(e){return!1}canDrop(e){return!1}renderDragSourceEffect(e){}renderDropTargetEffect(e){}}function JS(r,e){return e.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(i=>{i!=="constructor"&&Object.defineProperty(r.prototype,i,Object.getOwnPropertyDescriptor(t.prototype,i)||Object.create(null))})}),r}Z($c,"ownDefaults",{noScaleCache:!0,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,cornerSize:13,touchCornerSize:24,transparentCorners:!0,cornerColor:"rgb(178,204,255)",cornerStrokeColor:"",cornerStyle:"rect",cornerDashArray:null,hasControls:!0,borderColor:"rgb(178,204,255)",borderDashArray:null,borderOpacityWhenMoving:.4,borderScaleFactor:1,hasBorders:!0,selectionBackgroundColor:"",selectable:!0,evented:!0,perPixelTargetFind:!1,activeOn:"down",hoverCursor:null,moveCursor:null});class Pr extends $c{}JS(Pr,[PS]),pt.setClass(Pr),pt.setClass(Pr,"object");const B5=(r,e,t,i)=>{const n=2*(i=Math.round(i))+1,{data:s}=r.getImageData(e-i,t-i,n,n);for(let o=3;o0)return!1;return!0};class QS{constructor(e){this.options=e,this.strokeProjectionMagnitude=this.options.strokeWidth/2,this.scale=new ve(this.options.scaleX,this.options.scaleY),this.strokeUniformScalar=this.options.strokeUniform?new ve(1/this.options.scaleX,1/this.options.scaleY):new ve(1,1)}createSideVector(e,t){const i=e0(e,t);return this.options.strokeUniform?i.multiply(this.scale):i}projectOrthogonally(e,t,i){return this.applySkew(e.add(this.calcOrthogonalProjection(e,t,i)))}isSkewed(){return this.options.skewX!==0||this.options.skewY!==0}applySkew(e){const t=new ve(e);return t.y+=t.x*Math.tan($i(this.options.skewY)),t.x+=t.y*Math.tan($i(this.options.skewX)),t}scaleUnitVector(e,t){return e.multiply(this.strokeUniformScalar).scalarMultiply(t)}}const j5=new ve;class fl extends QS{static getOrthogonalRotationFactor(e,t){const i=t?i0(e,t):y5(e);return Math.abs(i)2&&arguments[2]!==void 0?arguments[2]:this.strokeProjectionMagnitude;const n=this.createSideVector(e,t),s=RS(n),o=fl.getOrthogonalRotationFactor(s,this.bisector);return this.scaleUnitVector(s,i*o)}projectBevel(){const e=[];return(this.alpha%Ah==0?[this.B]:[this.B,this.C]).forEach(t=>{e.push(this.projectOrthogonally(this.A,t)),e.push(this.projectOrthogonally(this.A,t,-this.strokeProjectionMagnitude))}),e}projectMiter(){const e=[],t=Math.abs(this.alpha),i=1/Math.sin(t/2),n=this.scaleUnitVector(this.bisector,-this.strokeProjectionMagnitude*i),s=this.options.strokeUniform?t0(this.scaleUnitVector(this.bisector,this.options.strokeMiterLimit)):this.options.strokeMiterLimit;return t0(n)/this.strokeProjectionMagnitude<=s&&e.push(this.applySkew(this.A.add(n))),e.push(...this.projectBevel()),e}projectRoundNoSkew(e,t){const i=[],n=new ve(fl.getOrthogonalRotationFactor(this.bisector),fl.getOrthogonalRotationFactor(new ve(this.bisector.y,this.bisector.x)));return[new ve(1,0).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar).multiply(n),new ve(0,1).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar).multiply(n)].forEach(s=>{Lb(s,e,t)&&i.push(this.A.add(s))}),i}projectRoundWithSkew(e,t){const i=[],{skewX:n,skewY:s,scaleX:o,scaleY:a,strokeUniform:l}=this.options,c=new ve(Math.tan($i(n)),Math.tan($i(s))),d=this.strokeProjectionMagnitude,u=l?d/a/Math.sqrt(1/Ci(a,2)+1/Ci(o,2)*Ci(c.y,2)):d/Math.sqrt(1+Ci(c.y,2)),h=new ve(Math.sqrt(Math.max(Ci(d,2)-Ci(u,2),0)),u),f=l?d/Math.sqrt(1+Ci(c.x,2)*Ci(1/a,2)/Ci(1/o+1/o*c.x*c.y,2)):d/Math.sqrt(1+Ci(c.x,2)/Ci(1+c.x*c.y,2)),m=new ve(f,Math.sqrt(Math.max(Ci(d,2)-Ci(f,2),0)));return[m,m.scalarMultiply(-1),h,h.scalarMultiply(-1)].map(p=>this.applySkew(l?p.multiply(this.strokeUniformScalar):p)).forEach(p=>{Lb(p,e,t)&&i.push(this.applySkew(this.A).add(p))}),i}projectRound(){const e=[];e.push(...this.projectBevel());const t=this.alpha%Ah==0,i=this.applySkew(this.A),n=e[t?0:2].subtract(i),s=e[t?1:0].subtract(i),o=t?this.applySkew(this.AB.scalarMultiply(-1)):this.applySkew(this.bisector.multiply(this.strokeUniformScalar).scalarMultiply(-1)),a=jc(n,o)>0,l=a?n:s,c=a?s:n;return this.isSkewed()?e.push(...this.projectRoundWithSkew(l,c)):e.push(...this.projectRoundNoSkew(l,c)),e}projectPoints(){switch(this.options.strokeLineJoin){case"miter":return this.projectMiter();case"round":return this.projectRound();default:return this.projectBevel()}}project(){return this.projectPoints().map(e=>({originPoint:this.A,projectedPoint:e,angle:this.alpha,bisector:this.bisector}))}}class Mb extends QS{constructor(e,t,i){super(i),this.A=new ve(e),this.T=new ve(t)}calcOrthogonalProjection(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.strokeProjectionMagnitude;const n=this.createSideVector(e,t);return this.scaleUnitVector(RS(n),i)}projectButt(){return[this.projectOrthogonally(this.A,this.T,this.strokeProjectionMagnitude),this.projectOrthogonally(this.A,this.T,-this.strokeProjectionMagnitude)]}projectRound(){const e=[];if(!this.isSkewed()&&this.A.eq(this.T)){const t=new ve(1,1).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar);e.push(this.applySkew(this.A.add(t)),this.applySkew(this.A.subtract(t)))}else e.push(...new fl(this.A,this.T,this.T,this.options).projectRound());return e}projectSquare(){const e=[];if(this.A.eq(this.T)){const t=new ve(1,1).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar);e.push(this.A.add(t),this.A.subtract(t))}else{const t=this.calcOrthogonalProjection(this.A,this.T,this.strokeProjectionMagnitude),i=this.scaleUnitVector(fv(this.createSideVector(this.A,this.T)),-this.strokeProjectionMagnitude),n=this.A.add(i);e.push(n.add(t),n.subtract(t))}return e.map(t=>this.applySkew(t))}projectPoints(){switch(this.options.strokeLineCap){case"round":return this.projectRound();case"square":return this.projectSquare();default:return this.projectButt()}}project(){return this.projectPoints().map(e=>({originPoint:this.A,projectedPoint:e}))}}const G5=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const i=[];if(r.length===0)return i;const n=r.reduce((s,o)=>(s[s.length-1].eq(o)||s.push(new ve(o)),s),[new ve(r[0])]);if(n.length===1)t=!0;else if(!t){const s=n[0],o=((a,l)=>{for(let c=a.length-1;c>=0;c--)if(l(a[c],c,a))return c;return-1})(n,a=>!a.eq(s));n.splice(o+1)}return n.forEach((s,o,a)=>{let l,c;o===0?(c=a[1],l=t?s:a[a.length-1]):o===a.length-1?(l=a[o-1],c=t?s:a[0]):(l=a[o-1],c=a[o+1]),t&&a.length===1?i.push(...new Mb(s,s,e).project()):!t||o!==0&&o!==a.length-1?i.push(...new fl(s,l,c,e).project()):i.push(...new Mb(s,o===0?c:l,e).project())}),i},vv=r=>{const e={};return Object.keys(r).forEach(t=>{e[t]={},Object.keys(r[t]).forEach(i=>{e[t][i]=q({},r[t][i])})}),e},V5=r=>r.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">"),_v=r=>{const e=[];for(let t,i=0;i{const t=r.charCodeAt(e);if(isNaN(t))return"";if(t<55296||t>57343)return r.charAt(e);if(55296<=t&&t<=56319){if(r.length<=e+1)throw"High surrogate without following low surrogate";const n=r.charCodeAt(e+1);if(56320>n||n>57343)throw"High surrogate without following low surrogate";return r.charAt(e)+r.charAt(e+1)}if(e===0)throw"Low surrogate without preceding high surrogate";const i=r.charCodeAt(e-1);if(55296>i||i>56319)throw"Low surrogate without preceding high surrogate";return!1},yv=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return r.fill!==e.fill||r.stroke!==e.stroke||r.strokeWidth!==e.strokeWidth||r.fontSize!==e.fontSize||r.fontFamily!==e.fontFamily||r.fontWeight!==e.fontWeight||r.fontStyle!==e.fontStyle||r.textBackgroundColor!==e.textBackgroundColor||r.deltaY!==e.deltaY||t&&(r.overline!==e.overline||r.underline!==e.underline||r.linethrough!==e.linethrough)},H5=(r,e)=>{const t=e.split(` +`),i=[];let n=-1,s={};r=vv(r);for(let o=0;o0&&(yv(s,c,!0)?i.push({start:n,end:n+1,style:c}):i[i.length-1].end++),s=c||{}}else n+=a.length,s={}}return i},X5=(r,e)=>{if(!Array.isArray(r))return vv(r);const t=e.split(nv),i={};let n=-1,s=0;for(let o=0;o{var e;return(e=v5[r])!==null&&e!==void 0?e:r},q5=new RegExp("(".concat(la,")"),"gi"),Z5=r=>r.replace(q5," $1 ").replace(/,/gi," ").replace(/\s+/gi," ");var Fb,Nb,zb,Bb,jb,Gb,Vb;const jr="(".concat(la,")"),K5=String.raw(Fb||(Fb=So(["(skewX)(",")"],["(skewX)\\(","\\)"])),jr),J5=String.raw(Nb||(Nb=So(["(skewY)(",")"],["(skewY)\\(","\\)"])),jr),Q5=String.raw(zb||(zb=So(["(rotate)(","(?: "," ",")?)"],["(rotate)\\(","(?: "," ",")?\\)"])),jr,jr,jr),$5=String.raw(Bb||(Bb=So(["(scale)(","(?: ",")?)"],["(scale)\\(","(?: ",")?\\)"])),jr,jr),e4=String.raw(jb||(jb=So(["(translate)(","(?: ",")?)"],["(translate)\\(","(?: ",")?\\)"])),jr,jr),t4=String.raw(Gb||(Gb=So(["(matrix)("," "," "," "," "," ",")"],["(matrix)\\("," "," "," "," "," ","\\)"])),jr,jr,jr,jr,jr,jr),bv="(?:".concat(t4,"|").concat(e4,"|").concat(Q5,"|").concat($5,"|").concat(K5,"|").concat(J5,")"),i4="(?:".concat(bv,"*)"),r4=String.raw(Vb||(Vb=So(["^s*(?:","?)s*$"],["^\\s*(?:","?)\\s*$"])),i4),n4=new RegExp(r4),s4=new RegExp(bv),o4=new RegExp(bv,"g");function o0(r){const e=[];if(!(r=Z5(r).replace(/\s*([()])\s*/gi,"$1"))||r&&!n4.test(r))return[...Ur];for(const t of r.matchAll(o4)){const i=s4.exec(t[0]);if(!i)continue;let n=Ur;const s=i.filter(m=>!!m),[,o,...a]=s,[l,c,d,u,h,f]=a.map(m=>parseFloat(m));switch(o){case"translate":n=pd(l,c);break;case sv:n=gd({angle:l},{x:c,y:d});break;case ff:n=lv(l,c);break;case Gl:n=xS(l);break;case Vl:n=wS(l);break;case"matrix":n=[l,c,d,u,h,f]}e.push(n)}return av(e)}function a4(r,e,t,i){const n=Array.isArray(e);let s,o=e;if(r!==or&&r!==$r||e!==Qr){if(r==="strokeUniform")return e==="non-scaling-stroke";if(r==="strokeDashArray")o=e===Qr?null:e.replace(/,/g," ").split(/\s+/).map(parseFloat);else if(r==="transformMatrix")o=t&&t.transformMatrix?fr(t.transformMatrix,o0(e)):o0(e);else if(r==="visible")o=e!==Qr&&e!=="hidden",t&&t.visible===!1&&(o=!1);else if(r==="opacity")o=parseFloat(e),t&&t.opacity!==void 0&&(o*=t.opacity);else if(r==="textAnchor")o=e==="start"?hi:e==="end"?Qi:Zt;else if(r==="charSpacing")s=hl(e,i)/i*1e3;else if(r==="paintFirst"){const a=e.indexOf(or),l=e.indexOf($r);o=or,(a>-1&&l>-1&&l-1)&&(o=$r)}else{if(r==="href"||r==="xlink:href"||r==="font"||r==="id")return e;if(r==="imageSmoothing")return e==="optimizeQuality";s=n?e.map(hl):hl(e,i)}}else o="";return!n&&isNaN(s)?o:s}function l4(r,e){const t=r.match(g5);if(!t)return;const i=t[1],n=t[3],s=t[4],o=t[5],a=t[6];i&&(e.fontStyle=i),n&&(e.fontWeight=isNaN(parseFloat(n))?n:parseFloat(n)),s&&(e.fontSize=hl(s)),a&&(e.fontFamily=a),o&&(e.lineHeight=o==="normal"?1:o)}function c4(r,e){r.replace(/;\s*$/,"").split(";").forEach(t=>{if(!t)return;const[i,n]=t.split(":");e[i.trim().toLowerCase()]=n.trim()})}function d4(r){const e={},t=r.getAttribute("style");return t&&(typeof t=="string"?c4(t,e):function(i,n){Object.entries(i).forEach(s=>{let[o,a]=s;a!==void 0&&(n[o.toLowerCase()]=a)})}(t,e)),e}const u4={stroke:"strokeOpacity",fill:"fillOpacity"};function Fs(r,e,t){if(!r)return{};let i,n={},s=rv;r.parentNode&&Ib.test(r.parentNode.nodeName)&&(n=Fs(r.parentElement,e,t),n.fontSize&&(i=s=hl(n.fontSize)));const o=q(q(q({},e.reduce((c,d)=>{const u=r.getAttribute(d);return u&&(c[d]=u),c},{})),function(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u={};for(const h in d)W5(c,h.split(" "))&&(u=q(q({},u),d[h]));return u}(r,t)),d4(r));o[rp]&&r.setAttribute(rp,o[rp]),o[ip]&&(i=hl(o[ip],s),o[ip]="".concat(i));const a={};for(const c in o){const d=Y5(c),u=a4(d,o[c],n,i);a[d]=u}a&&a.font&&l4(a.font,a);const l=q(q({},n),a);return Ib.test(r.nodeName)?l:function(c){const d=Pr.getDefaults();return Object.entries(u4).forEach(u=>{let[h,f]=u;if(c[f]===void 0||c[h]==="")return;if(c[h]===void 0){if(!d[h])return;c[h]=d[h]}if(c[h].indexOf("url(")===0)return;const m=new mi(c[h]);c[h]=m.setAlpha(Bi(m.getAlpha()*c[f],2)).toRgba()}),c}(l)}const h4=["left","top","width","height","visible"],$S=["rx","ry"];class Ln extends Pr{static getDefaults(){return q(q({},super.getDefaults()),Ln.ownDefaults)}constructor(e){super(),Object.assign(this,Ln.ownDefaults),this.setOptions(e),this._initRxRy()}_initRxRy(){const{rx:e,ry:t}=this;e&&!t?this.ry=e:t&&!e&&(this.rx=t)}_render(e){const{width:t,height:i}=this,n=-t/2,s=-i/2,o=this.rx?Math.min(this.rx,t/2):0,a=this.ry?Math.min(this.ry,i/2):0,l=o!==0||a!==0;e.beginPath(),e.moveTo(n+o,s),e.lineTo(n+t-o,s),l&&e.bezierCurveTo(n+t-Qs*o,s,n+t,s+Qs*a,n+t,s+a),e.lineTo(n+t,s+i-a),l&&e.bezierCurveTo(n+t,s+i-Qs*a,n+t-Qs*o,s+i,n+t-o,s+i),e.lineTo(n+o,s+i),l&&e.bezierCurveTo(n+Qs*o,s+i,n,s+i-Qs*a,n,s+i-a),e.lineTo(n,s+a),l&&e.bezierCurveTo(n,s+Qs*a,n+Qs*o,s,n+o,s),e.closePath(),this._renderPaintInOrder(e)}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return super.toObject([...$S,...e])}_toSVG(){const{width:e,height:t,rx:i,ry:n}=this;return[" +`)]}static fromElement(e,t,i){return le(this,null,function*(){const n=Fs(e,this.ATTRIBUTE_NAMES,i),{left:s=0,top:o=0,width:a=0,height:l=0,visible:c=!0}=n,d=Mi(n,h4);return new this(q(q(q({},t),d),{},{left:s,top:o,width:a,height:l,visible:!!(c&&a&&l)}))})}}Z(Ln,"type","Rect"),Z(Ln,"cacheProperties",[...Rs,...$S]),Z(Ln,"ownDefaults",{rx:0,ry:0}),Z(Ln,"ATTRIBUTE_NAMES",[...Co,"x","y","rx","ry","width","height"]),pt.setClass(Ln),pt.setSVGClass(Ln);const Ts="initialization",Fh="added",xv="removed",Nh="imperative",eT=(r,e)=>{const{strokeUniform:t,strokeWidth:i,width:n,height:s,group:o}=e,a=o&&o!==r?gf(o.calcTransformMatrix(),r.calcTransformMatrix()):null,l=a?e.getRelativeCenterPoint().transform(a):e.getRelativeCenterPoint(),c=!e.isStrokeAccountedForInDimensions(),d=t&&c?f5(new ve(i,i),void 0,r.calcTransformMatrix()):ov,u=!t&&c?i:0,h=dv(n+u,s+u,av([a,e.calcOwnMatrix()],!0)).add(d).scalarDivide(2);return[l.subtract(h),l.add(h)]};class bf{calcLayoutResult(e,t){if(this.shouldPerformLayout(e))return this.calcBoundingBox(t,e)}shouldPerformLayout(e){let{type:t,prevStrategy:i,strategy:n}=e;return t===Ts||t===Nh||!!i&&n!==i}shouldLayoutClipPath(e){let{type:t,target:{clipPath:i}}=e;return t!==Ts&&i&&!i.absolutePositioned}getInitialSize(e,t){return t.size}calcBoundingBox(e,t){const{type:i,target:n}=t;if(i===Nh&&t.overrides)return t.overrides;if(e.length===0)return;const{left:s,top:o,width:a,height:l}=Es(e.map(u=>eT(n,u)).reduce((u,h)=>u.concat(h),[])),c=new ve(a,l),d=new ve(s,o).add(c.scalarDivide(2));if(i===Ts){const u=this.getInitialSize(t,{size:c,center:d});return{center:d,relativeCorrection:new ve(0,0),size:u}}return{center:d.transform(n.calcOwnMatrix()),size:c}}}Z(bf,"type","strategy");class a0 extends bf{shouldPerformLayout(e){return!0}}Z(a0,"type","fit-content"),pt.setClass(a0);const f4=["strategy"],m4=["target","strategy","bubbles","prevStrategy"],tT="layoutManager";class ed{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new a0;Z(this,"strategy",void 0),this.strategy=e,this._subscriptions=new Map}performLayout(e){const t=q(q({bubbles:!0,strategy:this.strategy},e),{},{prevStrategy:this._prevLayoutStrategy,stopPropagation(){this.bubbles=!1}});this.onBeforeLayout(t);const i=this.getLayoutResult(t);i&&this.commitLayout(t,i),this.onAfterLayout(t,i),this._prevLayoutStrategy=t.strategy}attachHandlers(e,t){const{target:i}=t;return[Ih,hS,Kc,fS,hf,mS,Oh,pS,$A].map(n=>e.on(n,s=>this.performLayout(n===Ih?{type:"object_modified",trigger:n,e:s,target:i}:{type:"object_modifying",trigger:n,e:s,target:i})))}subscribe(e,t){this.unsubscribe(e,t);const i=this.attachHandlers(e,t);this._subscriptions.set(e,i)}unsubscribe(e,t){(this._subscriptions.get(e)||[]).forEach(i=>i()),this._subscriptions.delete(e)}unsubscribeTargets(e){e.targets.forEach(t=>this.unsubscribe(t,e))}subscribeTargets(e){e.targets.forEach(t=>this.subscribe(t,e))}onBeforeLayout(e){const{target:t,type:i}=e,{canvas:n}=t;if(i===Ts||i===Fh?this.subscribeTargets(e):i===xv&&this.unsubscribeTargets(e),t.fire("layout:before",{context:e}),n&&n.fire("object:layout:before",{target:t,context:e}),i===Nh&&e.deep){const s=Mi(e,f4);t.forEachObject(o=>o.layoutManager&&o.layoutManager.performLayout(q(q({},s),{},{bubbles:!1,target:o})))}}getLayoutResult(e){const{target:t,strategy:i,type:n}=e,s=i.calcLayoutResult(e,t.getObjects());if(!s)return;const o=n===Ts?new ve:t.getRelativeCenterPoint(),{center:a,correction:l=new ve,relativeCorrection:c=new ve}=s,d=o.subtract(a).add(l).transform(n===Ts?Ur:Rn(t.calcOwnMatrix()),!0).add(c);return{result:s,prevCenter:o,nextCenter:a,offset:d}}commitLayout(e,t){const{target:i}=e,{result:{size:n},nextCenter:s}=t;var o,a;i.set({width:n.x,height:n.y}),this.layoutObjects(e,t),e.type===Ts?i.set({left:(o=e.x)!==null&&o!==void 0?o:s.x+n.x*sr(i.originX),top:(a=e.y)!==null&&a!==void 0?a:s.y+n.y*sr(i.originY)}):(i.setPositionByOrigin(s,Zt,Zt),i.setCoords(),i.set("dirty",!0))}layoutObjects(e,t){const{target:i}=e;i.forEachObject(n=>{n.group===i&&this.layoutObject(e,t,n)}),e.strategy.shouldLayoutClipPath(e)&&this.layoutObject(e,t,i.clipPath)}layoutObject(e,t,i){let{offset:n}=t;i.set({left:i.left+n.x,top:i.top+n.y})}onAfterLayout(e,t){const{target:i,strategy:n,bubbles:s,prevStrategy:o}=e,a=Mi(e,m4),{canvas:l}=i;i.fire("layout:after",{context:e,result:t}),l&&l.fire("object:layout:after",{context:e,result:t,target:i});const c=i.parent;s&&c!=null&&c.layoutManager&&((a.path||(a.path=[])).push(i),c.layoutManager.performLayout(q(q({},a),{},{target:c}))),i.set("dirty",!0)}dispose(){const{_subscriptions:e}=this;e.forEach(t=>t.forEach(i=>i())),e.clear()}toObject(){return{type:tT,strategy:this.strategy.constructor.type}}toJSON(){return this.toObject()}}pt.setClass(ed,tT);const p4=["type","objects","layoutManager"];class g4 extends ed{performLayout(){}}class es extends gS(Pr){static getDefaults(){return q(q({},super.getDefaults()),es.ownDefaults)}constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Z(this,"_activeObjects",[]),Z(this,"__objectSelectionTracker",void 0),Z(this,"__objectSelectionDisposer",void 0),Object.assign(this,es.ownDefaults),this.setOptions(t),this.groupInit(e,t)}groupInit(e,t){var i;this._objects=[...e],this.__objectSelectionTracker=this.__objectSelectionMonitor.bind(this,!0),this.__objectSelectionDisposer=this.__objectSelectionMonitor.bind(this,!1),this.forEachObject(n=>{this.enterGroup(n,!1)}),this.layoutManager=(i=t.layoutManager)!==null&&i!==void 0?i:new ed,this.layoutManager.performLayout({type:Ts,target:this,targets:[...e],x:t.left,y:t.top})}canEnterGroup(e){return e===this||this.isDescendantOf(e)?(_o("error","Group: circular object trees are not supported, this call has no effect"),!1):this._objects.indexOf(e)===-1||(_o("error","Group: duplicate objects are not supported inside group, this call has no effect"),!1)}_filterObjectsBeforeEnteringGroup(e){return e.filter((t,i,n)=>this.canEnterGroup(t)&&n.indexOf(t)===i)}add(){for(var e=arguments.length,t=new Array(e),i=0;i1?t-1:0),n=1;n{n._set(e,t)}),this}_shouldSetNestedCoords(){return this.subTargetCheck}removeAll(){return this._activeObjects=[],this.remove(...this._objects)}__objectSelectionMonitor(e,t){let{target:i}=t;const n=this._activeObjects;if(e)n.push(i),this._set("dirty",!0);else if(n.length>0){const s=n.indexOf(i);s>-1&&(n.splice(s,1),this._set("dirty",!0))}}_watchObject(e,t){e&&this._watchObject(!1,t),e?(t.on("selected",this.__objectSelectionTracker),t.on("deselected",this.__objectSelectionDisposer)):(t.off("selected",this.__objectSelectionTracker),t.off("deselected",this.__objectSelectionDisposer))}enterGroup(e,t){e.group&&e.group.remove(e),e._set("parent",this),this._enterGroup(e,t)}_enterGroup(e,t){t&&Mh(e,fr(Rn(this.calcTransformMatrix()),e.calcTransformMatrix())),this._shouldSetNestedCoords()&&e.setCoords(),e._set("group",this),e._set("canvas",this.canvas),this._watchObject(!0,e);const i=this.canvas&&this.canvas.getActiveObject&&this.canvas.getActiveObject();i&&(i===e||e.isDescendantOf(i))&&this._activeObjects.push(e)}exitGroup(e,t){this._exitGroup(e,t),e._set("parent",void 0),e._set("canvas",void 0)}_exitGroup(e,t){e._set("group",void 0),t||(Mh(e,fr(this.calcTransformMatrix(),e.calcTransformMatrix())),e.setCoords()),this._watchObject(!1,e);const i=this._activeObjects.length>0?this._activeObjects.indexOf(e):-1;i>-1&&this._activeObjects.splice(i,1)}shouldCache(){const e=Pr.prototype.shouldCache.call(this);if(e){for(let t=0;te.setCoords())}triggerLayout(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.layoutManager.performLayout(q({target:this,type:Nh},e))}render(e){this._transformDone=!0,super.render(e),this._transformDone=!1}__serializeObjects(e,t){const i=this.includeDefaultValues;return this._objects.filter(function(n){return!n.excludeFromExport}).map(function(n){const s=n.includeDefaultValues;n.includeDefaultValues=i;const o=n[e||"toObject"](t);return n.includeDefaultValues=s,o})}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const t=this.layoutManager.toObject();return q(q(q({},super.toObject(["subTargetCheck","interactive",...e])),t.strategy!=="fit-content"||this.includeDefaultValues?{layoutManager:t}:{}),{},{objects:this.__serializeObjects("toObject",e)})}toString(){return"#")}dispose(){this.layoutManager.unsubscribeTargets({targets:this.getObjects(),target:this}),this._activeObjects=[],this.forEachObject(e=>{this._watchObject(!1,e),e.dispose()}),super.dispose()}_createSVGBgRect(e){if(!this.backgroundColor)return"";const t=Ln.prototype._toSVG.call(this),i=t.indexOf("COMMON_PARTS");t[i]='for="group" ';const n=t.join("");return e?e(n):n}_toSVG(e){const t=[" +`],i=this._createSVGBgRect(e);i&&t.push(" ",i);for(let n=0;n +`),t}getSvgStyles(){const e=this.opacity!==void 0&&this.opacity!==1?"opacity: ".concat(this.opacity,";"):"",t=this.visible?"":" visibility: hidden;";return[e,this.getSvgFilter(),t].join("")}toClipPathSVG(e){const t=[],i=this._createSVGBgRect(e);i&&t.push(" ",i);for(let n=0;n{let[l,c]=a;const d=new this(l,q(q(q({},o),c),{},{layoutManager:new g4}));if(s){const u=pt.getClass(s.type),h=pt.getClass(s.strategy);d.layoutManager=new u(new h)}else d.layoutManager=new ed;return d.layoutManager.subscribeTargets({type:Ts,target:d,targets:d.getObjects()}),d.setCoords(),d})}}Z(es,"type","Group"),Z(es,"ownDefaults",{strokeWidth:0,subTargetCheck:!1,interactive:!1}),pt.setClass(es);const v4=(r,e)=>Math.min(e.width/r.width,e.height/r.height),_4=(r,e)=>Math.max(e.width/r.width,e.height/r.height),l0="\\s*,?\\s*",pc="".concat(l0,"(").concat(la,")"),y4="".concat(pc).concat(pc).concat(pc).concat(l0,"([01])").concat(l0,"([01])").concat(pc).concat(pc),b4={m:"l",M:"L"},x4=(r,e,t,i,n,s,o,a,l,c,d)=>{const u=Is(r),h=Ls(r),f=Is(e),m=Ls(e),p=t*n*f-i*s*m+o,g=i*n*f+t*s*m+a;return["C",c+l*(-t*n*h-i*s*u),d+l*(-i*n*h+t*s*u),p+l*(t*n*m+i*s*f),g+l*(i*n*m-t*s*f),p,g]},Ub=(r,e,t,i)=>{const n=Math.atan2(e,r),s=Math.atan2(i,t);return s>=n?s-n:2*Math.PI-(n-s)};function Hb(r,e,t,i,n,s,o,a){let l;if(ri.cachesBoundsOfCurve&&(l=[...arguments].join(),Bc.boundsOfCurveCache[l]))return Bc.boundsOfCurveCache[l];const c=Math.sqrt,d=Math.abs,u=[],h=[[0,0],[0,0]];let f=6*r-12*t+6*n,m=-3*r+9*t-9*n+3*o,p=3*t-3*r;for(let _=0;_<2;++_){if(_>0&&(f=6*e-12*i+6*s,m=-3*e+9*i-9*s+3*a,p=3*i-3*e),d(m)<1e-12){if(d(f)<1e-12)continue;const E=-p/f;0{let[i,n,s,o,a,l,c,d]=t;const u=((h,f,m,p,g,v,b)=>{if(m===0||p===0)return[];let S=0,_=0,x=0;const I=Math.PI,T=b*iv,O=Ls(T),E=Is(T),w=.5*(-E*h-O*f),X=.5*(-E*f+O*h),H=Ci(m,2),Y=Ci(p,2),k=Ci(X,2),D=Ci(w,2),M=H*Y-H*k-Y*D;let L=Math.abs(m),J=Math.abs(p);if(M<0){const He=Math.sqrt(1-M/(H*Y));L*=He,J*=He}else x=(g===v?-1:1)*Math.sqrt(M/(H*k+Y*D));const ce=x*L*X/J,te=-x*J*w/L,et=E*ce-O*te+.5*h,ot=O*ce+E*te+.5*f;let Ot=Ub(1,0,(w-ce)/L,(X-te)/J),gt=Ub((w-ce)/L,(X-te)/J,(-w-ce)/L,(-X-te)/J);v===0&>>0?gt-=2*I:v===1&><0&&(gt+=2*I);const je=Math.ceil(Math.abs(gt/I*2)),At=[],It=gt/je,de=8/3*Math.sin(It/4)*Math.sin(It/4)/Math.sin(It/2);let pe=Ot+It;for(let He=0;He{let e=0,t=0,i=0,n=0;const s=[];let o,a=0,l=0;for(const c of r){const d=[...c];let u;switch(d[0]){case"l":d[1]+=e,d[2]+=t;case"L":e=d[1],t=d[2],u=["L",e,t];break;case"h":d[1]+=e;case"H":e=d[1],u=["L",e,t];break;case"v":d[1]+=t;case"V":t=d[1],u=["L",e,t];break;case"m":d[1]+=e,d[2]+=t;case"M":e=d[1],t=d[2],i=d[1],n=d[2],u=["M",e,t];break;case"c":d[1]+=e,d[2]+=t,d[3]+=e,d[4]+=t,d[5]+=e,d[6]+=t;case"C":a=d[3],l=d[4],e=d[5],t=d[6],u=["C",d[1],d[2],a,l,e,t];break;case"s":d[1]+=e,d[2]+=t,d[3]+=e,d[4]+=t;case"S":o==="C"?(a=2*e-a,l=2*t-l):(a=e,l=t),e=d[3],t=d[4],u=["C",a,l,d[1],d[2],e,t],a=u[3],l=u[4];break;case"q":d[1]+=e,d[2]+=t,d[3]+=e,d[4]+=t;case"Q":a=d[1],l=d[2],e=d[3],t=d[4],u=["Q",a,l,e,t];break;case"t":d[1]+=e,d[2]+=t;case"T":o==="Q"?(a=2*e-a,l=2*t-l):(a=e,l=t),e=d[1],t=d[2],u=["Q",a,l,e,t];break;case"a":d[6]+=e,d[7]+=t;case"A":w4(e,t,d).forEach(h=>s.push(h)),e=d[6],t=d[7];break;case"z":case"Z":e=i,t=n,u=["Z"]}u?(s.push(u),o=u[0]):o=""}return s},zh=(r,e,t,i)=>Math.sqrt(Ci(t-r,2)+Ci(i-e,2)),iT=(r,e,t,i,n,s,o,a)=>l=>{const c=Ci(l,3),d=(f=>3*Ci(f,2)*(1-f))(l),u=(f=>3*f*Ci(1-f,2))(l),h=(f=>Ci(1-f,3))(l);return new ve(o*c+n*d+t*u+r*h,a*c+s*d+i*u+e*h)},rT=r=>Ci(r,2),nT=r=>2*r*(1-r),sT=r=>Ci(1-r,2),T4=(r,e,t,i,n,s,o,a)=>l=>{const c=rT(l),d=nT(l),u=sT(l),h=3*(u*(t-r)+d*(n-t)+c*(o-n)),f=3*(u*(i-e)+d*(s-i)+c*(a-s));return Math.atan2(f,h)},C4=(r,e,t,i,n,s)=>o=>{const a=rT(o),l=nT(o),c=sT(o);return new ve(n*a+t*l+r*c,s*a+i*l+e*c)},k4=(r,e,t,i,n,s)=>o=>{const a=1-o,l=2*(a*(t-r)+o*(n-t)),c=2*(a*(i-e)+o*(s-i));return Math.atan2(c,l)},Xb=(r,e,t)=>{let i=new ve(e,t),n=0;for(let s=1;s<=100;s+=1){const o=r(s/100);n+=zh(i.x,i.y,o.x,o.y),i=o}return n},E4=(r,e)=>{let t,i=0,n=0,s={x:r.x,y:r.y},o=q({},s),a=.01,l=0;const c=r.iterator,d=r.angleFinder;for(;n1e-4;)o=c(i),l=i,t=zh(s.x,s.y,o.x,o.y),t+n>e?(i-=a,a/=2):(s=o,i+=a,n+=t);return q(q({},o),{},{angle:d(l)})},oT=r=>{let e,t,i=0,n=0,s=0,o=0,a=0;const l=[];for(const c of r){const d={x:n,y:s,command:c[0],length:0};switch(c[0]){case"M":t=d,t.x=o=n=c[1],t.y=a=s=c[2];break;case"L":t=d,t.length=zh(n,s,c[1],c[2]),n=c[1],s=c[2];break;case"C":e=iT(n,s,c[1],c[2],c[3],c[4],c[5],c[6]),t=d,t.iterator=e,t.angleFinder=T4(n,s,c[1],c[2],c[3],c[4],c[5],c[6]),t.length=Xb(e,n,s),n=c[5],s=c[6];break;case"Q":e=C4(n,s,c[1],c[2],c[3],c[4]),t=d,t.iterator=e,t.angleFinder=k4(n,s,c[1],c[2],c[3],c[4]),t.length=Xb(e,n,s),n=c[3],s=c[4];break;case"Z":t=d,t.destX=o,t.destY=a,t.length=zh(n,s,o,a),n=o,s=a}i+=t.length,l.push(t)}return l.push({length:i,x:n,y:s}),l},A4=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:oT(r),i=0;for(;e-t[i].length>0&&i{var e;const t=[],i=(e=r.match(O4))!==null&&e!==void 0?e:[];for(const n of i){const s=n[0];if(s==="z"||s==="Z"){t.push([s]);continue}const o=L4[s.toLowerCase()];let a=[];if(s==="a"||s==="A"){Wb.lastIndex=0;for(let l=null;l=Wb.exec(n);)a.push(...l.slice(1))}else a=n.match(I4)||[];for(let l=0;l0&&d?d:s;for(let u=0;ur.map(t=>t.map((i,n)=>n===0||e===void 0?i:Bi(i,e)).join(" ")).join(" ");function c0(r,e){const t=r.style;t&&e&&(typeof e=="string"?t.cssText+=";"+e:Object.entries(e).forEach(i=>{let[n,s]=i;return t.setProperty(n,s)}))}class M4 extends ES{constructor(e){let{allowTouchScrolling:t=!1,containerClass:i=""}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(e),Z(this,"upper",void 0),Z(this,"container",void 0);const{el:n}=this.lower,s=this.createUpperCanvas();this.upper={el:s,ctx:s.getContext("2d")},this.applyCanvasStyle(n,{allowTouchScrolling:t}),this.applyCanvasStyle(s,{allowTouchScrolling:t,styles:{position:"absolute",left:"0",top:"0"}});const o=this.createContainerElement();o.classList.add(i),n.parentNode&&n.parentNode.replaceChild(o,n),o.append(n,s),this.container=o}createUpperCanvas(){const{el:e}=this.lower,t=mr();return t.className=e.className,t.classList.remove("lower-canvas"),t.classList.add("upper-canvas"),t.setAttribute("data-fabric","top"),t.style.cssText=e.style.cssText,t.setAttribute("draggable","true"),t}createContainerElement(){const e=jl().createElement("div");return e.setAttribute("data-fabric","wrapper"),c0(e,{position:"relative"}),Eb(e),e}applyCanvasStyle(e,t){const{styles:i,allowTouchScrolling:n}=t;c0(e,q(q({},i),{},{"touch-action":n?"manipulation":Qr})),Eb(e)}setDimensions(e,t){super.setDimensions(e,t);const{el:i,ctx:n}=this.upper;kS(i,n,e,t)}setCSSDimensions(e){super.setCSSDimensions(e),Jg(this.upper.el,e),Jg(this.container,e)}cleanupDOM(e){const t=this.container,{el:i}=this.lower,{el:n}=this.upper;super.cleanupDOM(e),t.removeChild(n),t.removeChild(i),t.parentNode&&t.parentNode.replaceChild(i,t)}dispose(){super.dispose(),rs().dispose(this.upper.el),delete this.upper,delete this.container}}class xf extends vd{constructor(){super(...arguments),Z(this,"targets",[]),Z(this,"_hoveredTargets",[]),Z(this,"_objectsToRender",void 0),Z(this,"_currentTransform",null),Z(this,"_groupSelector",null),Z(this,"contextTopDirty",!1)}static getDefaults(){return q(q({},super.getDefaults()),xf.ownDefaults)}get upperCanvasEl(){var e;return(e=this.elements.upper)===null||e===void 0?void 0:e.el}get contextTop(){var e;return(e=this.elements.upper)===null||e===void 0?void 0:e.ctx}get wrapperEl(){return this.elements.container}initElements(e){this.elements=new M4(e,{allowTouchScrolling:this.allowTouchScrolling,containerClass:this.containerClass}),this._createCacheCanvas()}_onObjectAdded(e){this._objectsToRender=void 0,super._onObjectAdded(e)}_onObjectRemoved(e){this._objectsToRender=void 0,e===this._activeObject&&(this.fire("before:selection:cleared",{deselected:[e]}),this._discardActiveObject(),this.fire("selection:cleared",{deselected:[e]}),e.fire("deselected",{target:e})),e===this._hoveredTarget&&(this._hoveredTarget=void 0,this._hoveredTargets=[]),super._onObjectRemoved(e)}_onStackOrderChanged(){this._objectsToRender=void 0,super._onStackOrderChanged()}_chooseObjectsToRender(){const e=this._activeObject;return!this.preserveObjectStacking&&e?this._objects.filter(t=>!t.group&&t!==e).concat(e):this._objects}renderAll(){this.cancelRequestedRender(),this.destroyed||(!this.contextTopDirty||this._groupSelector||this.isDrawingMode||(this.clearContext(this.contextTop),this.contextTopDirty=!1),this.hasLostContext&&(this.renderTopLayer(this.contextTop),this.hasLostContext=!1),!this._objectsToRender&&(this._objectsToRender=this._chooseObjectsToRender()),this.renderCanvas(this.getContext(),this._objectsToRender))}renderTopLayer(e){e.save(),this.isDrawingMode&&this._isCurrentlyDrawing&&(this.freeDrawingBrush&&this.freeDrawingBrush._render(),this.contextTopDirty=!0),this.selection&&this._groupSelector&&(this._drawSelection(e),this.contextTopDirty=!0),e.restore()}renderTop(){const e=this.contextTop;this.clearContext(e),this.renderTopLayer(e),this.fire("after:render",{ctx:e})}setTargetFindTolerance(e){e=Math.round(e),this.targetFindTolerance=e;const t=this.getRetinaScaling(),i=Math.ceil((2*e+1)*t);this.pixelFindCanvasEl.width=this.pixelFindCanvasEl.height=i,this.pixelFindContext.scale(t,t)}isTargetTransparent(e,t,i){const n=this.targetFindTolerance,s=this.pixelFindContext;this.clearContext(s),s.save(),s.translate(-t+n,-i+n),s.transform(...this.viewportTransform);const o=e.selectionBackgroundColor;e.selectionBackgroundColor="",e.render(s),e.selectionBackgroundColor=o,s.restore();const a=Math.round(n*this.getRetinaScaling());return B5(s,a,a,a)}_isSelectionKeyPressed(e){const t=this.selectionKey;return!!t&&(Array.isArray(t)?!!t.find(i=>!!i&&e[i]===!0):e[t])}_shouldClearSelection(e,t){const i=this.getActiveObjects(),n=this._activeObject;return!!(!t||t&&n&&i.length>1&&i.indexOf(t)===-1&&n!==t&&!this._isSelectionKeyPressed(e)||t&&!t.evented||t&&!t.selectable&&n&&n!==t)}_shouldCenterTransform(e,t,i){if(!e)return;let n;return t===ff||t===tn||t===bn||t===Kc?n=this.centeredScaling||e.centeredScaling:t===sv&&(n=this.centeredRotation||e.centeredRotation),n?!i:i}_getOriginFromCorner(e,t){const i={x:e.originX,y:e.originY};return t&&(["ml","tl","bl"].includes(t)?i.x=Qi:["mr","tr","br"].includes(t)&&(i.x=hi),["tl","mt","tr"].includes(t)?i.y=Kg:["bl","mb","br"].includes(t)&&(i.y=Jr)),i}_setupCurrentTransform(e,t,i){var n;const s=t.group?vo(this.getScenePoint(e),void 0,t.group.calcTransformMatrix()):this.getScenePoint(e),{key:o="",control:a}=t.getActiveControl()||{},l=i&&a?(n=a.getActionHandler(e,t,a))===null||n===void 0?void 0:n.bind(a):LS,c=((f,m,p,g)=>{if(!m||!f)return"drag";const v=g.controls[m];return v.getActionName(p,v,g)})(i,o,e,t),d=e[this.centeredKey],u=this._shouldCenterTransform(t,c,d)?{x:Zt,y:Zt}:this._getOriginFromCorner(t,o),h={target:t,action:c,actionHandler:l,actionPerformed:!1,corner:o,scaleX:t.scaleX,scaleY:t.scaleY,skewX:t.skewX,skewY:t.skewY,offsetX:s.x-t.left,offsetY:s.y-t.top,originX:u.x,originY:u.y,ex:s.x,ey:s.y,lastX:s.x,lastY:s.y,theta:$i(t.angle),width:t.width,height:t.height,shiftKey:e.shiftKey,altKey:d,original:q(q({},AS(t)),{},{originX:u.x,originY:u.y})};this._currentTransform=h,this.fire("before:transform",{e,transform:h})}setCursor(e){this.upperCanvasEl.style.cursor=e}_drawSelection(e){const{x:t,y:i,deltaX:n,deltaY:s}=this._groupSelector,o=new ve(t,i).transform(this.viewportTransform),a=new ve(t+n,i+s).transform(this.viewportTransform),l=this.selectionLineWidth/2;let c=Math.min(o.x,a.x),d=Math.min(o.y,a.y),u=Math.max(o.x,a.x),h=Math.max(o.y,a.y);this.selectionColor&&(e.fillStyle=this.selectionColor,e.fillRect(c,d,u-c,h-d)),this.selectionLineWidth&&this.selectionBorderColor&&(e.lineWidth=this.selectionLineWidth,e.strokeStyle=this.selectionBorderColor,c+=l,d+=l,u-=l,h-=l,Pr.prototype._setLineDash.call(this,e,this.selectionDashArray),e.strokeRect(c,d,u-c,h-d))}findTarget(e){if(this.skipTargetFind)return;const t=this.getViewportPoint(e),i=this._activeObject,n=this.getActiveObjects();if(this.targets=[],i&&n.length>=1){if(i.findControl(t,Qg(e))||n.length>1&&this.searchPossibleTargets([i],t))return i;if(i===this.searchPossibleTargets([i],t)){if(this.preserveObjectStacking){const s=this.targets;this.targets=[];const o=this.searchPossibleTargets(this._objects,t);return e[this.altSelectionKey]&&o&&o!==i?(this.targets=s,i):o}return i}}return this.searchPossibleTargets(this._objects,t)}_pointIsInObjectSelectionArea(e,t){let i=e.getCoords();const n=this.getZoom(),s=e.padding/n;if(s){const[o,a,l,c]=i,d=Math.atan2(a.y-o.y,a.x-o.x),u=Is(d)*s,h=Ls(d)*s,f=u+h,m=u-h;i=[new ve(o.x-m,o.y-f),new ve(a.x+f,a.y-m),new ve(l.x+m,l.y+f),new ve(c.x-f,c.y+m)]}return zi.isPointInPolygon(t,i)}_checkTarget(e,t){return!!(e&&e.visible&&e.evented&&this._pointIsInObjectSelectionArea(e,vo(t,void 0,this.viewportTransform))&&(!this.perPixelTargetFind&&!e.perPixelTargetFind||e.isEditing||!this.isTargetTransparent(e,t.x,t.y)))}_searchPossibleTargets(e,t){let i=e.length;for(;i--;){const n=e[i];if(this._checkTarget(n,t)){if(uh(n)&&n.subTargetCheck){const s=this._searchPossibleTargets(n._objects,t);s&&this.targets.push(s)}return n}}}searchPossibleTargets(e,t){const i=this._searchPossibleTargets(e,t);if(i&&uh(i)&&i.interactive&&this.targets[0]){const n=this.targets;for(let s=n.length-1;s>0;s--){const o=n[s];if(!uh(o)||!o.interactive)return o}return n[0]}return i}getViewportPoint(e){return this._pointer?this._pointer:this.getPointer(e,!0)}getScenePoint(e){return this._absolutePointer?this._absolutePointer:this.getPointer(e)}getPointer(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];const i=this.upperCanvasEl,n=i.getBoundingClientRect();let s=c5(e),o=n.width||0,a=n.height||0;o&&a||(Jr in n&&Kg in n&&(a=Math.abs(n.top-n.bottom)),Qi in n&&hi in n&&(o=Math.abs(n.right-n.left))),this.calcOffset(),s.x=s.x-this._offset.left,s.y=s.y-this._offset.top,t||(s=vo(s,void 0,this.viewportTransform));const l=this.getRetinaScaling();l!==1&&(s.x/=l,s.y/=l);const c=o===0||a===0?new ve(1,1):new ve(i.width/o,i.height/a);return s.multiply(c)}_setDimensionsImpl(e,t){this._resetTransformEventData(),super._setDimensionsImpl(e,t),this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._setBrushStyles(this.contextTop)}_createCacheCanvas(){this.pixelFindCanvasEl=mr(),this.pixelFindContext=this.pixelFindCanvasEl.getContext("2d",{willReadFrequently:!0}),this.setTargetFindTolerance(this.targetFindTolerance)}getTopContext(){return this.elements.upper.ctx}getSelectionContext(){return this.elements.upper.ctx}getSelectionElement(){return this.elements.upper.el}getActiveObject(){return this._activeObject}getActiveObjects(){const e=this._activeObject;return Zo(e)?e.getObjects():e?[e]:[]}_fireSelectionEvents(e,t){let i=!1,n=!1;const s=this.getActiveObjects(),o=[],a=[];e.forEach(l=>{s.includes(l)||(i=!0,l.fire("deselected",{e:t,target:l}),a.push(l))}),s.forEach(l=>{e.includes(l)||(i=!0,l.fire("selected",{e:t,target:l}),o.push(l))}),e.length>0&&s.length>0?(n=!0,i&&this.fire("selection:updated",{e:t,selected:o,deselected:a})):s.length>0?(n=!0,this.fire("selection:created",{e:t,selected:o})):e.length>0&&(n=!0,this.fire("selection:cleared",{e:t,deselected:a})),n&&(this._objectsToRender=void 0)}setActiveObject(e,t){const i=this.getActiveObjects(),n=this._setActiveObject(e,t);return this._fireSelectionEvents(i,t),n}_setActiveObject(e,t){const i=this._activeObject;return i!==e&&!(!this._discardActiveObject(t,e)&&this._activeObject)&&!e.onSelect({e:t})&&(this._activeObject=e,Zo(e)&&i!==e&&e.set("canvas",this),e.setCoords(),!0)}_discardActiveObject(e,t){const i=this._activeObject;return!!i&&!i.onDeselect({e,object:t})&&(this._currentTransform&&this._currentTransform.target===i&&this.endCurrentTransform(e),Zo(i)&&i===this._hoveredTarget&&(this._hoveredTarget=void 0),this._activeObject=void 0,!0)}discardActiveObject(e){const t=this.getActiveObjects(),i=this.getActiveObject();t.length&&this.fire("before:selection:cleared",{e,deselected:[i]});const n=this._discardActiveObject(e);return this._fireSelectionEvents(t,e),n}endCurrentTransform(e){const t=this._currentTransform;this._finalizeCurrentTransform(e),t&&t.target&&(t.target.isMoving=!1),this._currentTransform=null}_finalizeCurrentTransform(e){const t=this._currentTransform,i=t.target,n={e,target:i,transform:t,action:t.action};i._scaling&&(i._scaling=!1),i.setCoords(),t.actionPerformed&&(this.fire("object:modified",n),i.fire(Ih,n))}setViewportTransform(e){super.setViewportTransform(e);const t=this._activeObject;t&&t.setCoords()}destroy(){const e=this._activeObject;Zo(e)&&(e.removeAll(),e.dispose()),delete this._activeObject,super.destroy(),this.pixelFindContext=null,this.pixelFindCanvasEl=void 0}clear(){this.discardActiveObject(),this._activeObject=void 0,this.clearContext(this.contextTop),super.clear()}drawControls(e){const t=this._activeObject;t&&t._renderControls(e)}_toObject(e,t,i){const n=this._realizeGroupTransformOnObject(e),s=super._toObject(e,t,i);return e.set(n),s}_realizeGroupTransformOnObject(e){const{group:t}=e;if(t&&Zo(t)&&this._activeObject===t){const i=Ul(e,["angle","flipX","flipY",hi,tn,bn,Gl,Vl,Jr]);return u5(e,t.calcOwnMatrix()),i}return{}}_setSVGObject(e,t,i){const n=this._realizeGroupTransformOnObject(t);super._setSVGObject(e,t,i),t.set(n)}}Z(xf,"ownDefaults",{uniformScaling:!0,uniScaleKey:"shiftKey",centeredScaling:!1,centeredRotation:!1,centeredKey:"altKey",altActionKey:"shiftKey",selection:!0,selectionKey:"shiftKey",selectionColor:"rgba(100, 100, 255, 0.3)",selectionDashArray:[],selectionBorderColor:"rgba(255, 255, 255, 0.3)",selectionLineWidth:1,selectionFullyContained:!1,hoverCursor:"move",moveCursor:"move",defaultCursor:"default",freeDrawingCursor:"crosshair",notAllowedCursor:"not-allowed",perPixelTargetFind:!1,targetFindTolerance:0,skipTargetFind:!1,stopContextMenu:!1,fireRightClick:!1,fireMiddleClick:!1,enablePointerEvents:!1,containerClass:"canvas-container",preserveObjectStacking:!1});class R4{constructor(e){Z(this,"targets",[]),Z(this,"__disposer",void 0);const t=()=>{const{hiddenTextarea:n}=e.getActiveObject()||{};n&&n.focus()},i=e.upperCanvasEl;i.addEventListener("click",t),this.__disposer=()=>i.removeEventListener("click",t)}exitTextEditing(){this.target=void 0,this.targets.forEach(e=>{e.isEditing&&e.exitEditing()})}add(e){this.targets.push(e)}remove(e){this.unregister(e),nl(this.targets,e)}register(e){this.target=e}unregister(e){e===this.target&&(this.target=void 0)}onMouseMove(e){var t;!((t=this.target)===null||t===void 0)&&t.isEditing&&this.target.updateSelectionOnMouseMove(e)}clear(){this.targets=[],this.target=void 0}dispose(){this.clear(),this.__disposer(),delete this.__disposer}}const F4=["target","oldTarget","fireCanvas","e"],sn={passive:!1},Ha=(r,e)=>{const t=r.getViewportPoint(e),i=r.getScenePoint(e);return{viewportPoint:t,scenePoint:i,pointer:t,absolutePointer:i}},$s=function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i1?e-1:0),i=1;i1&&arguments[1]!==void 0?arguments[1]:{}),Z(this,"_isClick",void 0),Z(this,"textEditingManager",new R4(this)),["_onMouseDown","_onTouchStart","_onMouseMove","_onMouseUp","_onTouchEnd","_onResize","_onMouseWheel","_onMouseOut","_onMouseEnter","_onContextMenu","_onDoubleClick","_onDragStart","_onDragEnd","_onDragProgress","_onDragOver","_onDragEnter","_onDragLeave","_onDrop"].forEach(t=>{this[t]=this[t].bind(this)}),this.addOrRemove($s,"add")}_getEventPrefix(){return this.enablePointerEvents?"pointer":"mouse"}addOrRemove(e,t){const i=this.upperCanvasEl,n=this._getEventPrefix();e(CS(i),"resize",this._onResize),e(i,n+"down",this._onMouseDown),e(i,"".concat(n,"move"),this._onMouseMove,sn),e(i,"".concat(n,"out"),this._onMouseOut),e(i,"".concat(n,"enter"),this._onMouseEnter),e(i,"wheel",this._onMouseWheel),e(i,"contextmenu",this._onContextMenu),e(i,"dblclick",this._onDoubleClick),e(i,"dragstart",this._onDragStart),e(i,"dragend",this._onDragEnd),e(i,"dragover",this._onDragOver),e(i,"dragenter",this._onDragEnter),e(i,"dragleave",this._onDragLeave),e(i,"drop",this._onDrop),this.enablePointerEvents||e(i,"touchstart",this._onTouchStart,sn)}removeListeners(){this.addOrRemove(pn,"remove");const e=this._getEventPrefix(),t=Dn(this.upperCanvasEl);pn(t,"".concat(e,"up"),this._onMouseUp),pn(t,"touchend",this._onTouchEnd,sn),pn(t,"".concat(e,"move"),this._onMouseMove,sn),pn(t,"touchmove",this._onMouseMove,sn)}_onMouseWheel(e){this.__onMouseWheel(e)}_onMouseOut(e){const t=this._hoveredTarget,i=q({e},Ha(this,e));this.fire("mouse:out",q(q({},i),{},{target:t})),this._hoveredTarget=void 0,t&&t.fire("mouseout",q({},i)),this._hoveredTargets.forEach(n=>{this.fire("mouse:out",q(q({},i),{},{target:n})),n&&n.fire("mouseout",q({},i))}),this._hoveredTargets=[]}_onMouseEnter(e){this._currentTransform||this.findTarget(e)||(this.fire("mouse:over",q({e},Ha(this,e))),this._hoveredTarget=void 0,this._hoveredTargets=[])}_onDragStart(e){this._isClick=!1;const t=this.getActiveObject();if(t&&t.onDragStart(e)){this._dragSource=t;const i={e,target:t};return this.fire("dragstart",i),t.fire("dragstart",i),void $s(this.upperCanvasEl,"drag",this._onDragProgress)}$g(e)}_renderDragEffects(e,t,i){let n=!1;const s=this._dropTarget;s&&s!==t&&s!==i&&(s.clearContextTop(),n=!0),t==null||t.clearContextTop(),i!==t&&(i==null||i.clearContextTop());const o=this.contextTop;o.save(),o.transform(...this.viewportTransform),t&&(o.save(),t.transform(o),t.renderDragSourceEffect(e),o.restore(),n=!0),i&&(o.save(),i.transform(o),i.renderDropTargetEffect(e),o.restore(),n=!0),o.restore(),n&&(this.contextTopDirty=!0)}_onDragEnd(e){const t=!!e.dataTransfer&&e.dataTransfer.dropEffect!==Qr,i=t?this._activeObject:void 0,n={e,target:this._dragSource,subTargets:this.targets,dragSource:this._dragSource,didDrop:t,dropTarget:i};pn(this.upperCanvasEl,"drag",this._onDragProgress),this.fire("dragend",n),this._dragSource&&this._dragSource.fire("dragend",n),delete this._dragSource,this._onMouseUp(e)}_onDragProgress(e){const t={e,target:this._dragSource,dragSource:this._dragSource,dropTarget:this._draggedoverTarget};this.fire("drag",t),this._dragSource&&this._dragSource.fire("drag",t)}findDragTargets(e){return this.targets=[],{target:this._searchPossibleTargets(this._objects,this.getViewportPoint(e)),targets:[...this.targets]}}_onDragOver(e){const t="dragover",{target:i,targets:n}=this.findDragTargets(e),s=this._dragSource,o={e,target:i,subTargets:n,dragSource:s,canDrop:!1,dropTarget:void 0};let a;this.fire(t,o),this._fireEnterLeaveEvents(i,o),i&&(i.canDrop(e)&&(a=i),i.fire(t,o));for(let l=0;l0)return;this.__onMouseUp(e),this._resetTransformEventData(),delete this.mainTouchId;const t=this._getEventPrefix(),i=Dn(this.upperCanvasEl);pn(i,"touchend",this._onTouchEnd,sn),pn(i,"touchmove",this._onMouseMove,sn),this._willAddMouseDown&&clearTimeout(this._willAddMouseDown),this._willAddMouseDown=setTimeout(()=>{$s(this.upperCanvasEl,"".concat(t,"down"),this._onMouseDown),this._willAddMouseDown=0},400)}_onMouseUp(e){this.__onMouseUp(e),this._resetTransformEventData();const t=this.upperCanvasEl,i=this._getEventPrefix();if(this._isMainEvent(e)){const n=Dn(this.upperCanvasEl);pn(n,"".concat(i,"up"),this._onMouseUp),pn(n,"".concat(i,"move"),this._onMouseMove,sn),$s(t,"".concat(i,"move"),this._onMouseMove,sn)}}_onMouseMove(e){const t=this.getActiveObject();!this.allowTouchScrolling&&(!t||!t.shouldStartDragging(e))&&e.preventDefault&&e.preventDefault(),this.__onMouseMove(e)}_onResize(){this.calcOffset(),this._resetTransformEventData()}_shouldRender(e){const t=this.getActiveObject();return!!t!=!!e||t&&e&&t!==e}__onMouseUp(e){var t;this._cacheTransformEventData(e),this._handleEvent(e,"up:before");const i=this._currentTransform,n=this._isClick,s=this._target,{button:o}=e;if(o)return(this.fireMiddleClick&&o===1||this.fireRightClick&&o===2)&&this._handleEvent(e,"up"),void this._resetTransformEventData();if(this.isDrawingMode&&this._isCurrentlyDrawing)return void this._onMouseUpInDrawingMode(e);if(!this._isMainEvent(e))return;let a,l,c=!1;if(i&&(this._finalizeCurrentTransform(e),c=i.actionPerformed),!n){const d=s===this._activeObject;this.handleSelection(e),c||(c=this._shouldRender(s)||!d&&s===this._activeObject)}if(s){const d=s.findControl(this.getViewportPoint(e),Qg(e)),{key:u,control:h}=d||{};if(l=u,s.selectable&&s!==this._activeObject&&s.activeOn==="up")this.setActiveObject(s,e),c=!0;else if(h){const f=h.getMouseUpHandler(e,s,h);f&&(a=this.getScenePoint(e),f.call(h,e,i,a.x,a.y))}s.isMoving=!1}if(i&&(i.target!==s||i.corner!==l)){const d=i.target&&i.target.controls[i.corner],u=d&&d.getMouseUpHandler(e,i.target,d);a=a||this.getScenePoint(e),u&&u.call(d,e,i,a.x,a.y)}this._setCursorFromEvent(e,s),this._handleEvent(e,"up"),this._groupSelector=null,this._currentTransform=null,s&&(s.__corner=void 0),c?this.requestRenderAll():n||(t=this._activeObject)!==null&&t!==void 0&&t.isEditing||this.renderTop()}_basicEventHandler(e,t){const{target:i,subTargets:n=[]}=t;this.fire(e,t),i&&i.fire(e,t);for(let s=0;s{i=o.hoverCursor||i}),this.setCursor(i)}handleMultiSelection(e,t){const i=this._activeObject,n=Zo(i);if(i&&this._isSelectionKeyPressed(e)&&this.selection&&t&&t.selectable&&(i!==t||n)&&(n||!t.isDescendantOf(i)&&!i.isDescendantOf(t))&&!t.onSelect({e})&&!i.getActiveControl()){if(n){const s=i.getObjects();if(t===i){const o=this.getViewportPoint(e);if(!(t=this.searchPossibleTargets(s,o)||this.searchPossibleTargets(this._objects,o))||!t.selectable)return!1}t.group===i?(i.remove(t),this._hoveredTarget=t,this._hoveredTargets=[...this.targets],i.size()===1&&this._setActiveObject(i.item(0),e)):(i.multiSelectAdd(t),this._hoveredTarget=i,this._hoveredTargets=[...this.targets]),this._fireSelectionEvents(s,e)}else{i.exitEditing&&i.exitEditing();const s=new(pt.getClass("ActiveSelection"))([],{canvas:this});s.multiSelectAdd(i,t),this._hoveredTarget=s,this._setActiveObject(s,e),this._fireSelectionEvents([i],e)}return!0}return!1}handleSelection(e){if(!this.selection||!this._groupSelector)return!1;const{x:t,y:i,deltaX:n,deltaY:s}=this._groupSelector,o=new ve(t,i),a=o.add(new ve(n,s)),l=o.min(a),c=o.max(a).subtract(l),d=this.collectObjects({left:l.x,top:l.y,width:c.x,height:c.y},{includeIntersecting:!this.selectionFullyContained}),u=o.eq(a)?d[0]?[d[0]]:[]:d.length>1?d.filter(h=>!h.onSelect({e})).reverse():d;if(u.length===1)this.setActiveObject(u[0],e);else if(u.length>1){const h=pt.getClass("ActiveSelection");this.setActiveObject(new h(u,{canvas:this}),e)}return this._groupSelector=null,!0}clear(){this.textEditingManager.clear(),super.clear()}destroy(){this.removeListeners(),this.textEditingManager.dispose(),super.destroy()}}const aT={x1:0,y1:0,x2:0,y2:0},z4=q(q({},aT),{},{r1:0,r2:0}),al=(r,e)=>isNaN(r)&&typeof e=="number"?e:r,B4=/^(\d+\.\d+)%|(\d+)%$/;function lT(r){return r&&B4.test(r)}function cT(r,e){const t=typeof r=="number"?r:typeof r=="string"?parseFloat(r)/(lT(r)?100:1):NaN;return Tl(0,al(t,e),1)}const j4=/\s*;\s*/,G4=/\s*:\s*/;function V4(r,e){let t,i;const n=r.getAttribute("style");if(n){const o=n.split(j4);o[o.length-1]===""&&o.pop();for(let a=o.length;a--;){const[l,c]=o[a].split(G4).map(d=>d.trim());l==="stop-color"?t=c:l==="stop-opacity"&&(i=c)}}const s=new mi(t||r.getAttribute("stop-color")||"rgb(0,0,0)");return{offset:cT(r.getAttribute("offset"),0),color:s.toRgb(),opacity:al(parseFloat(i||r.getAttribute("stop-opacity")||""),1)*s.getAlpha()*e}}function U4(r,e){const t=[],i=r.getElementsByTagName("stop"),n=cT(e,1);for(let s=i.length;s--;)t.push(V4(i[s],n));return t}function dT(r){return r.nodeName==="linearGradient"||r.nodeName==="LINEARGRADIENT"?"linear":"radial"}function uT(r){return r.getAttribute("gradientUnits")==="userSpaceOnUse"?"pixels":"percentage"}function kn(r,e){return r.getAttribute(e)}function H4(r,e){return function(t,i){let n,{width:s,height:o,gradientUnits:a}=i;return Object.keys(t).reduce((l,c)=>{const d=t[c];return d==="Infinity"?n=1:d==="-Infinity"?n=0:(n=typeof d=="string"?parseFloat(d):d,typeof d=="string"&&lT(d)&&(n*=.01,a==="pixels"&&(c!=="x1"&&c!=="x2"&&c!=="r2"||(n*=s),c!=="y1"&&c!=="y2"||(n*=o)))),l[c]=n,l},{})}(dT(r)==="linear"?function(t){return{x1:kn(t,"x1")||0,y1:kn(t,"y1")||0,x2:kn(t,"x2")||"100%",y2:kn(t,"y2")||0}}(r):function(t){return{x1:kn(t,"fx")||kn(t,"cx")||"50%",y1:kn(t,"fy")||kn(t,"cy")||"50%",r1:0,x2:kn(t,"cx")||"50%",y2:kn(t,"cy")||"50%",r2:kn(t,"r")||"50%"}}(r),q(q({},e),{},{gradientUnits:uT(r)}))}class wu{constructor(e){const{type:t="linear",gradientUnits:i="pixels",coords:n={},colorStops:s=[],offsetX:o=0,offsetY:a=0,gradientTransform:l,id:c}=e||{};Object.assign(this,{type:t,gradientUnits:i,coords:q(q({},t==="radial"?z4:aT),n),colorStops:s,offsetX:o,offsetY:a,gradientTransform:l,id:c?"".concat(c,"_").concat(yo()):yo()})}addColorStop(e){for(const t in e){const i=new mi(e[t]);this.colorStops.push({offset:parseFloat(t),color:i.toRgb(),opacity:i.getAlpha()})}return this}toObject(e){return q(q({},Ul(this,e)),{},{type:this.type,coords:q({},this.coords),colorStops:this.colorStops.map(t=>q({},t)),offsetX:this.offsetX,offsetY:this.offsetY,gradientUnits:this.gradientUnits,gradientTransform:this.gradientTransform?[...this.gradientTransform]:void 0})}toSVG(e){let{additionalTransform:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=[],n=this.gradientTransform?this.gradientTransform.concat():Ur.concat(),s=this.gradientUnits==="pixels"?"userSpaceOnUse":"objectBoundingBox",o=this.colorStops.map(u=>q({},u)).sort((u,h)=>u.offset-h.offset);let a=-this.offsetX,l=-this.offsetY;var c;s==="objectBoundingBox"?(a/=e.width,l/=e.height):(a+=e.width/2,l+=e.height/2),(c=e)&&typeof c._renderPathCommands=="function"&&this.gradientUnits!=="percentage"&&(a-=e.pathOffset.x,l-=e.pathOffset.y),n[4]-=a,n[5]-=l;const d=['id="SVGID_'.concat(this.id,'"'),'gradientUnits="'.concat(s,'"'),'gradientTransform="'.concat(t?t+" ":"").concat(Dh(n),'"'),""].join(" ");if(this.type==="linear"){const{x1:u,y1:h,x2:f,y2:m}=this.coords;i.push(" +`)}else if(this.type==="radial"){const{x1:u,y1:h,x2:f,y2:m,r1:p,r2:g}=this.coords,v=p>g;i.push(" +`),v&&(o.reverse(),o.forEach(S=>{S.offset=1-S.offset}));const b=Math.min(p,g);if(b>0){const S=b/Math.max(p,g);o.forEach(_=>{_.offset+=S*(1-_.offset)})}}return o.forEach(u=>{let{color:h,offset:f,opacity:m}=u;i.push(" +`)}),i.push(this.type==="linear"?"":"",` +`),i.join("")}toLive(e){const{x1:t,y1:i,x2:n,y2:s,r1:o,r2:a}=this.coords,l=this.type==="linear"?e.createLinearGradient(t,i,n,s):e.createRadialGradient(t,i,o,n,s,a);return this.colorStops.forEach(c=>{let{color:d,opacity:u,offset:h}=c;l.addColorStop(h,u!==void 0?new mi(d).setAlpha(u).toRgba():d)}),l}static fromObject(e){return le(this,null,function*(){const{colorStops:t,gradientTransform:i}=e;return new this(q(q({},e),{},{colorStops:t?t.map(n=>q({},n)):void 0,gradientTransform:i?[...i]:void 0}))})}static fromElement(e,t,i){const n=uT(e),s=t._findCenterFromElement();return new this(q({id:e.getAttribute("id")||void 0,type:dT(e),coords:H4(e,{width:i.viewBoxWidth||i.width,height:i.viewBoxHeight||i.height}),colorStops:U4(e,i.opacity),gradientUnits:n,gradientTransform:o0(e.getAttribute("gradientTransform")||"")},n==="pixels"?{offsetX:t.width/2-s.x,offsetY:t.height/2-s.y}:{offsetX:0,offsetY:0}))}}Z(wu,"type","Gradient"),pt.setClass(wu,"gradient"),pt.setClass(wu,"linear"),pt.setClass(wu,"radial");const X4=["type","source","patternTransform"];class op{get type(){return"pattern"}set type(e){_o("warn","Setting type has no effect",e)}constructor(e){Z(this,"repeat","repeat"),Z(this,"offsetX",0),Z(this,"offsetY",0),Z(this,"crossOrigin",""),this.id=yo(),Object.assign(this,e)}isImageSource(){return!!this.source&&typeof this.source.src=="string"}isCanvasSource(){return!!this.source&&!!this.source.toDataURL}sourceToString(){return this.isImageSource()?this.source.src:this.isCanvasSource()?this.source.toDataURL():""}toLive(e){return this.source&&(!this.isImageSource()||this.source.complete&&this.source.naturalWidth!==0&&this.source.naturalHeight!==0)?e.createPattern(this.source,this.repeat):null}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const{repeat:t,crossOrigin:i}=this;return q(q({},Ul(this,e)),{},{type:"pattern",source:this.sourceToString(),repeat:t,crossOrigin:i,offsetX:Bi(this.offsetX,ri.NUM_FRACTION_DIGITS),offsetY:Bi(this.offsetY,ri.NUM_FRACTION_DIGITS),patternTransform:this.patternTransform?[...this.patternTransform]:null})}toSVG(e){let{width:t,height:i}=e;const{source:n,repeat:s,id:o}=this,a=al(this.offsetX/t,0),l=al(this.offsetY/i,0),c=s==="repeat-y"||s==="no-repeat"?1+Math.abs(a||0):al(n.width/t,0),d=s==="repeat-x"||s==="no-repeat"?1+Math.abs(l||0):al(n.height/i,0);return[''),''),"",""].join(` +`)}static fromObject(e,t){return le(this,null,function*(){let{type:i,source:n,patternTransform:s}=e,o=Mi(e,X4);const a=yield fh(n,q(q({},t),{},{crossOrigin:o.crossOrigin}));return new this(q(q({},o),{},{patternTransform:s&&s.slice(0),source:a}))})}}Z(op,"type","Pattern"),pt.setClass(op),pt.setClass(op,"pattern");const W4=["path","left","top"],Y4=["d"];class Ko extends Pr{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{path:i,left:n,top:s}=t,o=Mi(t,W4);super(),Object.assign(this,Ko.ownDefaults),this.setOptions(o),this._setPath(e||[],!0),typeof n=="number"&&this.set(hi,n),typeof s=="number"&&this.set(Jr,s)}_setPath(e,t){this.path=S4(Array.isArray(e)?e:P4(e)),this.setBoundingBox(t)}_findCenterFromElement(){const e=this._calcBoundsFromPath();return new ve(e.left+e.width/2,e.top+e.height/2)}_renderPathCommands(e){const t=-this.pathOffset.x,i=-this.pathOffset.y;e.beginPath();for(const n of this.path)switch(n[0]){case"L":e.lineTo(n[1]+t,n[2]+i);break;case"M":e.moveTo(n[1]+t,n[2]+i);break;case"C":e.bezierCurveTo(n[1]+t,n[2]+i,n[3]+t,n[4]+i,n[5]+t,n[6]+i);break;case"Q":e.quadraticCurveTo(n[1]+t,n[2]+i,n[3]+t,n[4]+i);break;case"Z":e.closePath()}}_render(e){this._renderPathCommands(e),this._renderPaintInOrder(e)}toString(){return"#")}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return q(q({},super.toObject(e)),{},{path:this.path.map(t=>t.slice())})}toDatalessObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const t=this.toObject(e);return this.sourcePath&&(delete t.path,t.sourcePath=this.sourcePath),t}_toSVG(){const e=D4(this.path,ri.NUM_FRACTION_DIGITS);return[" +`)]}_getOffsetTransform(){const e=ri.NUM_FRACTION_DIGITS;return" translate(".concat(Bi(-this.pathOffset.x,e),", ").concat(Bi(-this.pathOffset.y,e),")")}toClipPathSVG(e){const t=this._getOffsetTransform();return" "+this._createBaseClipPathSVGMarkup(this._toSVG(),{reviver:e,additionalTransform:t})}toSVG(e){const t=this._getOffsetTransform();return this._createBaseSVGMarkup(this._toSVG(),{reviver:e,additionalTransform:t})}complexity(){return this.path.length}setDimensions(){this.setBoundingBox()}setBoundingBox(e){const{width:t,height:i,pathOffset:n}=this._calcDimensions();this.set({width:t,height:i,pathOffset:n}),e&&this.setPositionByOrigin(n,Zt,Zt)}_calcBoundsFromPath(){const e=[];let t=0,i=0,n=0,s=0;for(const o of this.path)switch(o[0]){case"L":n=o[1],s=o[2],e.push({x:t,y:i},{x:n,y:s});break;case"M":n=o[1],s=o[2],t=n,i=s;break;case"C":e.push(...Hb(n,s,o[1],o[2],o[3],o[4],o[5],o[6])),n=o[5],s=o[6];break;case"Q":e.push(...Hb(n,s,o[1],o[2],o[1],o[2],o[3],o[4])),n=o[3],s=o[4];break;case"Z":n=t,s=i}return Es(e)}_calcDimensions(){const e=this._calcBoundsFromPath();return q(q({},e),{},{pathOffset:new ve(e.left+e.width/2,e.top+e.height/2)})}static fromObject(e){return this._fromObject(e,{extraParam:"path"})}static fromElement(e,t,i){return le(this,null,function*(){const n=Fs(e,this.ATTRIBUTE_NAMES,i),{d:s}=n;return new this(s,q(q(q({},Mi(n,Y4)),t),{},{left:void 0,top:void 0}))})}}Z(Ko,"type","Path"),Z(Ko,"cacheProperties",[...Rs,"path","fillRule"]),Z(Ko,"ATTRIBUTE_NAMES",[...Co,"d"]),pt.setClass(Ko),pt.setSVGClass(Ko);const q4=["left","top","radius"],hT=["radius","startAngle","endAngle","counterClockwise"];class xs extends Pr{static getDefaults(){return q(q({},super.getDefaults()),xs.ownDefaults)}constructor(e){super(),Object.assign(this,xs.ownDefaults),this.setOptions(e)}_set(e,t){return super._set(e,t),e==="radius"&&this.setRadius(t),this}_render(e){e.beginPath(),e.arc(0,0,this.radius,$i(this.startAngle),$i(this.endAngle),this.counterClockwise),this._renderPaintInOrder(e)}getRadiusX(){return this.get("radius")*this.get(tn)}getRadiusY(){return this.get("radius")*this.get(bn)}setRadius(e){this.radius=e,this.set({width:2*e,height:2*e})}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return super.toObject([...hT,...e])}_toSVG(){const e=(this.endAngle-this.startAngle)%360;if(e===0)return[" +`];{const{radius:t}=this,i=$i(this.startAngle),n=$i(this.endAngle),s=Is(i)*t,o=Ls(i)*t,a=Is(n)*t,l=Ls(n)*t,c=e>180?1:0,d=this.counterClockwise?0:1;return[' +`]}}static fromElement(e,t,i){return le(this,null,function*(){const n=Fs(e,this.ATTRIBUTE_NAMES,i),{left:s=0,top:o=0,radius:a=0}=n;return new this(q(q({},Mi(n,q4)),{},{radius:a,left:s-a,top:o-a}))})}static fromObject(e){return super._fromObject(e)}}Z(xs,"type","Circle"),Z(xs,"cacheProperties",[...Rs,...hT]),Z(xs,"ownDefaults",{radius:0,startAngle:0,endAngle:360,counterClockwise:!1}),Z(xs,"ATTRIBUTE_NAMES",["cx","cy","r",...Co]),pt.setClass(xs),pt.setSVGClass(xs);const Z4=["x1","y1","x2","y2"],K4=["x1","y1","x2","y2"],u0=["x1","x2","y1","y2"];class fo extends Pr{constructor(){let[e,t,i,n]=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[0,0,0,0],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Object.assign(this,fo.ownDefaults),this.setOptions(s),this.x1=e,this.x2=i,this.y1=t,this.y2=n,this._setWidthHeight();const{left:o,top:a}=s;typeof o=="number"&&this.set(hi,o),typeof a=="number"&&this.set(Jr,a)}_setWidthHeight(){const{x1:e,y1:t,x2:i,y2:n}=this;this.width=Math.abs(i-e),this.height=Math.abs(n-t);const{left:s,top:o,width:a,height:l}=Es([{x:e,y:t},{x:i,y:n}]),c=new ve(s+a/2,o+l/2);this.setPositionByOrigin(c,Zt,Zt)}_set(e,t){return super._set(e,t),u0.includes(e)&&this._setWidthHeight(),this}_render(e){e.beginPath();const t=this.calcLinePoints();e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2),e.lineWidth=this.strokeWidth;const i=e.strokeStyle;var n;_n(this.stroke)?e.strokeStyle=this.stroke.toLive(e):e.strokeStyle=(n=this.stroke)!==null&&n!==void 0?n:e.fillStyle,this.stroke&&this._renderStroke(e),e.strokeStyle=i}_findCenterFromElement(){return new ve((this.x1+this.x2)/2,(this.y1+this.y2)/2)}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return q(q({},super.toObject(e)),this.calcLinePoints())}_getNonTransformedDimensions(){const e=super._getNonTransformedDimensions();return this.strokeLineCap==="butt"&&(this.width===0&&(e.y-=this.strokeWidth),this.height===0&&(e.x-=this.strokeWidth)),e}calcLinePoints(){const{x1:e,x2:t,y1:i,y2:n,width:s,height:o}=this,a=e<=t?-1:1,l=i<=n?-1:1;return{x1:a*s/2,x2:a*-s/2,y1:l*o/2,y2:l*-o/2}}_toSVG(){const{x1:e,x2:t,y1:i,y2:n}=this.calcLinePoints();return[" +`)]}static fromElement(e,t,i){return le(this,null,function*(){const n=Fs(e,this.ATTRIBUTE_NAMES,i),{x1:s=0,y1:o=0,x2:a=0,y2:l=0}=n;return new this([s,o,a,l],Mi(n,Z4))})}static fromObject(e){let{x1:t,y1:i,x2:n,y2:s}=e,o=Mi(e,K4);return this._fromObject(q(q({},o),{},{points:[t,i,n,s]}),{extraParam:"points"})}}Z(fo,"type","Line"),Z(fo,"cacheProperties",[...Rs,...u0]),Z(fo,"ATTRIBUTE_NAMES",Co.concat(u0)),pt.setClass(fo),pt.setSVGClass(fo);class $o extends Pr{static getDefaults(){return q(q({},super.getDefaults()),$o.ownDefaults)}constructor(e){super(),Object.assign(this,$o.ownDefaults),this.setOptions(e)}_render(e){const t=this.width/2,i=this.height/2;e.beginPath(),e.moveTo(-t,i),e.lineTo(0,-i),e.lineTo(t,i),e.closePath(),this._renderPaintInOrder(e)}_toSVG(){const e=this.width/2,t=this.height/2;return["']}}Z($o,"type","Triangle"),Z($o,"ownDefaults",{width:100,height:100}),pt.setClass($o),pt.setSVGClass($o);const fT=["rx","ry"];class ws extends Pr{static getDefaults(){return q(q({},super.getDefaults()),ws.ownDefaults)}constructor(e){super(),Object.assign(this,ws.ownDefaults),this.setOptions(e)}_set(e,t){switch(super._set(e,t),e){case"rx":this.rx=t,this.set("width",2*t);break;case"ry":this.ry=t,this.set("height",2*t)}return this}getRx(){return this.get("rx")*this.get(tn)}getRy(){return this.get("ry")*this.get(bn)}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return super.toObject([...fT,...e])}_toSVG(){return[" +`)]}_render(e){e.beginPath(),e.save(),e.transform(1,0,0,this.ry/this.rx,0,0),e.arc(0,0,this.rx,0,Ah,!1),e.restore(),this._renderPaintInOrder(e)}static fromElement(e,t,i){return le(this,null,function*(){const n=Fs(e,this.ATTRIBUTE_NAMES,i);return n.left=(n.left||0)-n.rx,n.top=(n.top||0)-n.ry,new this(n)})}}function J4(r){if(!r)return[];const e=r.replace(/,/g," ").trim().split(/\s+/),t=[];for(let i=0;i0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Z(this,"strokeDiff",void 0),Object.assign(this,On.ownDefaults),this.setOptions(t),this.points=e;const{left:i,top:n}=t;this.initialized=!0,this.setBoundingBox(!0),typeof i=="number"&&this.set(hi,i),typeof n=="number"&&this.set(Jr,n)}isOpen(){return!0}_projectStrokeOnPoints(e){return G5(this.points,e,this.isOpen())}_calcDimensions(e){e=q({scaleX:this.scaleX,scaleY:this.scaleY,skewX:this.skewX,skewY:this.skewY,strokeLineCap:this.strokeLineCap,strokeLineJoin:this.strokeLineJoin,strokeMiterLimit:this.strokeMiterLimit,strokeUniform:this.strokeUniform,strokeWidth:this.strokeWidth},e||{});const t=this.exactBoundingBox?this._projectStrokeOnPoints(e).map(c=>c.projectedPoint):this.points;if(t.length===0)return{left:0,top:0,width:0,height:0,pathOffset:new ve,strokeOffset:new ve,strokeDiff:new ve};const i=Es(t),n=mf(q(q({},e),{},{scaleX:1,scaleY:1})),s=Es(this.points.map(c=>qr(c,n,!0))),o=new ve(this.scaleX,this.scaleY);let a=i.left+i.width/2,l=i.top+i.height/2;return this.exactBoundingBox&&(a-=l*Math.tan($i(this.skewX)),l-=a*Math.tan($i(this.skewY))),q(q({},i),{},{pathOffset:new ve(a,l),strokeOffset:new ve(s.left,s.top).subtract(new ve(i.left,i.top)).multiply(o),strokeDiff:new ve(i.width,i.height).subtract(new ve(s.width,s.height)).multiply(o)})}_findCenterFromElement(){const e=Es(this.points);return new ve(e.left+e.width/2,e.top+e.height/2)}setDimensions(){this.setBoundingBox()}setBoundingBox(e){const{left:t,top:i,width:n,height:s,pathOffset:o,strokeOffset:a,strokeDiff:l}=this._calcDimensions();this.set({width:n,height:s,pathOffset:o,strokeOffset:a,strokeDiff:l}),e&&this.setPositionByOrigin(new ve(t+n/2,i+s/2),Zt,Zt)}isStrokeAccountedForInDimensions(){return this.exactBoundingBox}_getNonTransformedDimensions(){return this.exactBoundingBox?new ve(this.width,this.height):super._getNonTransformedDimensions()}_getTransformedDimensions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.exactBoundingBox){let o;if(Object.keys(e).some(a=>this.strokeUniform||this.constructor.layoutProperties.includes(a))){var t,i;const{width:a,height:l}=this._calcDimensions(e);o=new ve((t=e.width)!==null&&t!==void 0?t:a,(i=e.height)!==null&&i!==void 0?i:l)}else{var n,s;o=new ve((n=e.width)!==null&&n!==void 0?n:this.width,(s=e.height)!==null&&s!==void 0?s:this.height)}return o.multiply(new ve(e.scaleX||this.scaleX,e.scaleY||this.scaleY))}return super._getTransformedDimensions(e)}_set(e,t){const i=this.initialized&&this[e]!==t,n=super._set(e,t);return this.exactBoundingBox&&i&&((e===tn||e===bn)&&this.strokeUniform&&this.constructor.layoutProperties.includes("strokeUniform")||this.constructor.layoutProperties.includes(e))&&this.setDimensions(),n}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return q(q({},super.toObject(e)),{},{points:this.points.map(t=>{let{x:i,y:n}=t;return{x:i,y:n}})})}_toSVG(){const e=[],t=this.pathOffset.x,i=this.pathOffset.y,n=ri.NUM_FRACTION_DIGITS;for(let s=0,o=this.points.length;s +`)]}_render(e){const t=this.points.length,i=this.pathOffset.x,n=this.pathOffset.y;if(t&&!isNaN(this.points[t-1].y)){e.beginPath(),e.moveTo(this.points[0].x-i,this.points[0].y-n);for(let s=0;so!==void 0);this._setStyleDeclaration(i,n,s)}getSelectionStyles(e,t,i){const n=[];for(let s=e;s<(t||e);s++)n.push(this.getStyleAtPosition(s,i));return n}getStyleAtPosition(e,t){const{lineIndex:i,charIndex:n}=this.get2DCursorLocation(e);return t?this.getCompleteStyleDeclaration(i,n):this._getStyleDeclaration(i,n)}setSelectionStyles(e,t,i){for(let n=t;n<(i||t);n++)this._extendStyles(n,e);this._forceClearCache=!0}_getStyleDeclaration(e,t){var i;const n=this.styles&&this.styles[e];return n&&(i=n[t])!==null&&i!==void 0?i:{}}getCompleteStyleDeclaration(e,t){return q(q({},Ul(this,this.constructor._styleProperties)),this._getStyleDeclaration(e,t))}_setStyleDeclaration(e,t,i){this.styles[e][t]=i}_deleteStyleDeclaration(e,t){delete this.styles[e][t]}_getLineStyle(e){return!!this.styles[e]}_setLineStyle(e){this.styles[e]={}}_deleteLineStyle(e){delete this.styles[e]}}Z(yT,"_styleProperties",$4);const tO=/ +/g,iO=/"/g;function ap(r,e,t,i,n){return" ".concat(function(s,o){let{left:a,top:l,width:c,height:d}=o,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ri.NUM_FRACTION_DIGITS;const h=Qc(or,s,!1),[f,m,p,g]=[a,l,c,d].map(v=>Bi(v,u));return"')}(r,{left:e,top:t,width:i,height:n}),` +`)}const rO=["textAnchor","textDecoration","dx","dy","top","left","fontSize","strokeWidth"];let lp;class Br extends yT{static getDefaults(){return q(q({},super.getDefaults()),Br.ownDefaults)}constructor(e,t){super(),Z(this,"__charBounds",[]),Object.assign(this,Br.ownDefaults),this.setOptions(t),this.styles||(this.styles={}),this.text=e,this.initialized=!0,this.path&&this.setPathInfo(),this.initDimensions(),this.setCoords()}setPathInfo(){const e=this.path;e&&(e.segmentsInfo=oT(e.path))}_splitText(){const e=this._splitTextIntoLines(this.text);return this.textLines=e.lines,this._textLines=e.graphemeLines,this._unwrappedTextLines=e._unwrappedLines,this._text=e.graphemeText,e}initDimensions(){this._splitText(),this._clearCache(),this.dirty=!0,this.path?(this.width=this.path.width,this.height=this.path.height):(this.width=this.calcTextWidth()||this.cursorWidth||this.MIN_TEXT_WIDTH,this.height=this.calcTextHeight()),this.textAlign.includes(qn)&&this.enlargeSpaces()}enlargeSpaces(){let e,t,i,n,s,o,a;for(let l=0,c=this._textLines.length;l')}_getCacheCanvasDimensions(){const e=super._getCacheCanvasDimensions(),t=this.fontSize;return e.width+=t*e.zoomX,e.height+=t*e.zoomY,e}_render(e){const t=this.path;t&&!t.isNotVisible()&&t._render(e),this._setTextStyles(e),this._renderTextLinesBackground(e),this._renderTextDecoration(e,"underline"),this._renderText(e),this._renderTextDecoration(e,"overline"),this._renderTextDecoration(e,"linethrough")}_renderText(e){this.paintFirst===$r?(this._renderTextStroke(e),this._renderTextFill(e)):(this._renderTextFill(e),this._renderTextStroke(e))}_setTextStyles(e,t,i){if(e.textBaseline="alphabetic",this.path)switch(this.pathAlign){case Zt:e.textBaseline="middle";break;case"ascender":e.textBaseline=Jr;break;case"descender":e.textBaseline=Kg}e.font=this._getFontDeclaration(t,i)}calcTextWidth(){let e=this.getLineWidth(0);for(let t=1,i=this._textLines.length;te&&(e=n)}return e}_renderTextLine(e,t,i,n,s,o){this._renderChars(e,t,i,n,s,o)}_renderTextLinesBackground(e){if(!this.textBackgroundColor&&!this.styleHas("textBackgroundColor"))return;const t=e.fillStyle,i=this._getLeftOffset();let n=this._getTopOffset();for(let s=0,o=this._textLines.length;s=0:hu?d%=u:d<0&&(d+=u),this._setGraphemeOnPath(d,i),d+=i.kernedWidth}return{width:n,numOfSpaces:0}}_setGraphemeOnPath(e,t){const i=e+t.kernedWidth/2,n=this.path,s=A4(n.path,i,n.segmentsInfo);t.renderLeft=s.x-n.pathOffset.x,t.renderTop=s.y-n.pathOffset.y,t.angle=s.angle+(this.pathSide===Qi?Math.PI:0)}_getGraphemeBox(e,t,i,n,s){const o=this.getCompleteStyleDeclaration(t,i),a=n?this.getCompleteStyleDeclaration(t,i-1):{},l=this._measureChar(e,o,n,a);let c,d=l.kernedWidth,u=l.width;this.charSpacing!==0&&(c=this._getWidthOfCharSpacing(),u+=c,d+=c);const h={width:u,left:0,height:o.fontSize,kernedWidth:d,deltaY:o.deltaY};if(i>0&&!s){const f=this.__charBounds[t][i-1];h.left=f.left+f.width+l.kernedWidth-l.width}return h}getHeightOfLine(e){if(this.__lineHeights[e])return this.__lineHeights[e];let t=this.getHeightOfChar(e,0);for(let i=1,n=this._textLines[e].length;i0){let Y=n+f+g;this.direction==="rtl"&&(Y=this.width-Y-v),b&&S&&(e.fillStyle=S,e.fillRect(Y,_+a*x+I,v,this.fontSize/15)),g=w.left,v=w.width,b=m,S=p,x=X,I=H}else v+=w.kernedWidth}let T=n+f+g;this.direction==="rtl"&&(T=this.width-T-v),e.fillStyle=p,m&&p&&e.fillRect(T,_+a*x+I,v-o,this.fontSize/15),i+=d}this._removeShadow(e)}_getFontDeclaration(){let{fontFamily:e=this.fontFamily,fontStyle:t=this.fontStyle,fontWeight:i=this.fontWeight,fontSize:n=this.fontSize}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;const o=e.includes("'")||e.includes('"')||e.includes(",")||Br.genericFonts.includes(e.toLowerCase())?e:'"'.concat(e,'"');return[t,i,"".concat(s?this.CACHE_FONT_SIZE:n,"px"),o].join(" ")}render(e){this.visible&&(this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(this._forceClearCache&&this.initDimensions(),super.render(e)))}graphemeSplit(e){return _v(e)}_splitTextIntoLines(e){const t=e.split(this._reNewline),i=new Array(t.length),n=[` +`];let s=[];for(let o=0;o0&&arguments[0]!==void 0?arguments[0]:[];return q(q({},super.toObject([..._T,...e])),{},{styles:H5(this.styles,this.text)},this.path?{path:this.path.toObject()}:{})}set(e,t){const{textLayoutProperties:i}=this.constructor;super.set(e,t);let n=!1,s=!1;if(typeof e=="object")for(const o in e)o==="path"&&this.setPathInfo(),n=n||i.includes(o),s=s||o==="path";else n=i.includes(e),s=e==="path";return s&&this.setPathInfo(),n&&this.initialized&&(this.initDimensions(),this.setCoords()),this}complexity(){return 1}static fromElement(e,t,i){return le(this,null,function*(){const n=Fs(e,Br.ATTRIBUTE_NAMES,i),s=q(q({},t),n),{textAnchor:o=hi,textDecoration:a="",dx:l=0,dy:c=0,top:d=0,left:u=0,fontSize:h=rv,strokeWidth:f=1}=s,m=Mi(s,rO),p=new this((e.textContent||"").replace(/^\s+|\s+$|\n+/g,"").replace(/\s+/g," "),q({left:u+l,top:d+c,underline:a.includes("underline"),overline:a.includes("overline"),linethrough:a.includes("line-through"),strokeWidth:0,fontSize:h},m)),g=p.getScaledHeight()/p.height,v=((p.height+p.strokeWidth)*p.lineHeight-p.height)*g,b=p.getScaledHeight()+v;let S=0;return o===Zt&&(S=p.getScaledWidth()/2),o===Qi&&(S=p.getScaledWidth()),p.set({left:p.left-S,top:p.top-(b-p.fontSize*(.07+p._fontSizeFraction))/p.lineHeight,strokeWidth:f}),p})}static fromObject(e){return this._fromObject(q(q({},e),{},{styles:X5(e.styles||{},e.text)}),{extraParam:"text"})}}Z(Br,"textLayoutProperties",vT),Z(Br,"cacheProperties",[...Rs,..._T]),Z(Br,"ownDefaults",eO),Z(Br,"type","Text"),Z(Br,"genericFonts",["sans-serif","serif","cursive","fantasy","monospace"]),Z(Br,"ATTRIBUTE_NAMES",Co.concat("x","y","dx","dy","font-family","font-style","font-weight","font-size","letter-spacing","text-decoration","text-anchor")),JS(Br,[class extends PS{_toSVG(){const r=this._getSVGLeftTopOffsets(),e=this._getSVGTextAndBg(r.textTop,r.textLeft);return this._wrapSVGTextAndBg(e)}toSVG(r){return this._createBaseSVGMarkup(this._toSVG(),{reviver:r,noStyle:!0,withShadow:!0})}_getSVGLeftTopOffsets(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}}_wrapSVGTextAndBg(r){let{textBgRects:e,textSpans:t}=r;const i=this.getSvgTextDecoration(this);return[e.join(""),' ",t.join(""),` +`]}_getSVGTextAndBg(r,e){const t=[],i=[];let n,s=r;this.backgroundColor&&i.push(...ap(this.backgroundColor,-this.width/2,-this.height/2,this.width,this.height));for(let o=0,a=this._textLines.length;o").concat(V5(r),"")}_setSVGTextLineText(r,e,t,i){const n=this.getHeightOfLine(e),s=this.textAlign.includes(qn),o=this._textLines[e];let a,l,c,d,u,h="",f=0;i+=n*(1-this._fontSizeFraction)/this.lineHeight;for(let m=0,p=o.length-1;m<=p;m++)u=m===p||this.charSpacing,h+=o[m],c=this.__charBounds[e][m],f===0?(t+=c.kernedWidth-c.width,f+=c.width):f+=c.kernedWidth,s&&!u&&this._reSpaceAndTab.test(o[m])&&(u=!0),u||(a=a||this.getCompleteStyleDeclaration(e,m),l=this.getCompleteStyleDeclaration(e,m+1),u=yv(a,l,!0)),u&&(d=this._getStyleDeclaration(e,m),r.push(this._createTextCharSpan(h,d,t,i)),h="",a=l,this.direction==="rtl"?t-=f:t+=f,f=0)}_setSVGTextLineBg(r,e,t,i){const n=this._textLines[e],s=this.getHeightOfLine(e)/this.lineHeight;let o,a=0,l=0,c=this.getValueOfPropertyAt(e,0,"textBackgroundColor");for(let d=0;dr[e.replace("-","")]).join(" ")}}]),pt.setClass(Br),pt.setSVGClass(Br);class nO{constructor(e){Z(this,"target",void 0),Z(this,"__mouseDownInPlace",!1),Z(this,"__dragStartFired",!1),Z(this,"__isDraggingOver",!1),Z(this,"__dragStartSelection",void 0),Z(this,"__dragImageDisposer",void 0),Z(this,"_dispose",void 0),this.target=e;const t=[this.target.on("dragenter",this.dragEnterHandler.bind(this)),this.target.on("dragover",this.dragOverHandler.bind(this)),this.target.on("dragleave",this.dragLeaveHandler.bind(this)),this.target.on("dragend",this.dragEndHandler.bind(this)),this.target.on("drop",this.dropHandler.bind(this))];this._dispose=()=>{t.forEach(i=>i()),this._dispose=void 0}}isPointerOverSelection(e){const t=this.target,i=t.getSelectionStartFromPointer(e);return t.isEditing&&i>=t.selectionStart&&i<=t.selectionEnd&&t.selectionStart{_.remove()},Dn(e.target||this.target.hiddenTextarea).body.appendChild(_),(i=e.dataTransfer)===null||i===void 0||i.setDragImage(_,g.x,g.y)}onDragStart(e){this.__dragStartFired=!0;const t=this.target,i=this.isActive();if(i&&e.dataTransfer){const n=this.__dragStartSelection={selectionStart:t.selectionStart,selectionEnd:t.selectionEnd},s=t._text.slice(n.selectionStart,n.selectionEnd).join(""),o=q({text:t.text,value:s},n);e.dataTransfer.setData("text/plain",s),e.dataTransfer.setData("application/fabric",JSON.stringify({value:s,styles:t.getSelectionStyles(n.selectionStart,n.selectionEnd,!0)})),e.dataTransfer.effectAllowed="copyMove",this.setDragImage(e,o)}return t.abortCursorAnimation(),i}canDrop(e){if(this.target.editable&&!this.target.getActiveControl()&&!e.defaultPrevented){if(this.isActive()&&this.__dragStartSelection){const t=this.target.getSelectionStartFromPointer(e),i=this.__dragStartSelection;return ti.selectionEnd}return!0}return!1}targetCanDrop(e){return this.target.canDrop(e)}dragEnterHandler(e){let{e:t}=e;const i=this.targetCanDrop(t);!this.__isDraggingOver&&i&&(this.__isDraggingOver=!0)}dragOverHandler(e){const{e:t}=e,i=this.targetCanDrop(t);!this.__isDraggingOver&&i?this.__isDraggingOver=!0:this.__isDraggingOver&&!i&&(this.__isDraggingOver=!1),this.__isDraggingOver&&(t.preventDefault(),e.canDrop=!0,e.dropTarget=this.target)}dragLeaveHandler(){(this.__isDraggingOver||this.isActive())&&(this.__isDraggingOver=!1)}dropHandler(e){var t;const{e:i}=e,n=i.defaultPrevented;this.__isDraggingOver=!1,i.preventDefault();let s=(t=i.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain");if(s&&!n){const o=this.target,a=o.canvas;let l=o.getSelectionStartFromPointer(i);const{styles:c}=i.dataTransfer.types.includes("application/fabric")?JSON.parse(i.dataTransfer.getData("application/fabric")):{},d=s[Math.max(0,s.length-1)],u=0;if(this.__dragStartSelection){const h=this.__dragStartSelection.selectionStart,f=this.__dragStartSelection.selectionEnd;l>h&&l<=f?l=h:l>f&&(l-=f-h),o.removeChars(h,f),delete this.__dragStartSelection}o._reNewline.test(d)&&(o._reNewline.test(o._text[l])||l===o._text.length)&&(s=s.trimEnd()),e.didDrop=!0,e.dropTarget=o,o.insertChars(s,c,l),a.setActiveObject(o),o.enterEditing(i),o.selectionStart=Math.min(l+u,o._text.length),o.selectionEnd=Math.min(o.selectionStart+s.length,o._text.length),o.hiddenTextarea.value=o.text,o._updateTextarea(),o.hiddenTextarea.focus(),o.fire(Oh,{index:l+u,action:"drop"}),a.fire("text:changed",{target:o}),a.contextTopDirty=!0,a.requestRenderAll()}}dragEndHandler(e){let{e:t}=e;if(this.isActive()&&this.__dragStartFired&&this.__dragStartSelection){var i;const n=this.target,s=this.target.canvas,{selectionStart:o,selectionEnd:a}=this.__dragStartSelection,l=((i=t.dataTransfer)===null||i===void 0?void 0:i.dropEffect)||Qr;l===Qr?(n.selectionStart=o,n.selectionEnd=a,n._updateTextarea(),n.hiddenTextarea.focus()):(n.clearContextTop(),l==="move"&&(n.removeChars(o,a),n.selectionStart=n.selectionEnd=o,n.hiddenTextarea&&(n.hiddenTextarea.value=n.text),n._updateTextarea(),n.fire(Oh,{index:o,action:"dragend"}),s.fire("text:changed",{target:n}),s.requestRenderAll()),n.exitEditing())}this.__dragImageDisposer&&this.__dragImageDisposer(),delete this.__dragImageDisposer,delete this.__dragStartSelection,this.__isDraggingOver=!1}dispose(){this._dispose&&this._dispose()}}const Yb=/[ \n\.,;!\?\-]/;class sO extends Br{constructor(){super(...arguments),Z(this,"_currentCursorOpacity",1)}initBehavior(){this._tick=this._tick.bind(this),this._onTickComplete=this._onTickComplete.bind(this),this.updateSelectionOnMouseMove=this.updateSelectionOnMouseMove.bind(this)}onDeselect(e){return this.isEditing&&this.exitEditing(),this.selected=!1,super.onDeselect(e)}_animateCursor(e){let{toValue:t,duration:i,delay:n,onComplete:s}=e;return FS({startValue:this._currentCursorOpacity,endValue:t,duration:i,delay:n,onComplete:s,abort:()=>!this.canvas||this.selectionStart!==this.selectionEnd,onChange:o=>{this._currentCursorOpacity=o,this.renderCursorOrSelection()}})}_tick(e){this._currentTickState=this._animateCursor({toValue:0,duration:this.cursorDuration/2,delay:Math.max(e||0,100),onComplete:this._onTickComplete})}_onTickComplete(){var e;(e=this._currentTickCompleteState)===null||e===void 0||e.abort(),this._currentTickCompleteState=this._animateCursor({toValue:1,duration:this.cursorDuration,onComplete:this._tick})}initDelayedCursor(e){this.abortCursorAnimation(),this._tick(e?0:this.cursorDelay)}abortCursorAnimation(){let e=!1;[this._currentTickState,this._currentTickCompleteState].forEach(t=>{t&&!t.isDone()&&(e=!0,t.abort())}),this._currentCursorOpacity=1,e&&this.clearContextTop()}restartCursorIfNeeded(){[this._currentTickState,this._currentTickCompleteState].some(e=>!e||e.isDone())&&this.initDelayedCursor()}selectAll(){return this.selectionStart=0,this.selectionEnd=this._text.length,this._fireSelectionChanged(),this._updateTextarea(),this}getSelectedText(){return this._text.slice(this.selectionStart,this.selectionEnd).join("")}findWordBoundaryLeft(e){let t=0,i=e-1;if(this._reSpace.test(this._text[i]))for(;this._reSpace.test(this._text[i]);)t++,i--;for(;/\S/.test(this._text[i])&&i>-1;)t++,i--;return e-t}findWordBoundaryRight(e){let t=0,i=e;if(this._reSpace.test(this._text[i]))for(;this._reSpace.test(this._text[i]);)t++,i++;for(;/\S/.test(this._text[i])&&i-1;)t++,i--;return e-t}findLineBoundaryRight(e){let t=0,i=e;for(;!/\n/.test(this._text[i])&&i0&&this._reSpace.test(i[e])&&(t===-1||!nv.test(i[e-1]))?e-1:e,s=i[n];for(;n>0&&nthis.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=i):(this.selectionStart=i,this.selectionEnd=this.__selectionStartOnMouseDown),this.selectionStart===n&&this.selectionEnd===s||(this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}_setEditingProps(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0}fromStringToGraphemeSelection(e,t,i){const n=i.slice(0,e),s=this.graphemeSplit(n).length;if(e===t)return{selectionStart:s,selectionEnd:s};const o=i.slice(e,t);return{selectionStart:s,selectionEnd:s+this.graphemeSplit(o).length}}fromGraphemeToStringSelection(e,t,i){const n=i.slice(0,e).join("").length;return e===t?{selectionStart:n,selectionEnd:n}:{selectionStart:n,selectionEnd:n+i.slice(e,t).join("").length}}_updateTextarea(){if(this.cursorOffsetCache={},this.hiddenTextarea){if(!this.inCompositionMode){const e=this.fromGraphemeToStringSelection(this.selectionStart,this.selectionEnd,this._text);this.hiddenTextarea.selectionStart=e.selectionStart,this.hiddenTextarea.selectionEnd=e.selectionEnd}this.updateTextareaPosition()}}updateFromTextArea(){if(!this.hiddenTextarea)return;this.cursorOffsetCache={};const e=this.hiddenTextarea;this.text=e.value,this.set("dirty",!0),this.initDimensions(),this.setCoords();const t=this.fromStringToGraphemeSelection(e.selectionStart,e.selectionEnd,e.value);this.selectionEnd=this.selectionStart=t.selectionEnd,this.inCompositionMode||(this.selectionStart=t.selectionStart),this.updateTextareaPosition()}updateTextareaPosition(){if(this.selectionStart===this.selectionEnd){const e=this._calcTextareaPosition();this.hiddenTextarea.style.left=e.left,this.hiddenTextarea.style.top=e.top}}_calcTextareaPosition(){if(!this.canvas)return{left:"1px",top:"1px"};const e=this.inCompositionMode?this.compositionStart:this.selectionStart,t=this._getCursorBoundaries(e),i=this.get2DCursorLocation(e),n=i.lineIndex,s=i.charIndex,o=this.getValueOfPropertyAt(n,s,"fontSize")*this.lineHeight,a=t.leftOffset,l=this.getCanvasRetinaScaling(),c=this.canvas.upperCanvasEl,d=c.width/l,u=c.height/l,h=d-o,f=u-o,m=new ve(t.left+a,t.top+t.topOffset+o).transform(this.calcTransformMatrix()).transform(this.canvas.viewportTransform).multiply(new ve(c.clientWidth/d,c.clientHeight/u));return m.x<0&&(m.x=0),m.x>h&&(m.x=h),m.y<0&&(m.y=0),m.y>f&&(m.y=f),m.x+=this.canvas._offset.left,m.y+=this.canvas._offset.top,{left:"".concat(m.x,"px"),top:"".concat(m.y,"px"),fontSize:"".concat(o,"px"),charHeight:o}}_saveEditingProps(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,selectable:this.selectable,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}}_restoreEditingProps(){this._savedProps&&(this.hoverCursor=this._savedProps.hoverCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.selectable=this._savedProps.selectable,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor||this.canvas.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor||this.canvas.moveCursor),delete this._savedProps)}_exitEditing(){const e=this.hiddenTextarea;this.selected=!1,this.isEditing=!1,e&&(e.blur&&e.blur(),e.parentNode&&e.parentNode.removeChild(e)),this.hiddenTextarea=null,this.abortCursorAnimation(),this.selectionStart!==this.selectionEnd&&this.clearContextTop()}exitEditing(){const e=this._textBeforeEdit!==this.text;return this._exitEditing(),this.selectionEnd=this.selectionStart,this._restoreEditingProps(),this._forceClearCache&&(this.initDimensions(),this.setCoords()),this.fire("editing:exited"),e&&this.fire(Ih),this.canvas&&(this.canvas.fire("text:editing:exited",{target:this}),e&&this.canvas.fire("object:modified",{target:this})),this}_removeExtraneousStyles(){for(const e in this.styles)this._textLines[e]||delete this.styles[e]}removeStyleFromTo(e,t){const{lineIndex:i,charIndex:n}=this.get2DCursorLocation(e,!0),{lineIndex:s,charIndex:o}=this.get2DCursorLocation(t,!0);if(i!==s){if(this.styles[i])for(let a=n;a=o&&(a[d-l]=a[c],delete a[c])}}}shiftLineStyles(e,t){const i=Object.assign({},this.styles);for(const n in this.styles){const s=parseInt(n,10);s>e&&(this.styles[s+t]=i[s],i[s-t]||delete this.styles[s])}}insertNewlineStyleObject(e,t,i,n){const s={},o=this._unwrappedTextLines[e].length,a=o===t;let l=!1;i||(i=1),this.shiftLineStyles(e,i);const c=this.styles[e]?this.styles[e][t===0?t:t-1]:void 0;for(const u in this.styles[e]){const h=parseInt(u,10);h>=t&&(l=!0,s[h-t]=this.styles[e][u],a&&t===0||delete this.styles[e][u])}let d=!1;for(l&&!a&&(this.styles[e+i]=s,d=!0),(d||o>t)&&i--;i>0;)n&&n[i-1]?this.styles[e+i]={0:q({},n[i-1])}:c?this.styles[e+i]={0:q({},c)}:delete this.styles[e+i],i--;this._forceClearCache=!0}insertCharStyleObject(e,t,i,n){this.styles||(this.styles={});const s=this.styles[e],o=s?q({},s):{};i||(i=1);for(const l in o){const c=parseInt(l,10);c>=t&&(s[c+i]=o[c],o[c-i]||delete s[c])}if(this._forceClearCache=!0,n){for(;i--;)Object.keys(n[i]).length&&(this.styles[e]||(this.styles[e]={}),this.styles[e][t+i]=q({},n[i]));return}if(!s)return;const a=s[t?t-1:1];for(;a&&i--;)this.styles[e][t+i]=q({},a)}insertNewStyleBlock(e,t,i){const n=this.get2DCursorLocation(t,!0),s=[0];let o,a=0;for(let l=0;l0&&(this.insertCharStyleObject(n.lineIndex,n.charIndex,s[0],i),i=i&&i.slice(s[0]+1)),a&&this.insertNewlineStyleObject(n.lineIndex,n.charIndex+s[0],a),o=1;o0?this.insertCharStyleObject(n.lineIndex+o,0,s[o],i):i&&this.styles[n.lineIndex+o]&&i[0]&&(this.styles[n.lineIndex+o][0]=i[0]),i=i&&i.slice(s[o]+1);s[o]>0&&this.insertCharStyleObject(n.lineIndex+o,0,s[o],i)}removeChars(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e+1;this.removeStyleFromTo(e,t),this._text.splice(e,t-e),this.text=this._text.join(""),this.set("dirty",!0),this.initDimensions(),this.setCoords(),this._removeExtraneousStyles()}insertChars(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:i;n>i&&this.removeStyleFromTo(i,n);const s=this.graphemeSplit(e);this.insertNewStyleBlock(s,i,t),this._text=[...this._text.slice(0,i),...s,...this._text.slice(n)],this.text=this._text.join(""),this.set("dirty",!0),this.initDimensions(),this.setCoords(),this._removeExtraneousStyles()}setSelectionStartEndWithShift(e,t,i){i<=e?(t===e?this._selectionDirection=hi:this._selectionDirection===Qi&&(this._selectionDirection=hi,this.selectionEnd=e),this.selectionStart=i):i>e&&i{let[a,l]=o;return t.setAttribute(a,l)});const{top:i,left:n,fontSize:s}=this._calcTextareaPosition();t.style.cssText="position: absolute; top: ".concat(i,"; left: ").concat(n,"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding-top: ").concat(s,";"),(this.hiddenTextareaContainer||e.body).appendChild(t),Object.entries({blur:"blur",keydown:"onKeyDown",keyup:"onKeyUp",input:"onInput",copy:"copy",cut:"copy",paste:"paste",compositionstart:"onCompositionStart",compositionupdate:"onCompositionUpdate",compositionend:"onCompositionEnd"}).map(o=>{let[a,l]=o;return t.addEventListener(a,this[l].bind(this))}),this.hiddenTextarea=t}blur(){this.abortCursorAnimation()}onKeyDown(e){if(!this.isEditing)return;const t=this.direction==="rtl"?this.keysMapRtl:this.keysMap;if(e.keyCode in t)this[t[e.keyCode]](e);else{if(!(e.keyCode in this.ctrlKeysMapDown)||!e.ctrlKey&&!e.metaKey)return;this[this.ctrlKeysMapDown[e.keyCode]](e)}e.stopImmediatePropagation(),e.preventDefault(),e.keyCode>=33&&e.keyCode<=40?(this.inCompositionMode=!1,this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}onKeyUp(e){!this.isEditing||this._copyDone||this.inCompositionMode?this._copyDone=!1:e.keyCode in this.ctrlKeysMapUp&&(e.ctrlKey||e.metaKey)&&(this[this.ctrlKeysMapUp[e.keyCode]](e),e.stopImmediatePropagation(),e.preventDefault(),this.canvas&&this.canvas.requestRenderAll())}onInput(e){const t=this.fromPaste;if(this.fromPaste=!1,e&&e.stopPropagation(),!this.isEditing)return;const i=()=>{this.updateFromTextArea(),this.fire(Oh),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll())};if(this.hiddenTextarea.value==="")return this.styles={},void i();const n=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,s=this._text.length,o=n.length,a=this.selectionStart,l=this.selectionEnd,c=a!==l;let d,u,h,f,m=o-s;const p=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),g=a>p.selectionStart;c?(u=this._text.slice(a,l),m+=l-a):od[0])),c?(h=a,f=l):g?(h=l-u.length,f=l):(h=l,f=l+u.length),this.removeStyleFromTo(h,f)),v.length){const{copyPasteData:b}=rs();t&&v.join("")===b.copiedText&&!ri.disableStyleCopyPaste&&(d=b.copiedTextStyle),this.insertNewStyleBlock(v,a,d)}i()}onCompositionStart(){this.inCompositionMode=!0}onCompositionEnd(){this.inCompositionMode=!1}onCompositionUpdate(e){let{target:t}=e;const{selectionStart:i,selectionEnd:n}=t;this.compositionStart=i,this.compositionEnd=n,this.updateTextareaPosition()}copy(){if(this.selectionStart===this.selectionEnd)return;const{copyPasteData:e}=rs();e.copiedText=this.getSelectedText(),ri.disableStyleCopyPaste?e.copiedTextStyle=void 0:e.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0}paste(){this.fromPaste=!0}_getWidthBeforeCursor(e,t){let i,n=this._getLineLeftOffset(e);return t>0&&(i=this.__charBounds[e][t-1],n+=i.left+i.width),n}getDownCursorOffset(e,t){const i=this._getSelectionForOffset(e,t),n=this.get2DCursorLocation(i),s=n.lineIndex;if(s===this._textLines.length-1||e.metaKey||e.keyCode===34)return this._text.length-i;const o=n.charIndex,a=this._getWidthBeforeCursor(s,o),l=this._getIndexOnLine(s+1,a);return this._textLines[s].slice(o).length+l+1+this.missingNewlineOffset(s)}_getSelectionForOffset(e,t){return e.shiftKey&&this.selectionStart!==this.selectionEnd&&t?this.selectionEnd:this.selectionStart}getUpCursorOffset(e,t){const i=this._getSelectionForOffset(e,t),n=this.get2DCursorLocation(i),s=n.lineIndex;if(s===0||e.metaKey||e.keyCode===33)return-i;const o=n.charIndex,a=this._getWidthBeforeCursor(s,o),l=this._getIndexOnLine(s-1,a),c=this._textLines[s].slice(0,o),d=this.missingNewlineOffset(s-1);return-this._textLines[s-1].length+l-c.length+(1-d)}_getIndexOnLine(e,t){const i=this._textLines[e];let n,s,o=this._getLineLeftOffset(e),a=0;for(let l=0,c=i.length;lt){s=!0;const d=o-n,u=o,h=Math.abs(d-t);a=Math.abs(u-t)=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",e)}moveCursorUp(e){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorUpOrDown("Up",e)}_moveCursorUpOrDown(e,t){const i=this["get".concat(e,"CursorOffset")](t,this._selectionDirection===Qi);if(t.shiftKey?this.moveCursorWithShift(i):this.moveCursorWithoutShift(i),i!==0){const n=this.text.length;this.selectionStart=Tl(0,this.selectionStart,n),this.selectionEnd=Tl(0,this.selectionEnd,n),this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea()}}moveCursorWithShift(e){const t=this._selectionDirection===hi?this.selectionStart+e:this.selectionEnd+e;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,t),e!==0}moveCursorWithoutShift(e){return e<0?(this.selectionStart+=e,this.selectionEnd=this.selectionStart):(this.selectionEnd+=e,this.selectionStart=this.selectionEnd),e!==0}moveCursorLeft(e){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorLeftOrRight("Left",e)}_move(e,t,i){let n;if(e.altKey)n=this["findWordBoundary".concat(i)](this[t]);else{if(!e.metaKey&&e.keyCode!==35&&e.keyCode!==36)return this[t]+=i==="Left"?-1:1,!0;n=this["findLineBoundary".concat(i)](this[t])}return n!==void 0&&this[t]!==n&&(this[t]=n,!0)}_moveLeft(e,t){return this._move(e,t,"Left")}_moveRight(e,t){return this._move(e,t,"Right")}moveCursorLeftWithoutShift(e){let t=!0;return this._selectionDirection=hi,this.selectionEnd===this.selectionStart&&this.selectionStart!==0&&(t=this._moveLeft(e,"selectionStart")),this.selectionEnd=this.selectionStart,t}moveCursorLeftWithShift(e){return this._selectionDirection===Qi&&this.selectionStart!==this.selectionEnd?this._moveLeft(e,"selectionEnd"):this.selectionStart!==0?(this._selectionDirection=hi,this._moveLeft(e,"selectionStart")):void 0}moveCursorRight(e){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",e)}_moveCursorLeftOrRight(e,t){const i="moveCursor".concat(e).concat(t.shiftKey?"WithShift":"WithoutShift");this._currentCursorOpacity=1,this[i](t)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())}moveCursorRightWithShift(e){return this._selectionDirection===hi&&this.selectionStart!==this.selectionEnd?this._moveRight(e,"selectionStart"):this.selectionEnd!==this._text.length?(this._selectionDirection=Qi,this._moveRight(e,"selectionEnd")):void 0}moveCursorRightWithoutShift(e){let t=!0;return this._selectionDirection=Qi,this.selectionStart===this.selectionEnd?(t=this._moveRight(e,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,t}}const cp=r=>!!r.button;class aO extends oO{constructor(){super(...arguments),Z(this,"draggableTextDelegate",void 0)}initBehavior(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore),this.on("mouseup",this.mouseUpHandler),this.on("mousedblclick",this.doubleClickHandler),this.on("tripleclick",this.tripleClickHandler),this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown),this.draggableTextDelegate=new nO(this),super.initBehavior()}shouldStartDragging(){return this.draggableTextDelegate.isActive()}onDragStart(e){return this.draggableTextDelegate.onDragStart(e)}canDrop(e){return this.draggableTextDelegate.canDrop(e)}onMouseDown(e){if(!this.canvas)return;this.__newClickTime=+new Date;const t=e.pointer;this.isTripleClick(t)&&(this.fire("tripleclick",e),$g(e.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=t,this.__lastSelected=this.selected&&!this.getActiveControl()}isTripleClick(e){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===e.x&&this.__lastPointer.y===e.y}doubleClickHandler(e){this.isEditing&&this.selectWord(this.getSelectionStartFromPointer(e.e))}tripleClickHandler(e){this.isEditing&&this.selectLine(this.getSelectionStartFromPointer(e.e))}_mouseDownHandler(e){let{e:t}=e;this.canvas&&this.editable&&!cp(t)&&!this.getActiveControl()&&(this.draggableTextDelegate.start(t)||(this.canvas.textEditingManager.register(this),this.selected&&(this.inCompositionMode=!1,this.setCursorByClick(t)),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection())))}_mouseDownHandlerBefore(e){let{e:t}=e;this.canvas&&this.editable&&!cp(t)&&(this.selected=this===this.canvas._activeObject)}mouseUpHandler(e){let{e:t,transform:i}=e;const n=this.draggableTextDelegate.end(t);if(this.canvas){this.canvas.textEditingManager.unregister(this);const s=this.canvas._activeObject;if(s&&s!==this)return}!this.editable||this.group&&!this.group.interactive||i&&i.actionPerformed||cp(t)||n||(this.__lastSelected&&!this.getActiveControl()?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(t),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0)}setCursorByClick(e){const t=this.getSelectionStartFromPointer(e),i=this.selectionStart,n=this.selectionEnd;e.shiftKey?this.setSelectionStartEndWithShift(i,n,t):(this.selectionStart=t,this.selectionEnd=t),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())}getSelectionStartFromPointer(e){const t=this.canvas.getScenePoint(e).transform(Rn(this.calcTransformMatrix())).add(new ve(-this._getLeftOffset(),-this._getTopOffset()));let i=0,n=0,s=0;for(let c=0;c0&&(n+=this._textLines[c-1].length+this.missingNewlineOffset(c-1));let o=Math.abs(this._getLineLeftOffset(s));const a=this._textLines[s].length,l=this.__charBounds[s];for(let c=0;c0&&arguments[0]!==void 0?arguments[0]:this.selectionStart||0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selectionEnd,i=arguments.length>2?arguments[2]:void 0;return super.getSelectionStyles(e,t,i)}setSelectionStyles(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selectionStart||0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.selectionEnd;return super.setSelectionStyles(e,t,i)}get2DCursorLocation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.selectionStart,t=arguments.length>1?arguments[1]:void 0;return super.get2DCursorLocation(e,t)}render(e){super.render(e),this.cursorOffsetCache={},this.renderCursorOrSelection()}toCanvasElement(e){const t=this.isEditing;this.isEditing=!1;const i=super.toCanvasElement(e);return this.isEditing=t,i}renderCursorOrSelection(){if(!this.isEditing)return;const e=this.clearContextTop(!0);if(!e)return;const t=this._getCursorBoundaries();this.selectionStart===this.selectionEnd?this.renderCursor(e,t):this.renderSelection(e,t),this.canvas.contextTopDirty=!0,e.restore()}_getCursorBoundaries(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.selectionStart,t=arguments.length>1?arguments[1]:void 0;const i=this._getLeftOffset(),n=this._getTopOffset(),s=this._getCursorBoundariesOffsets(e,t);return{left:i,top:n,leftOffset:s.left,topOffset:s.top}}_getCursorBoundariesOffsets(e,t){return t?this.__getCursorBoundariesOffsets(e):this.cursorOffsetCache&&"top"in this.cursorOffsetCache?this.cursorOffsetCache:this.cursorOffsetCache=this.__getCursorBoundariesOffsets(e)}__getCursorBoundariesOffsets(e){let t=0,i=0;const{charIndex:n,lineIndex:s}=this.get2DCursorLocation(e);for(let c=0;c0?i:0)};return this.direction==="rtl"&&(this.textAlign===Qi||this.textAlign===qn||this.textAlign===Gc?l.left*=-1:this.textAlign===hi||this.textAlign===Bh?l.left=o-(i>0?i:0):this.textAlign!==Zt&&this.textAlign!==Vc||(l.left=o-(i>0?i:0))),l}renderCursorAt(e){const t=this._getCursorBoundaries(e,!0);this._renderCursor(this.canvas.contextTop,t,e)}renderCursor(e,t){this._renderCursor(e,t,this.selectionStart)}_renderCursor(e,t,i){const n=this.get2DCursorLocation(i),s=n.lineIndex,o=n.charIndex>0?n.charIndex-1:0,a=this.getValueOfPropertyAt(s,o,"fontSize"),l=this.getObjectScaling().x*this.canvas.getZoom(),c=this.cursorWidth/l,d=this.getValueOfPropertyAt(s,o,"deltaY"),u=t.topOffset+(1-this._fontSizeFraction)*this.getHeightOfLine(s)/this.lineHeight-a*(1-this._fontSizeFraction);this.inCompositionMode&&this.renderSelection(e,t),e.fillStyle=this.cursorColor||this.getValueOfPropertyAt(s,o,or),e.globalAlpha=this._currentCursorOpacity,e.fillRect(t.left+t.leftOffset-c/2,u+t.top+d,c,a)}renderSelection(e,t){const i={selectionStart:this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,selectionEnd:this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd};this._renderSelection(e,i,t)}renderDragSourceEffect(){const e=this.draggableTextDelegate.getDragStartSelection();this._renderSelection(this.canvas.contextTop,e,this._getCursorBoundaries(e.selectionStart,!0))}renderDropTargetEffect(e){const t=this.getSelectionStartFromPointer(e);this.renderCursorAt(t)}_renderSelection(e,t,i){const n=t.selectionStart,s=t.selectionEnd,o=this.textAlign.includes(qn),a=this.get2DCursorLocation(n),l=this.get2DCursorLocation(s),c=a.lineIndex,d=l.lineIndex,u=a.charIndex<0?0:a.charIndex,h=l.charIndex<0?0:l.charIndex;for(let f=c;f<=d;f++){const m=this._getLineLeftOffset(f)||0;let p=this.getHeightOfLine(f),g=0,v=0,b=0;if(f===c&&(v=this.__charBounds[c][u].left),f>=c&&f1)&&(p/=this.lineHeight);let S=i.left+m+v,_=p,x=0;const I=b-v;this.inCompositionMode?(e.fillStyle=this.compositionColor||"black",_=1,x=p):e.fillStyle=this.selectionColor,this.direction==="rtl"&&(this.textAlign===Qi||this.textAlign===qn||this.textAlign===Gc?S=this.width-S-I:this.textAlign===hi||this.textAlign===Bh?S=i.left+m-b:this.textAlign!==Zt&&this.textAlign!==Vc||(S=i.left+m-b)),e.fillRect(S,i.top+i.topOffset+x,I,_),i.topOffset+=g}}getCurrentCharFontSize(){const e=this._getCurrentCharIndex();return this.getValueOfPropertyAt(e.l,e.c,"fontSize")}getCurrentCharColor(){const e=this._getCurrentCharIndex();return this.getValueOfPropertyAt(e.l,e.c,or)}_getCurrentCharIndex(){const e=this.get2DCursorLocation(this.selectionStart,!0),t=e.charIndex>0?e.charIndex-1:0;return{l:e.lineIndex,c:t}}dispose(){this._exitEditing(),this.draggableTextDelegate.dispose(),super.dispose()}}Z(Cs,"ownDefaults",lO),Z(Cs,"type","IText"),pt.setClass(Cs),pt.setClass(Cs,"i-text");class ea extends Cs{static getDefaults(){return q(q({},super.getDefaults()),ea.ownDefaults)}constructor(e,t){super(e,q(q({},ea.ownDefaults),t))}static createControls(){return{controls:KS()}}initDimensions(){this.initialized&&(this.isEditing&&this.initDelayedCursor(),this._clearCache(),this.dynamicMinWidth=0,this._styleMap=this._generateStyleMap(this._splitText()),this.dynamicMinWidth>this.width&&this._set("width",this.dynamicMinWidth),this.textAlign.includes(qn)&&this.enlargeSpaces(),this.height=this.calcTextHeight())}_generateStyleMap(e){let t=0,i=0,n=0;const s={};for(let o=0;o0?(i=0,n++,t++):!this.splitByGrapheme&&this._reSpaceAndTab.test(e.graphemeText[n])&&o>0&&(i++,n++),s[o]={line:t,offset:i},n+=e.graphemeLines[o].length,i+=e.graphemeLines[o].length;return s}styleHas(e,t){if(this._styleMap&&!this.isWrapping){const i=this._styleMap[t];i&&(t=i.line)}return super.styleHas(e,t)}isEmptyStyles(e){if(!this.styles)return!0;let t,i=0,n=e+1,s=!1;const o=this._styleMap[e],a=this._styleMap[e+1];o&&(e=o.line,i=o.offset),a&&(n=a.line,s=n===e,t=a.offset);const l=e===void 0?this.styles:{line:this.styles[e]};for(const c in l)for(const d in l[c]){const u=parseInt(d,10);if(u>=i&&(!s||u{let a=0;const l=t?this.graphemeSplit(s):this.wordSplit(s);return l.length===0?[{word:[],width:0}]:l.map(c=>{const d=t?[c]:this.graphemeSplit(c),u=this._measureWord(d,o,a);return n=Math.max(u,n),a+=d.length+i.length,{word:d,width:u}})}),largestWordWidth:n}}_measureWord(e,t){let i,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,s=0;for(let o=0,a=e.length;o3&&arguments[3]!==void 0?arguments[3]:0;const a=this._getWidthOfCharSpacing(),l=this.splitByGrapheme,c=[],d=l?"":" ";let u=0,h=[],f=0,m=0,p=!0;t-=o;const g=Math.max(t,n,this.dynamicMinWidth),v=s[e];let b;for(f=0,b=0;bg&&!p?(c.push(h),h=[],u=_,p=!0):u+=a,p||l||h.push(d),h=h.concat(S),m=l?0:this._measureWord([d],e,f),f++,p=!1}return b&&c.push(h),n+o>this.dynamicMinWidth&&(this.dynamicMinWidth=n-a+o),c}isEndOfWrapping(e){return!this._styleMap[e+1]||this._styleMap[e+1].line!==this._styleMap[e].line}missingNewlineOffset(e,t){return this.splitByGrapheme&&!t?this.isEndOfWrapping(e)?1:0:1}_splitTextIntoLines(e){const t=super._splitTextIntoLines(e),i=this._wrapText(t.lines,this.width),n=new Array(i.length);for(let s=0;s0&&arguments[0]!==void 0?arguments[0]:[];return super.toObject(["minWidth","splitByGrapheme",...e])}}Z(ea,"type","Textbox"),Z(ea,"textLayoutProperties",[...Cs.textLayoutProperties,"width"]),Z(ea,"ownDefaults",{minWidth:20,dynamicMinWidth:2,lockScalingFlip:!0,noScaleCache:!1,_wordJoiners:/[ \t\r]/,splitByGrapheme:!1}),pt.setClass(ea);class qb extends bf{shouldPerformLayout(e){return!!e.target.clipPath&&super.shouldPerformLayout(e)}shouldLayoutClipPath(){return!1}calcLayoutResult(e,t){const{target:i}=e,{clipPath:n,group:s}=i;if(!n||!this.shouldPerformLayout(e))return;const{width:o,height:a}=Es(eT(i,n)),l=new ve(o,a);if(n.absolutePositioned)return{center:vo(n.getRelativeCenterPoint(),void 0,s?s.calcTransformMatrix():void 0),size:l};{const c=n.getRelativeCenterPoint().transform(i.calcOwnMatrix(),!0);if(this.shouldPerformLayout(e)){const{center:d=new ve,correction:u=new ve}=this.calcBoundingBox(t,e)||{};return{center:d.add(c),correction:u.subtract(c),size:l}}return{center:i.getRelativeCenterPoint().add(c),size:l}}}}Z(qb,"type","clip-path"),pt.setClass(qb);class Zb extends bf{getInitialSize(e,t){let{target:i}=e,{size:n}=t;return new ve(i.width||n.x,i.height||n.y)}}Z(Zb,"type","fixed"),pt.setClass(Zb);class cO extends ed{subscribeTargets(e){const t=e.target;e.targets.reduce((i,n)=>(n.parent&&i.add(n.parent),i),new Set).forEach(i=>{i.layoutManager.subscribeTargets({target:i,targets:[t]})})}unsubscribeTargets(e){const t=e.target,i=t.getObjects();e.targets.reduce((n,s)=>(s.parent&&n.add(s.parent),n),new Set).forEach(n=>{!i.some(s=>s.parent===n)&&n.layoutManager.unsubscribeTargets({target:n,targets:[t]})})}}class Qn extends es{static getDefaults(){return q(q({},super.getDefaults()),Qn.ownDefaults)}constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Object.assign(this,Qn.ownDefaults),this.setOptions(t);const{left:i,top:n,layoutManager:s}=t;this.groupInit(e,{left:i,top:n,layoutManager:s!=null?s:new cO})}_shouldSetNestedCoords(){return!0}__objectSelectionMonitor(){}multiSelectAdd(){for(var e=arguments.length,t=new Array(e),i=0;i{const s=this._objects.findIndex(a=>a.isInFrontOf(n)),o=s===-1?this.size():s;this.insertAt(o,n)})}canEnterGroup(e){return this.getObjects().some(t=>t.isDescendantOf(e)||e.isDescendantOf(t))?(_o("error","ActiveSelection: circular object trees are not supported, this call has no effect"),!1):super.canEnterGroup(e)}enterGroup(e,t){e.parent&&e.parent===e.group?e.parent._exitGroup(e):e.group&&e.parent!==e.group&&e.group.remove(e),this._enterGroup(e,t)}exitGroup(e,t){this._exitGroup(e,t),e.parent&&e.parent._enterGroup(e,!0)}_onAfterObjectsChange(e,t){super._onAfterObjectsChange(e,t);const i=new Set;t.forEach(n=>{const{parent:s}=n;s&&i.add(s)}),e===xv?i.forEach(n=>{n._onAfterObjectsChange(Fh,t)}):i.forEach(n=>{n._set("dirty",!0)})}onDeselect(){return this.removeAll(),!1}toString(){return"#")}shouldCache(){return!1}isOnACache(){return!1}_renderControls(e,t,i){e.save(),e.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1;const n=q(q({hasControls:!1},i),{},{forActiveSelection:!0});for(let s=0;s{c.applyTo(a)});const{imageData:l}=a;return l.width===i&&l.height===n||(s.width=l.width,s.height=l.height),o.putImageData(l,0,0),a}}class bT{constructor(){let{tileSize:e=ri.textureSize}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Z(this,"aPosition",new Float32Array([0,0,0,1,1,0,1,1])),Z(this,"resources",{}),this.tileSize=e,this.setupGLContext(e,e),this.captureGPUInfo()}setupGLContext(e,t){this.dispose(),this.createWebGLCanvas(e,t)}createWebGLCanvas(e,t){const i=mr();i.width=e,i.height=t;const n=i.getContext("webgl",{alpha:!0,premultipliedAlpha:!1,depth:!1,stencil:!1,antialias:!1});n&&(n.clearColor(0,0,0,0),this.canvas=i,this.gl=n)}applyFilters(e,t,i,n,s,o){const a=this.gl,l=s.getContext("2d");if(!a||!l)return;let c;o&&(c=this.getCachedTexture(o,t));const d={originalWidth:t.width||t.originalWidth||0,originalHeight:t.height||t.originalHeight||0,sourceWidth:i,sourceHeight:n,destinationWidth:i,destinationHeight:n,context:a,sourceTexture:this.createTexture(a,i,n,c?void 0:t),targetTexture:this.createTexture(a,i,n),originalTexture:c||this.createTexture(a,i,n,c?void 0:t),passes:e.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:s},u=a.createFramebuffer();return a.bindFramebuffer(a.FRAMEBUFFER,u),e.forEach(h=>{h&&h.applyTo(d)}),function(h){const f=h.targetCanvas,m=f.width,p=f.height,g=h.destinationWidth,v=h.destinationHeight;m===g&&p===v||(f.width=g,f.height=v)}(d),this.copyGLTo2D(a,d),a.bindTexture(a.TEXTURE_2D,null),a.deleteTexture(d.sourceTexture),a.deleteTexture(d.targetTexture),a.deleteFramebuffer(u),l.setTransform(1,0,0,1,0,0),d}dispose(){this.canvas&&(this.canvas=null,this.gl=null),this.clearWebGLCaches()}clearWebGLCaches(){this.programCache={},this.textureCache={}}createTexture(e,t,i,n,s){const{NEAREST:o,TEXTURE_2D:a,RGBA:l,UNSIGNED_BYTE:c,CLAMP_TO_EDGE:d,TEXTURE_MAG_FILTER:u,TEXTURE_MIN_FILTER:h,TEXTURE_WRAP_S:f,TEXTURE_WRAP_T:m}=e,p=e.createTexture();return e.bindTexture(a,p),e.texParameteri(a,u,s||o),e.texParameteri(a,h,s||o),e.texParameteri(a,f,d),e.texParameteri(a,m,d),n?e.texImage2D(a,0,l,l,c,n):e.texImage2D(a,0,l,t,i,0,l,c,null),p}getCachedTexture(e,t,i){const{textureCache:n}=this;if(n[e])return n[e];{const s=this.createTexture(this.gl,t.width,t.height,t,i);return s&&(n[e]=s),s}}evictCachesForKey(e){this.textureCache[e]&&(this.gl.deleteTexture(this.textureCache[e]),delete this.textureCache[e])}copyGLTo2D(e,t){const i=e.canvas,n=t.targetCanvas,s=n.getContext("2d");if(!s)return;s.translate(0,n.height),s.scale(1,-1);const o=i.height-n.height;s.drawImage(i,0,o,n.width,n.height,0,0,n.width,n.height)}copyGLTo2DPutImageData(e,t){const i=t.targetCanvas.getContext("2d"),n=t.destinationWidth,s=t.destinationHeight,o=n*s*4;if(!i)return;const a=new Uint8Array(this.imageBuffer,0,o),l=new Uint8ClampedArray(this.imageBuffer,0,o);e.readPixels(0,0,n,s,e.RGBA,e.UNSIGNED_BYTE,a);const c=new ImageData(l,n,s);i.putImageData(c,0,0)}captureGPUInfo(){if(this.gpuInfo)return this.gpuInfo;const e=this.gl,t={renderer:"",vendor:""};if(!e)return t;const i=e.getExtension("WEBGL_debug_renderer_info");if(i){const n=e.getParameter(i.UNMASKED_RENDERER_WEBGL),s=e.getParameter(i.UNMASKED_VENDOR_WEBGL);n&&(t.renderer=n.toLowerCase()),s&&(t.vendor=s.toLowerCase())}return this.gpuInfo=t,t}}let dp;function uO(){const{WebGLProbe:r}=rs();return r.queryWebGL(mr()),ri.enableGLFiltering&&r.isSupported(ri.textureSize)?new bT({tileSize:ri.textureSize}):new dO}function up(){return!dp&&(!(arguments.length>0&&arguments[0]!==void 0)||arguments[0])&&(dp=uO()),dp}const hO=["filters","resizeFilter","src","crossOrigin","type"],xT=["cropX","cropY"];class vn extends Pr{static getDefaults(){return q(q({},super.getDefaults()),vn.ownDefaults)}constructor(e,t){super(),Z(this,"_lastScaleX",1),Z(this,"_lastScaleY",1),Z(this,"_filterScalingX",1),Z(this,"_filterScalingY",1),this.filters=[],Object.assign(this,vn.ownDefaults),this.setOptions(t),this.cacheKey="texture".concat(yo()),this.setElement(typeof e=="string"?(this.canvas&&Dn(this.canvas.getElement())||jl()).getElementById(e):e,t)}getElement(){return this._element}setElement(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.removeTexture(this.cacheKey),this.removeTexture("".concat(this.cacheKey,"_filtered")),this._element=e,this._originalElement=e,this._setWidthHeight(t),e.classList.add(vn.CSS_CANVAS),this.filters.length!==0&&this.applyFilters(),this.resizeFilter&&this.applyResizeFilters()}removeTexture(e){const t=up(!1);t instanceof bT&&t.evictCachesForKey(e)}dispose(){super.dispose(),this.removeTexture(this.cacheKey),this.removeTexture("".concat(this.cacheKey,"_filtered")),this._cacheContext=null,["_originalElement","_element","_filteredEl","_cacheCanvas"].forEach(e=>{const t=this[e];t&&rs().dispose(t),this[e]=void 0})}getCrossOrigin(){return this._originalElement&&(this._originalElement.crossOrigin||null)}getOriginalSize(){const e=this.getElement();return e?{width:e.naturalWidth||e.width,height:e.naturalHeight||e.height}:{width:0,height:0}}_stroke(e){if(!this.stroke||this.strokeWidth===0)return;const t=this.width/2,i=this.height/2;e.beginPath(),e.moveTo(-t,-i),e.lineTo(t,-i),e.lineTo(t,i),e.lineTo(-t,i),e.lineTo(-t,-i),e.closePath()}toObject(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const t=[];return this.filters.forEach(i=>{i&&t.push(i.toObject())}),q(q({},super.toObject([...xT,...e])),{},{src:this.getSrc(),crossOrigin:this.getCrossOrigin(),filters:t},this.resizeFilter?{resizeFilter:this.resizeFilter.toObject()}:{})}hasCrop(){return!!this.cropX||!!this.cropY||this.width +`,' `,` -`),a=' clip-path="url(#imageCrop_'+c+')" '}if(this.imageSmoothing||(l=' image-rendering="optimizeSpeed"'),e.push(" -`)),this.stroke||this.strokeDashArray){const c=this.fill;this.fill=null,o=[' -`)],this.fill=c}return s=this.paintFirst!==ze?s.concat(o,e):s.concat(e,o),s}getSrc(e){const t=e?this._element:this._originalElement;return t?t.toDataURL?t.toDataURL():this.srcFromAttribute?t.getAttribute("src")||"":t.src:this.src||""}getSvgSrc(e){return this.getSrc(e)}setSrc(e){let{crossOrigin:t,signal:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Oi(e,{crossOrigin:t,signal:r}).then(n=>{t!==void 0&&this.set({crossOrigin:t}),this.setElement(n)})}toString(){return'#')}applyResizeFilters(){const e=this.resizeFilter,t=this.minimumScaleTrigger,r=this.getTotalObjectScaling(),n=r.x,s=r.y,o=this._filteredEl||this._originalElement;if(this.group&&this.set("dirty",!0),!e||n>t&&s>t)return this._element=o,this._filterScalingX=1,this._filterScalingY=1,this._lastScaleX=n,void(this._lastScaleY=s);const a=Xe(),l=o.width,c=o.height;a.width=l,a.height=c,this._element=a,this._lastScaleX=e.scaleX=n,this._lastScaleY=e.scaleY=s,Wo().applyFilters([e],o,l,c,this._element),this._filterScalingX=a.width/this._originalElement.width,this._filterScalingY=a.height/this._originalElement.height}applyFilters(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.filters||[];if(e=e.filter(s=>s&&!s.isNeutralState()),this.set("dirty",!0),this.removeTexture("".concat(this.cacheKey,"_filtered")),e.length===0)return this._element=this._originalElement,this._filteredEl=void 0,this._filterScalingX=1,void(this._filterScalingY=1);const t=this._originalElement,r=t.naturalWidth||t.width,n=t.naturalHeight||t.height;if(this._element===this._originalElement){const s=Xe();s.width=r,s.height=n,this._element=s,this._filteredEl=s}else this._filteredEl&&(this._element=this._filteredEl,this._filteredEl.getContext("2d").clearRect(0,0,r,n),this._lastScaleX=1,this._lastScaleY=1);Wo().applyFilters(e,this._originalElement,r,n,this._element),this._originalElement.width===this._element.width&&this._originalElement.height===this._element.height||(this._filterScalingX=this._element.width/this._originalElement.width,this._filterScalingY=this._element.height/this._originalElement.height)}_render(e){e.imageSmoothingEnabled=this.imageSmoothing,this.isMoving!==!0&&this.resizeFilter&&this._needsResize()&&this.applyResizeFilters(),this._stroke(e),this._renderPaintInOrder(e)}drawCacheOnCanvas(e){e.imageSmoothingEnabled=this.imageSmoothing,super.drawCacheOnCanvas(e)}shouldCache(){return this.needsItsOwnCache()}_renderFill(e){const t=this._element;if(!t)return;const r=this._filterScalingX,n=this._filterScalingY,s=this.width,o=this.height,a=Math.max(this.cropX,0),l=Math.max(this.cropY,0),c=t.naturalWidth||t.width,u=t.naturalHeight||t.height,h=a*r,d=l*n,f=Math.min(s*r,c-h),g=Math.min(o*n,u-d),m=-s/2,v=-o/2,p=Math.min(s,c/r-a),b=Math.min(o,u/n-l);t&&e.drawImage(t,h,d,f,g,m,v,p,b)}_needsResize(){const e=this.getTotalObjectScaling();return e.x!==this._lastScaleX||e.y!==this._lastScaleY}_resetWidthHeight(){this.set(this.getOriginalSize())}_setWidthHeight(){let{width:e,height:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=this.getOriginalSize();this.width=e||r.width,this.height=t||r.height}parsePreserveAspectRatioAttribute(){const e=f0(this.preserveAspectRatio||""),t=this.width,r=this.height,n={width:t,height:r};let s,o=this._element.width,a=this._element.height,l=1,c=1,u=0,h=0,d=0,f=0;return!e||e.alignX===ht&&e.alignY===ht?(l=t/o,c=r/a):(e.meetOrSlice==="meet"&&(l=c=xm(this._element,n),s=(t-o*l)/2,e.alignX==="Min"&&(u=-s),e.alignX==="Max"&&(u=s),s=(r-a*c)/2,e.alignY==="Min"&&(h=-s),e.alignY==="Max"&&(h=s)),e.meetOrSlice==="slice"&&(l=c=km(this._element,n),s=o-t/l,e.alignX==="Mid"&&(d=s/2),e.alignX==="Max"&&(d=s),s=a-r/c,e.alignY==="Mid"&&(f=s/2),e.alignY==="Max"&&(f=s),o=t/l,a=r/c)),{width:o,height:a,scaleX:l,scaleY:c,offsetLeft:u,offsetTop:h,cropX:d,cropY:f}}static fromObject(e,t){let{filters:r,resizeFilter:n,src:s,crossOrigin:o,type:a}=e,l=De(e,_p);return Promise.all([Oi(s,D(D({},t),{},{crossOrigin:o})),r&&Pn(r,t),n&&Pn([n],t),as(l,t)]).then(c=>{let[u,h=[],[d]=[],f={}]=c;return new this(u,D(D({},l),{},{src:s,filters:h,resizeFilter:d},f))})}static fromURL(e){let{crossOrigin:t=null,signal:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return Oi(e,{crossOrigin:t,signal:r}).then(s=>new this(s,n))}static fromElement(t){return Me(this,arguments,function*(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const s=$t(e,this.ATTRIBUTE_NAMES,n);return this.fromURL(s["xlink:href"],r,s).catch(o=>(ar("log","Unable to parse Image",o),null))})}}M(bt,"type","Image"),M(bt,"cacheProperties",[...Qt,...fd]),M(bt,"ownDefaults",{strokeWidth:0,srcFromAttribute:!1,minimumScaleTrigger:.5,cropX:0,cropY:0,imageSmoothing:!0}),M(bt,"CSS_CANVAS","canvas-img"),M(bt,"ATTRIBUTE_NAMES",[...dr,"x","y","width","height","preserveAspectRatio","xlink:href","crossOrigin","image-rendering"]),$.setClass(bt),$.setSVGClass(bt);us(["pattern","defs","symbol","metadata","clipPath","mask","desc"]);const dd=of,fu=i=>function(e,t,r){const{points:n,pathOffset:s}=r;return new L(n[i]).subtract(s).transform(Ye(r.getViewportTransform(),r.calcTransformMatrix()))},gd=(i,e,t,r)=>{const{target:n,pointIndex:s}=e,o=n,a=or(new L(t,r),void 0,o.calcOwnMatrix());return o.points[s]=a.add(o.pathOffset),o.setDimensions(),!0},md=(i,e)=>function(t,r,n,s){const o=r.target,a=new L(o.points[(i>0?i:o.points.length)-1]),l=a.subtract(o.pathOffset).transform(o.calcOwnMatrix()),c=e(t,D(D({},r),{},{pointIndex:i}),n,s),u=a.subtract(o.pathOffset).transform(o.calcOwnMatrix()).subtract(l);return o.left-=u.x,o.top-=u.y,c},du=i=>fr(dd,md(i,gd)),_a=(i,e,t)=>{const{path:r,pathOffset:n}=i,s=r[e];return new L(s[t]-n.x,s[t+1]-n.y).transform(Ye(i.getViewportTransform(),i.calcTransformMatrix()))};function bp(i,e,t){const{commandIndex:r,pointIndex:n}=this;return _a(t,r,n)}function yp(i,e,t,r){const{target:n}=e,{commandIndex:s,pointIndex:o}=this,a=((l,c,u,h,d)=>{const{path:f,pathOffset:g}=l,m=f[(h>0?h:f.length)-1],v=new L(m[d],m[d+1]),p=v.subtract(g).transform(l.calcOwnMatrix()),b=or(new L(c,u),void 0,l.calcOwnMatrix());f[h][d]=b.x+g.x,f[h][d+1]=b.y+g.y,l.setDimensions();const C=v.subtract(l.pathOffset).transform(l.calcOwnMatrix()).subtract(p);return l.left-=C.x,l.top-=C.y,l.set("dirty",!0),!0})(n,t,r,s,o);return Ka(this.actionName,D(D({},Za(i,e,t,r)),{},{commandIndex:s,pointIndex:o})),a}class pd extends mt{constructor(e){super(e)}render(e,t,r,n,s){const o=D(D({},n),{},{cornerColor:this.controlFill,cornerStrokeColor:this.controlStroke,transparentCorners:!this.controlFill});super.render(e,t,r,o,s)}}class wp extends pd{constructor(e){super(e)}render(e,t,r,n,s){const{path:o}=s,{commandIndex:a,pointIndex:l,connectToCommandIndex:c,connectToPointIndex:u}=this;e.save(),e.strokeStyle=this.controlStroke,this.connectionDashArray&&e.setLineDash(this.connectionDashArray);const[h]=o[a],d=_a(s,c,u);if(h==="Q"){const f=_a(s,a,l+2);e.moveTo(f.x,f.y),e.lineTo(t,r)}else e.moveTo(t,r);e.lineTo(d.x,d.y),e.stroke(),e.restore(),super.render(e,t,r,n,s)}}const oi=(i,e,t,r,n,s)=>new(t?wp:pd)(D(D({commandIndex:i,pointIndex:e,actionName:"modifyPath",positionHandler:bp,actionHandler:yp,connectToCommandIndex:n,connectToPointIndex:s},r),t?r.controlPointStyle:r.pointStyle));var Cp=Object.freeze({__proto__:null,changeWidth:ca,createObjectDefaultControls:el,createPathControls:function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const t={};let r="M";return i.path.forEach((n,s)=>{const o=n[0];switch(o!=="Z"&&(t["c_".concat(s,"_").concat(o)]=oi(s,n.length-2,!1,e)),o){case"C":t["c_".concat(s,"_C_CP_1")]=oi(s,1,!0,e,s-1,(a=>a==="C"?5:a==="Q"?3:1)(r)),t["c_".concat(s,"_C_CP_2")]=oi(s,3,!0,e,s,5);break;case"Q":t["c_".concat(s,"_Q_CP_1")]=oi(s,1,!0,e,s,3)}r=o}),t},createPolyActionHandler:du,createPolyControls:function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const t={};for(let r=0;r<(typeof i=="number"?i:i.points.length);r++)t["p".concat(r)]=new mt(D({actionName:dd,positionHandler:fu(r),actionHandler:du(r)},e));return t},createPolyPositionHandler:fu,createResizeControls:zf,createTextboxDefaultControls:Vf,dragHandler:Cf,factoryPolyActionHandler:md,getLocalPoint:cs,polyActionHandler:gd,renderCircleControl:Of,renderSquareControl:Df,rotationStyleHandler:Mf,rotationWithSnapping:Pf,scaleCursorStyleHandler:zr,scaleOrSkewActionName:_n,scaleSkewCursorStyleHandler:br,scalingEqually:vn,scalingX:jf,scalingXOrSkewingY:ua,scalingY:Ff,scalingYOrSkewingX:ha,skewCursorStyleHandler:Rf,skewHandlerX:If,skewHandlerY:Bf,wrapWithFireEvent:fr,wrapWithFixedAnchor:Pr});const gs=i=>i.webgl!==void 0,ol="precision highp float",xp=` - `.concat(ol,`; +`),a=' clip-path="url(#imageCrop_'+c+')" '}if(this.imageSmoothing||(l=' image-rendering="optimizeSpeed"'),e.push(" +`)),this.stroke||this.strokeDashArray){const c=this.fill;this.fill=null,o=[' +`)],this.fill=c}return s=this.paintFirst!==or?s.concat(o,e):s.concat(e,o),s}getSrc(e){const t=e?this._element:this._originalElement;return t?t.toDataURL?t.toDataURL():this.srcFromAttribute?t.getAttribute("src")||"":t.src:this.src||""}getSvgSrc(e){return this.getSrc(e)}setSrc(e){let{crossOrigin:t,signal:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return fh(e,{crossOrigin:t,signal:i}).then(n=>{t!==void 0&&this.set({crossOrigin:t}),this.setElement(n)})}toString(){return'#')}applyResizeFilters(){const e=this.resizeFilter,t=this.minimumScaleTrigger,i=this.getTotalObjectScaling(),n=i.x,s=i.y,o=this._filteredEl||this._originalElement;if(this.group&&this.set("dirty",!0),!e||n>t&&s>t)return this._element=o,this._filterScalingX=1,this._filterScalingY=1,this._lastScaleX=n,void(this._lastScaleY=s);const a=mr(),l=o.width,c=o.height;a.width=l,a.height=c,this._element=a,this._lastScaleX=e.scaleX=n,this._lastScaleY=e.scaleY=s,up().applyFilters([e],o,l,c,this._element),this._filterScalingX=a.width/this._originalElement.width,this._filterScalingY=a.height/this._originalElement.height}applyFilters(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.filters||[];if(e=e.filter(s=>s&&!s.isNeutralState()),this.set("dirty",!0),this.removeTexture("".concat(this.cacheKey,"_filtered")),e.length===0)return this._element=this._originalElement,this._filteredEl=void 0,this._filterScalingX=1,void(this._filterScalingY=1);const t=this._originalElement,i=t.naturalWidth||t.width,n=t.naturalHeight||t.height;if(this._element===this._originalElement){const s=mr();s.width=i,s.height=n,this._element=s,this._filteredEl=s}else this._filteredEl&&(this._element=this._filteredEl,this._filteredEl.getContext("2d").clearRect(0,0,i,n),this._lastScaleX=1,this._lastScaleY=1);up().applyFilters(e,this._originalElement,i,n,this._element),this._originalElement.width===this._element.width&&this._originalElement.height===this._element.height||(this._filterScalingX=this._element.width/this._originalElement.width,this._filterScalingY=this._element.height/this._originalElement.height)}_render(e){e.imageSmoothingEnabled=this.imageSmoothing,this.isMoving!==!0&&this.resizeFilter&&this._needsResize()&&this.applyResizeFilters(),this._stroke(e),this._renderPaintInOrder(e)}drawCacheOnCanvas(e){e.imageSmoothingEnabled=this.imageSmoothing,super.drawCacheOnCanvas(e)}shouldCache(){return this.needsItsOwnCache()}_renderFill(e){const t=this._element;if(!t)return;const i=this._filterScalingX,n=this._filterScalingY,s=this.width,o=this.height,a=Math.max(this.cropX,0),l=Math.max(this.cropY,0),c=t.naturalWidth||t.width,d=t.naturalHeight||t.height,u=a*i,h=l*n,f=Math.min(s*i,c-u),m=Math.min(o*n,d-h),p=-s/2,g=-o/2,v=Math.min(s,c/i-a),b=Math.min(o,d/n-l);t&&e.drawImage(t,u,h,f,m,p,g,v,b)}_needsResize(){const e=this.getTotalObjectScaling();return e.x!==this._lastScaleX||e.y!==this._lastScaleY}_resetWidthHeight(){this.set(this.getOriginalSize())}_setWidthHeight(){let{width:e,height:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const i=this.getOriginalSize();this.width=e||i.width,this.height=t||i.height}parsePreserveAspectRatioAttribute(){const e=o5(this.preserveAspectRatio||""),t=this.width,i=this.height,n={width:t,height:i};let s,o=this._element.width,a=this._element.height,l=1,c=1,d=0,u=0,h=0,f=0;return!e||e.alignX===Qr&&e.alignY===Qr?(l=t/o,c=i/a):(e.meetOrSlice==="meet"&&(l=c=v4(this._element,n),s=(t-o*l)/2,e.alignX==="Min"&&(d=-s),e.alignX==="Max"&&(d=s),s=(i-a*c)/2,e.alignY==="Min"&&(u=-s),e.alignY==="Max"&&(u=s)),e.meetOrSlice==="slice"&&(l=c=_4(this._element,n),s=o-t/l,e.alignX==="Mid"&&(h=s/2),e.alignX==="Max"&&(h=s),s=a-i/c,e.alignY==="Mid"&&(f=s/2),e.alignY==="Max"&&(f=s),o=t/l,a=i/c)),{width:o,height:a,scaleX:l,scaleY:c,offsetLeft:d,offsetTop:u,cropX:h,cropY:f}}static fromObject(e,t){let{filters:i,resizeFilter:n,src:s,crossOrigin:o,type:a}=e,l=Mi(e,hO);return Promise.all([fh(s,q(q({},t),{},{crossOrigin:o})),i&&Jc(i,t),n&&Jc([n],t),pf(l,t)]).then(c=>{let[d,u=[],[h]=[],f={}]=c;return new this(d,q(q({},l),{},{src:s,filters:u,resizeFilter:h},f))})}static fromURL(e){let{crossOrigin:t=null,signal:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return fh(e,{crossOrigin:t,signal:i}).then(s=>new this(s,n))}static fromElement(t){return le(this,arguments,function*(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const s=Fs(e,this.ATTRIBUTE_NAMES,n);return this.fromURL(s["xlink:href"],i,s).catch(o=>(_o("log","Unable to parse Image",o),null))})}}Z(vn,"type","Image"),Z(vn,"cacheProperties",[...Rs,...xT]),Z(vn,"ownDefaults",{strokeWidth:0,srcFromAttribute:!1,minimumScaleTrigger:.5,cropX:0,cropY:0,imageSmoothing:!0}),Z(vn,"CSS_CANVAS","canvas-img"),Z(vn,"ATTRIBUTE_NAMES",[...Co,"x","y","width","height","preserveAspectRatio","xlink:href","crossOrigin","image-rendering"]),pt.setClass(vn),pt.setSVGClass(vn);_f(["pattern","defs","symbol","metadata","clipPath","mask","desc"]);const wT=pS,Kb=r=>function(e,t,i){const{points:n,pathOffset:s}=i;return new ve(n[r]).subtract(s).transform(fr(i.getViewportTransform(),i.calcTransformMatrix()))},ST=(r,e,t,i)=>{const{target:n,pointIndex:s}=e,o=n,a=vo(new ve(t,i),void 0,o.calcOwnMatrix());return o.points[s]=a.add(o.pathOffset),o.setDimensions(),!0},TT=(r,e)=>function(t,i,n,s){const o=i.target,a=new ve(o.points[(r>0?r:o.points.length)-1]),l=a.subtract(o.pathOffset).transform(o.calcOwnMatrix()),c=e(t,q(q({},i),{},{pointIndex:r}),n,s),d=a.subtract(o.pathOffset).transform(o.calcOwnMatrix()).subtract(l);return o.left-=d.x,o.top-=d.y,c},Jb=r=>To(wT,TT(r,ST)),h0=(r,e,t)=>{const{path:i,pathOffset:n}=r,s=i[e];return new ve(s[t]-n.x,s[t+1]-n.y).transform(fr(r.getViewportTransform(),r.calcTransformMatrix()))};function fO(r,e,t){const{commandIndex:i,pointIndex:n}=this;return h0(t,i,n)}function mO(r,e,t,i){const{target:n}=e,{commandIndex:s,pointIndex:o}=this,a=((l,c,d,u,h)=>{const{path:f,pathOffset:m}=l,p=f[(u>0?u:f.length)-1],g=new ve(p[h],p[h+1]),v=g.subtract(m).transform(l.calcOwnMatrix()),b=vo(new ve(c,d),void 0,l.calcOwnMatrix());f[u][h]=b.x+m.x,f[u][h+1]=b.y+m.y,l.setDimensions();const S=g.subtract(l.pathOffset).transform(l.calcOwnMatrix()).subtract(v);return l.left-=S.x,l.top-=S.y,l.set("dirty",!0),!0})(n,t,i,s,o);return uv(this.actionName,q(q({},hv(r,e,t,i)),{},{commandIndex:s,pointIndex:o})),a}class CT extends an{constructor(e){super(e)}render(e,t,i,n,s){const o=q(q({},n),{},{cornerColor:this.controlFill,cornerStrokeColor:this.controlStroke,transparentCorners:!this.controlFill});super.render(e,t,i,o,s)}}class pO extends CT{constructor(e){super(e)}render(e,t,i,n,s){const{path:o}=s,{commandIndex:a,pointIndex:l,connectToCommandIndex:c,connectToPointIndex:d}=this;e.save(),e.strokeStyle=this.controlStroke,this.connectionDashArray&&e.setLineDash(this.connectionDashArray);const[u]=o[a],h=h0(s,c,d);if(u==="Q"){const f=h0(s,a,l+2);e.moveTo(f.x,f.y),e.lineTo(t,i)}else e.moveTo(t,i);e.lineTo(h.x,h.y),e.stroke(),e.restore(),super.render(e,t,i,n,s)}}const Ou=(r,e,t,i,n,s)=>new(t?pO:CT)(q(q({commandIndex:r,pointIndex:e,actionName:"modifyPath",positionHandler:fO,actionHandler:mO,connectToCommandIndex:n,connectToPointIndex:s},i),t?i.controlPointStyle:i.pointStyle));var gO=Object.freeze({__proto__:null,changeWidth:r0,createObjectDefaultControls:gv,createPathControls:function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const t={};let i="M";return r.path.forEach((n,s)=>{const o=n[0];switch(o!=="Z"&&(t["c_".concat(s,"_").concat(o)]=Ou(s,n.length-2,!1,e)),o){case"C":t["c_".concat(s,"_C_CP_1")]=Ou(s,1,!0,e,s-1,(a=>a==="C"?5:a==="Q"?3:1)(i)),t["c_".concat(s,"_C_CP_2")]=Ou(s,3,!0,e,s,5);break;case"Q":t["c_".concat(s,"_Q_CP_1")]=Ou(s,1,!0,e,s,3)}i=o}),t},createPolyActionHandler:Jb,createPolyControls:function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const t={};for(let i=0;i<(typeof r=="number"?r:r.points.length);i++)t["p".concat(i)]=new an(q({actionName:wT,positionHandler:Kb(i),actionHandler:Jb(i)},e));return t},createPolyPositionHandler:Kb,createResizeControls:ZS,createTextboxDefaultControls:KS,dragHandler:LS,factoryPolyActionHandler:TT,getLocalPoint:vf,polyActionHandler:ST,renderCircleControl:NS,renderSquareControl:zS,rotationStyleHandler:BS,rotationWithSnapping:jS,scaleCursorStyleHandler:ol,scaleOrSkewActionName:Dc,scaleSkewCursorStyleHandler:Qo,scalingEqually:Pc,scalingX:US,scalingXOrSkewingY:n0,scalingY:HS,scalingYOrSkewingX:s0,skewCursorStyleHandler:XS,skewHandlerX:YS,skewHandlerY:qS,wrapWithFireEvent:To,wrapWithFixedAnchor:pa});const wf=r=>r.webgl!==void 0,wv="precision highp float",vO=` + `.concat(wv,`; varying vec2 vTexCoord; uniform sampler2D uTexture; void main() { gl_FragColor = texture2D(uTexture, vTexCoord); - }`),kp=["type"],Sp=["type"],Tp=new RegExp(ol,"g");class We{get type(){return this.constructor.type}constructor(){let e=De(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},kp);Object.assign(this,this.constructor.defaults,e)}getFragmentSource(){return xp}getVertexSource(){return` + }`),_O=["type"],yO=["type"],bO=new RegExp(wv,"g");class pr{get type(){return this.constructor.type}constructor(){let e=Mi(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_O);Object.assign(this,this.constructor.defaults,e)}getFragmentSource(){return vO}getVertexSource(){return` attribute vec2 aPosition; varying vec2 vTexCoord; void main() { vTexCoord = aPosition; gl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0); - }`}createProgram(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getFragmentSource(),r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.getVertexSource();const{WebGLProbe:{GLPrecision:n="highp"}}=Bt();n!=="highp"&&(t=t.replace(Tp,ol.replace("highp",n)));const s=e.createShader(e.VERTEX_SHADER),o=e.createShader(e.FRAGMENT_SHADER),a=e.createProgram();if(!s||!o||!a)throw new Ft("Vertex, fragment shader or program creation error");if(e.shaderSource(s,r),e.compileShader(s),!e.getShaderParameter(s,e.COMPILE_STATUS))throw new Ft("Vertex shader compile error for ".concat(this.type,": ").concat(e.getShaderInfoLog(s)));if(e.shaderSource(o,t),e.compileShader(o),!e.getShaderParameter(o,e.COMPILE_STATUS))throw new Ft("Fragment shader compile error for ".concat(this.type,": ").concat(e.getShaderInfoLog(o)));if(e.attachShader(a,s),e.attachShader(a,o),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS))throw new Ft('Shader link error for "'.concat(this.type,'" ').concat(e.getProgramInfoLog(a)));const l=this.getUniformLocations(e,a)||{};return l.uStepW=e.getUniformLocation(a,"uStepW"),l.uStepH=e.getUniformLocation(a,"uStepH"),{program:a,attributeLocations:this.getAttributeLocations(e,a),uniformLocations:l}}getAttributeLocations(e,t){return{aPosition:e.getAttribLocation(t,"aPosition")}}getUniformLocations(e,t){const r=this.constructor.uniformLocations,n={};for(let s=0;s1){const r=e.destinationWidth,n=e.destinationHeight;e.sourceWidth===r&&e.sourceHeight===n||(t.deleteTexture(e.targetTexture),e.targetTexture=e.filterBackend.createTexture(t,r,n)),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e.targetTexture,0)}else t.bindFramebuffer(t.FRAMEBUFFER,null),t.finish()}_swapTextures(e){e.passes--,e.pass++;const t=e.targetTexture;e.targetTexture=e.sourceTexture,e.sourceTexture=t}isNeutralState(e){return!1}applyTo(e){gs(e)?(this._setupFrameBuffer(e),this.applyToWebGL(e),this._swapTextures(e)):this.applyTo2d(e)}applyTo2d(e){}getCacheKey(){return this.type}retrieveShader(e){const t=this.getCacheKey();return e.programCache[t]||(e.programCache[t]=this.createProgram(e.context)),e.programCache[t]}applyToWebGL(e){const t=e.context,r=this.retrieveShader(e);e.pass===0&&e.originalTexture?t.bindTexture(t.TEXTURE_2D,e.originalTexture):t.bindTexture(t.TEXTURE_2D,e.sourceTexture),t.useProgram(r.program),this.sendAttributeData(t,r.attributeLocations,e.aPosition),t.uniform1f(r.uniformLocations.uStepW,1/e.sourceWidth),t.uniform1f(r.uniformLocations.uStepH,1/e.sourceHeight),this.sendUniformData(t,r.uniformLocations),t.viewport(0,0,e.destinationWidth,e.destinationHeight),t.drawArrays(t.TRIANGLE_STRIP,0,4)}bindAdditionalTexture(e,t,r){e.activeTexture(r),e.bindTexture(e.TEXTURE_2D,t),e.activeTexture(e.TEXTURE0)}unbindAdditionalTexture(e,t){e.activeTexture(t),e.bindTexture(e.TEXTURE_2D,null),e.activeTexture(e.TEXTURE0)}sendUniformData(e,t){}createHelpLayer(e){if(!e.helpLayer){const t=Xe();t.width=e.sourceWidth,t.height=e.sourceHeight,e.helpLayer=t}}toObject(){const e=Object.keys(this.constructor.defaults||{});return D({type:this.type},e.reduce((t,r)=>(t[r]=this[r],t),{}))}toJSON(){return this.toObject()}static fromObject(e,t){return Me(this,null,function*(){return new this(De(e,Sp))})}}M(We,"type","BaseFilter"),M(We,"uniformLocations",[]);const Ep={multiply:`gl_FragColor.rgb *= uColor.rgb; + }`}createProgram(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getFragmentSource(),i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.getVertexSource();const{WebGLProbe:{GLPrecision:n="highp"}}=rs();n!=="highp"&&(t=t.replace(bO,wv.replace("highp",n)));const s=e.createShader(e.VERTEX_SHADER),o=e.createShader(e.FRAGMENT_SHADER),a=e.createProgram();if(!s||!o||!a)throw new Jn("Vertex, fragment shader or program creation error");if(e.shaderSource(s,i),e.compileShader(s),!e.getShaderParameter(s,e.COMPILE_STATUS))throw new Jn("Vertex shader compile error for ".concat(this.type,": ").concat(e.getShaderInfoLog(s)));if(e.shaderSource(o,t),e.compileShader(o),!e.getShaderParameter(o,e.COMPILE_STATUS))throw new Jn("Fragment shader compile error for ".concat(this.type,": ").concat(e.getShaderInfoLog(o)));if(e.attachShader(a,s),e.attachShader(a,o),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS))throw new Jn('Shader link error for "'.concat(this.type,'" ').concat(e.getProgramInfoLog(a)));const l=this.getUniformLocations(e,a)||{};return l.uStepW=e.getUniformLocation(a,"uStepW"),l.uStepH=e.getUniformLocation(a,"uStepH"),{program:a,attributeLocations:this.getAttributeLocations(e,a),uniformLocations:l}}getAttributeLocations(e,t){return{aPosition:e.getAttribLocation(t,"aPosition")}}getUniformLocations(e,t){const i=this.constructor.uniformLocations,n={};for(let s=0;s1){const i=e.destinationWidth,n=e.destinationHeight;e.sourceWidth===i&&e.sourceHeight===n||(t.deleteTexture(e.targetTexture),e.targetTexture=e.filterBackend.createTexture(t,i,n)),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e.targetTexture,0)}else t.bindFramebuffer(t.FRAMEBUFFER,null),t.finish()}_swapTextures(e){e.passes--,e.pass++;const t=e.targetTexture;e.targetTexture=e.sourceTexture,e.sourceTexture=t}isNeutralState(e){return!1}applyTo(e){wf(e)?(this._setupFrameBuffer(e),this.applyToWebGL(e),this._swapTextures(e)):this.applyTo2d(e)}applyTo2d(e){}getCacheKey(){return this.type}retrieveShader(e){const t=this.getCacheKey();return e.programCache[t]||(e.programCache[t]=this.createProgram(e.context)),e.programCache[t]}applyToWebGL(e){const t=e.context,i=this.retrieveShader(e);e.pass===0&&e.originalTexture?t.bindTexture(t.TEXTURE_2D,e.originalTexture):t.bindTexture(t.TEXTURE_2D,e.sourceTexture),t.useProgram(i.program),this.sendAttributeData(t,i.attributeLocations,e.aPosition),t.uniform1f(i.uniformLocations.uStepW,1/e.sourceWidth),t.uniform1f(i.uniformLocations.uStepH,1/e.sourceHeight),this.sendUniformData(t,i.uniformLocations),t.viewport(0,0,e.destinationWidth,e.destinationHeight),t.drawArrays(t.TRIANGLE_STRIP,0,4)}bindAdditionalTexture(e,t,i){e.activeTexture(i),e.bindTexture(e.TEXTURE_2D,t),e.activeTexture(e.TEXTURE0)}unbindAdditionalTexture(e,t){e.activeTexture(t),e.bindTexture(e.TEXTURE_2D,null),e.activeTexture(e.TEXTURE0)}sendUniformData(e,t){}createHelpLayer(e){if(!e.helpLayer){const t=mr();t.width=e.sourceWidth,t.height=e.sourceHeight,e.helpLayer=t}}toObject(){const e=Object.keys(this.constructor.defaults||{});return q({type:this.type},e.reduce((t,i)=>(t[i]=this[i],t),{}))}toJSON(){return this.toObject()}static fromObject(e,t){return le(this,null,function*(){return new this(Mi(e,yO))})}}Z(pr,"type","BaseFilter"),Z(pr,"uniformLocations",[]);const xO={multiply:`gl_FragColor.rgb *= uColor.rgb; `,screen:`gl_FragColor.rgb = 1.0 - (1.0 - gl_FragColor.rgb) * (1.0 - uColor.rgb); `,add:`gl_FragColor.rgb += uColor.rgb; `,difference:`gl_FragColor.rgb = abs(gl_FragColor.rgb - uColor.rgb); @@ -109,7 +101,7 @@ Resulting to default behavior: removing object from previous canvas and adding t `,tint:` gl_FragColor.rgb *= (1.0 - uColor.a); gl_FragColor.rgb += uColor.rgb; - `};class ai extends We{getCacheKey(){return"".concat(this.type,"_").concat(this.mode)}getFragmentSource(){return` + `};class Iu extends pr{getCacheKey(){return"".concat(this.type,"_").concat(this.mode)}getFragmentSource(){return` precision highp float; uniform sampler2D uTexture; uniform vec4 uColor; @@ -118,10 +110,10 @@ Resulting to default behavior: removing object from previous canvas and adding t vec4 color = texture2D(uTexture, vTexCoord); gl_FragColor = color; if (color.a > 0.0) { - `.concat(Ep[this.mode],` + `.concat(xO[this.mode],` } } - `)}applyTo2d(e){let{imageData:{data:t}}=e;const r=new ke(this.color).getSource(),n=r[0]*this.alpha,s=r[1]*this.alpha,o=r[2]*this.alpha,a=1-this.alpha;for(let l=0;lnew this(D(D({},s),{},{image:o})))})}}M(li,"type","BlendImage"),M(li,"defaults",{mode:"multiply",alpha:1}),M(li,"uniformLocations",["uTransformMatrix","uImage"]),$.setClass(li);class ci extends We{getFragmentSource(){return` + `}applyToWebGL(e){const t=e.context,i=this.createTexture(e.filterBackend,this.image);this.bindAdditionalTexture(t,i,t.TEXTURE1),super.applyToWebGL(e),this.unbindAdditionalTexture(t,t.TEXTURE1)}createTexture(e,t){return e.getCachedTexture(t.cacheKey,t.getElement())}calculateMatrix(){const e=this.image,{width:t,height:i}=e.getElement();return[1/e.scaleX,0,0,0,1/e.scaleY,0,-e.left/t,-e.top/i,1]}applyTo2d(e){let{imageData:{data:t,width:i,height:n},filterBackend:{resources:s}}=e;const o=this.image;s.blendImage||(s.blendImage=mr());const a=s.blendImage,l=a.getContext("2d");a.width!==i||a.height!==n?(a.width=i,a.height=n):l.clearRect(0,0,i,n),l.setTransform(o.scaleX,0,0,o.scaleY,o.left,o.top),l.drawImage(o.getElement(),0,0,i,n);const c=l.getImageData(0,0,i,n).data;for(let d=0;dnew this(q(q({},s),{},{image:o})))})}}Z(Lu,"type","BlendImage"),Z(Lu,"defaults",{mode:"multiply",alpha:1}),Z(Lu,"uniformLocations",["uTransformMatrix","uImage"]),pt.setClass(Lu);class Pu extends pr{getFragmentSource(){return` precision highp float; uniform sampler2D uTexture; uniform vec2 uDelta; @@ -180,7 +172,7 @@ Resulting to default behavior: removing object from previous canvas and adding t } gl_FragColor = color / total; } - `}applyTo(e){gs(e)?(this.aspectRatio=e.sourceWidth/e.sourceHeight,e.passes++,this._setupFrameBuffer(e),this.horizontal=!0,this.applyToWebGL(e),this._swapTextures(e),this._setupFrameBuffer(e),this.horizontal=!1,this.applyToWebGL(e),this._swapTextures(e)):this.applyTo2d(e)}applyTo2d(e){e.imageData=this.simpleBlur(e)}simpleBlur(e){let{ctx:t,imageData:r,filterBackend:{resources:n}}=e;const{width:s,height:o}=r;n.blurLayer1||(n.blurLayer1=Xe(),n.blurLayer2=Xe());const a=n.blurLayer1,l=n.blurLayer2;a.width===s&&a.height===o||(l.width=a.width=s,l.height=a.height=o);const c=a.getContext("2d"),u=l.getContext("2d"),h=15,d=.06*this.blur*.5;let f,g,m,v;for(c.putImageData(r,0,0),u.clearRect(0,0,s,o),v=-15;v<=h;v++)f=(Math.random()-.5)/4,g=v/h,m=d*g*s+f,u.globalAlpha=1-Math.abs(g),u.drawImage(a,m,f),c.drawImage(l,0,0),u.globalAlpha=1,u.clearRect(0,0,l.width,l.height);for(v=-15;v<=h;v++)f=(Math.random()-.5)/4,g=v/h,m=d*g*o+f,u.globalAlpha=1-Math.abs(g),u.drawImage(a,f,m),c.drawImage(l,0,0),u.globalAlpha=1,u.clearRect(0,0,l.width,l.height);t.drawImage(a,0,0);const p=t.getImageData(0,0,a.width,a.height);return c.globalAlpha=1,c.clearRect(0,0,a.width,a.height),p}sendUniformData(e,t){const r=this.chooseRightDelta();e.uniform2fv(t.uDelta,r)}isNeutralState(){return this.blur===0}chooseRightDelta(){let e=1;const t=[0,0];this.horizontal?this.aspectRatio>1&&(e=1/this.aspectRatio):this.aspectRatio<1&&(e=this.aspectRatio);const r=e*this.blur*.12;return this.horizontal?t[0]=r:t[1]=r,t}}M(ci,"type","Blur"),M(ci,"defaults",{blur:0}),M(ci,"uniformLocations",["uDelta"]),$.setClass(ci);class ui extends We{getFragmentSource(){return` + `}applyTo(e){wf(e)?(this.aspectRatio=e.sourceWidth/e.sourceHeight,e.passes++,this._setupFrameBuffer(e),this.horizontal=!0,this.applyToWebGL(e),this._swapTextures(e),this._setupFrameBuffer(e),this.horizontal=!1,this.applyToWebGL(e),this._swapTextures(e)):this.applyTo2d(e)}applyTo2d(e){e.imageData=this.simpleBlur(e)}simpleBlur(e){let{ctx:t,imageData:i,filterBackend:{resources:n}}=e;const{width:s,height:o}=i;n.blurLayer1||(n.blurLayer1=mr(),n.blurLayer2=mr());const a=n.blurLayer1,l=n.blurLayer2;a.width===s&&a.height===o||(l.width=a.width=s,l.height=a.height=o);const c=a.getContext("2d"),d=l.getContext("2d"),u=15,h=.06*this.blur*.5;let f,m,p,g;for(c.putImageData(i,0,0),d.clearRect(0,0,s,o),g=-15;g<=u;g++)f=(Math.random()-.5)/4,m=g/u,p=h*m*s+f,d.globalAlpha=1-Math.abs(m),d.drawImage(a,p,f),c.drawImage(l,0,0),d.globalAlpha=1,d.clearRect(0,0,l.width,l.height);for(g=-15;g<=u;g++)f=(Math.random()-.5)/4,m=g/u,p=h*m*o+f,d.globalAlpha=1-Math.abs(m),d.drawImage(a,f,p),c.drawImage(l,0,0),d.globalAlpha=1,d.clearRect(0,0,l.width,l.height);t.drawImage(a,0,0);const v=t.getImageData(0,0,a.width,a.height);return c.globalAlpha=1,c.clearRect(0,0,a.width,a.height),v}sendUniformData(e,t){const i=this.chooseRightDelta();e.uniform2fv(t.uDelta,i)}isNeutralState(){return this.blur===0}chooseRightDelta(){let e=1;const t=[0,0];this.horizontal?this.aspectRatio>1&&(e=1/this.aspectRatio):this.aspectRatio<1&&(e=this.aspectRatio);const i=e*this.blur*.12;return this.horizontal?t[0]=i:t[1]=i,t}}Z(Pu,"type","Blur"),Z(Pu,"defaults",{blur:0}),Z(Pu,"uniformLocations",["uDelta"]),pt.setClass(Pu);class Du extends pr{getFragmentSource(){return` precision highp float; uniform sampler2D uTexture; uniform float uBrightness; @@ -190,7 +182,7 @@ Resulting to default behavior: removing object from previous canvas and adding t color.rgb += uBrightness; gl_FragColor = color; } -`}applyTo2d(e){let{imageData:{data:t}}=e;const r=Math.round(255*this.brightness);for(let n=0;n0&&arguments[0]!==void 0?arguments[0]:{};super(e),this.subFilters=e.subFilters||[]}applyTo(e){gs(e)&&(e.passes+=this.subFilters.length-1),this.subFilters.forEach(t=>{t.applyTo(e)})}toObject(){return{type:this.type,subFilters:this.subFilters.map(e=>e.toObject())}}isNeutralState(){return!this.subFilters.some(e=>!e.isNeutralState())}static fromObject(e,t){return Promise.all((e.subFilters||[]).map(r=>$.getClass(r.type).fromObject(r,t))).then(r=>new this({subFilters:r}))}}M(gu,"type","Composed"),$.setClass(gu);class hi extends We{getFragmentSource(){return` + }`}applyTo2d(e){const t=e.imageData.data,i=this.matrix,n=this.colorsOnly;for(let s=0;s0&&arguments[0]!==void 0?arguments[0]:{};super(e),this.subFilters=e.subFilters||[]}applyTo(e){wf(e)&&(e.passes+=this.subFilters.length-1),this.subFilters.forEach(t=>{t.applyTo(e)})}toObject(){return{type:this.type,subFilters:this.subFilters.map(e=>e.toObject())}}isNeutralState(){return!this.subFilters.some(e=>!e.isNeutralState())}static fromObject(e,t){return Promise.all((e.subFilters||[]).map(i=>pt.getClass(i.type).fromObject(i,t))).then(i=>new this({subFilters:i}))}}Z(Qb,"type","Composed"),pt.setClass(Qb);class Mu extends pr{getFragmentSource(){return` precision highp float; uniform sampler2D uTexture; uniform float uContrast; @@ -211,7 +203,7 @@ Resulting to default behavior: removing object from previous canvas and adding t float contrastF = 1.015 * (uContrast + 1.0) / (1.0 * (1.015 - uContrast)); color.rgb = contrastF * (color.rgb - 0.5) + 0.5; gl_FragColor = color; - }`}isNeutralState(){return this.contrast===0}applyTo2d(e){let{imageData:{data:t}}=e;const r=Math.floor(255*this.contrast),n=259*(r+255)/(255*(259-r));for(let s=0;s=l||p<0||p>=a||(C=4*(b*a+p),y=n[S*s+k],d+=r[C]*y,f+=r[C+1]*y,g+=r[C+2]*y,h||(m+=r[C+3]*y));u[v]=d,u[v+1]=f,u[v+2]=g,u[v+3]=h?r[v+3]:m}e.imageData=c}sendUniformData(e,t){e.uniform1fv(t.uMatrix,this.matrix)}toObject(){return D(D({},super.toObject()),{},{opaque:this.opaque,matrix:[...this.matrix]})}}M(fi,"type","Convolute"),M(fi,"defaults",{opaque:!1,matrix:[0,0,0,0,1,0,0,0,0]}),M(fi,"uniformLocations",["uMatrix","uOpaque","uHalfSize","uSize"]),$.setClass(fi);const vd="Gamma";class di extends We{getFragmentSource(){return` + `};class Ru extends pr{getCacheKey(){return"".concat(this.type,"_").concat(Math.sqrt(this.matrix.length),"_").concat(this.opaque?1:0)}getFragmentSource(){return TO[this.getCacheKey()]}applyTo2d(e){const t=e.imageData,i=t.data,n=this.matrix,s=Math.round(Math.sqrt(n.length)),o=Math.floor(s/2),a=t.width,l=t.height,c=e.ctx.createImageData(a,l),d=c.data,u=this.opaque?1:0;let h,f,m,p,g,v,b,S,_,x,I,T,O;for(I=0;I=l||v<0||v>=a||(S=4*(b*a+v),_=n[O*s+T],h+=i[S]*_,f+=i[S+1]*_,m+=i[S+2]*_,u||(p+=i[S+3]*_));d[g]=h,d[g+1]=f,d[g+2]=m,d[g+3]=u?i[g+3]:p}e.imageData=c}sendUniformData(e,t){e.uniform1fv(t.uMatrix,this.matrix)}toObject(){return q(q({},super.toObject()),{},{opaque:this.opaque,matrix:[...this.matrix]})}}Z(Ru,"type","Convolute"),Z(Ru,"defaults",{opaque:!1,matrix:[0,0,0,0,1,0,0,0,0]}),Z(Ru,"uniformLocations",["uMatrix","uOpaque","uHalfSize","uSize"]),pt.setClass(Ru);const kT="Gamma";class Fu extends pr{getFragmentSource(){return` precision highp float; uniform sampler2D uTexture; uniform vec3 uGamma; @@ -369,7 +361,7 @@ Resulting to default behavior: removing object from previous canvas and adding t gl_FragColor = color; gl_FragColor.rgb *= color.a; } -`}constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(e),this.gamma=e.gamma||this.constructor.defaults.gamma.concat()}applyTo2d(e){let{imageData:{data:t}}=e;const r=this.gamma,n=1/r[0],s=1/r[1],o=1/r[2];this.rgbValues||(this.rgbValues={r:new Uint8Array(256),g:new Uint8Array(256),b:new Uint8Array(256)});const a=this.rgbValues;for(let l=0;l<256;l++)a.r[l]=255*Math.pow(l/255,n),a.g[l]=255*Math.pow(l/255,s),a.b[l]=255*Math.pow(l/255,o);for(let l=0;l0&&arguments[0]!==void 0?arguments[0]:{};super(e),this.gamma=e.gamma||this.constructor.defaults.gamma.concat()}applyTo2d(e){let{imageData:{data:t}}=e;const i=this.gamma,n=1/i[0],s=1/i[1],o=1/i[2];this.rgbValues||(this.rgbValues={r:new Uint8Array(256),g:new Uint8Array(256),b:new Uint8Array(256)});const a=this.rgbValues;for(let l=0;l<256;l++)a.r[l]=255*Math.pow(l/255,n),a.g[l]=255*Math.pow(l/255,s),a.b[l]=255*Math.pow(l/255,o);for(let l=0;ls[0]&&c>s[1]&&u>s[2]&&ls[0]&&c>s[1]&&d>s[2]&&l` - color += texture2D(uTexture, vTexCoord + `.concat(r,") * uTaps[").concat(n,"] + texture2D(uTexture, vTexCoord - ").concat(r,") * uTaps[").concat(n,`]; + `).concat(t.map((i,n)=>` + color += texture2D(uTexture, vTexCoord + `.concat(i,") * uTaps[").concat(n,"] + texture2D(uTexture, vTexCoord - ").concat(i,") * uTaps[").concat(n,`]; sum += 2.0 * uTaps[`).concat(n,`]; `)).join(` `),` gl_FragColor = color / sum; } - `)}applyToForWebgl(e){e.passes++,this.width=e.sourceWidth,this.horizontal=!0,this.dW=Math.round(this.width*this.scaleX),this.dH=e.sourceHeight,this.tempScale=this.dW/this.width,this.taps=this.getTaps(),e.destinationWidth=this.dW,super.applyTo(e),e.sourceWidth=e.destinationWidth,this.height=e.sourceHeight,this.horizontal=!1,this.dH=Math.round(this.height*this.scaleY),this.tempScale=this.dH/this.height,this.taps=this.getTaps(),e.destinationHeight=this.dH,super.applyTo(e),e.sourceHeight=e.destinationHeight}applyTo(e){gs(e)?this.applyToForWebgl(e):this.applyTo2d(e)}isNeutralState(){return this.scaleX===1&&this.scaleY===1}lanczosCreate(e){return t=>{if(t>=e||t<=-e)return 0;if(t<11920929e-14&&t>-11920929e-14)return 1;const r=(t*=Math.PI)/e;return Math.sin(t)/t*Math.sin(r)/r}}applyTo2d(e){const t=e.imageData,r=this.scaleX,n=this.scaleY;this.rcpScaleX=1/r,this.rcpScaleY=1/n;const s=t.width,o=t.height,a=Math.round(s*r),l=Math.round(o*n);let c;c=this.resizeType==="sliceHack"?this.sliceByTwo(e,s,o,a,l):this.resizeType==="hermite"?this.hermiteFastResize(e,s,o,a,l):this.resizeType==="bilinear"?this.bilinearFiltering(e,s,o,a,l):this.resizeType==="lanczos"?this.lanczosResize(e,s,o,a,l):new ImageData(a,l),e.imageData=c}sliceByTwo(e,t,r,n,s){const o=e.imageData,a=.5;let l=!1,c=!1,u=t*a,h=r*a;const d=e.filterBackend.resources;let f=0,g=0;const m=t;let v=0;d.sliceByTwo||(d.sliceByTwo=Xe());const p=d.sliceByTwo;(p.width<1.5*t||p.height=t)){A=Math.floor(1e3*Math.abs(x-p.x)),v[A]||(v[A]={});for(let P=b.y-m;P<=b.y+m;P++)P<0||P>=r||(E=Math.floor(1e3*Math.abs(P-p.y)),v[A][E]||(v[A][E]=c(Math.sqrt(Math.pow(A*d,2)+Math.pow(E*f,2))/1e3)),k=v[A][E],k>0&&(S=4*(P*t+x),O+=k,_+=k*o[S],W+=k*o[S+1],F+=k*o[S+2],R+=k*o[S+3]))}S=4*(w*n+y),l[S]=_/O,l[S+1]=W/O,l[S+2]=F/O,l[S+3]=R/O}return++y1&&A<-1||(v=2*A*A*A-3*A*A+1,v>0&&(R=4*(F+S*t),x+=v*u[R+3],b+=v,u[R+3]<255&&(v=v*u[R+3]/250),C+=v*u[R],y+=v*u[R+1],w+=v*u[R+2],p+=v))}}d[m]=C/p,d[m+1]=y/p,d[m+2]=w/p,d[m+3]=x/b}return h}}M(bi,"type","Resize"),M(bi,"defaults",{resizeType:"hermite",scaleX:1,scaleY:1,lanczosLobes:3}),M(bi,"uniformLocations",["uDelta","uTaps"]),$.setClass(bi);class yi extends We{getFragmentSource(){return` + `)}applyToForWebgl(e){e.passes++,this.width=e.sourceWidth,this.horizontal=!0,this.dW=Math.round(this.width*this.scaleX),this.dH=e.sourceHeight,this.tempScale=this.dW/this.width,this.taps=this.getTaps(),e.destinationWidth=this.dW,super.applyTo(e),e.sourceWidth=e.destinationWidth,this.height=e.sourceHeight,this.horizontal=!1,this.dH=Math.round(this.height*this.scaleY),this.tempScale=this.dH/this.height,this.taps=this.getTaps(),e.destinationHeight=this.dH,super.applyTo(e),e.sourceHeight=e.destinationHeight}applyTo(e){wf(e)?this.applyToForWebgl(e):this.applyTo2d(e)}isNeutralState(){return this.scaleX===1&&this.scaleY===1}lanczosCreate(e){return t=>{if(t>=e||t<=-e)return 0;if(t<11920929e-14&&t>-11920929e-14)return 1;const i=(t*=Math.PI)/e;return Math.sin(t)/t*Math.sin(i)/i}}applyTo2d(e){const t=e.imageData,i=this.scaleX,n=this.scaleY;this.rcpScaleX=1/i,this.rcpScaleY=1/n;const s=t.width,o=t.height,a=Math.round(s*i),l=Math.round(o*n);let c;c=this.resizeType==="sliceHack"?this.sliceByTwo(e,s,o,a,l):this.resizeType==="hermite"?this.hermiteFastResize(e,s,o,a,l):this.resizeType==="bilinear"?this.bilinearFiltering(e,s,o,a,l):this.resizeType==="lanczos"?this.lanczosResize(e,s,o,a,l):new ImageData(a,l),e.imageData=c}sliceByTwo(e,t,i,n,s){const o=e.imageData,a=.5;let l=!1,c=!1,d=t*a,u=i*a;const h=e.filterBackend.resources;let f=0,m=0;const p=t;let g=0;h.sliceByTwo||(h.sliceByTwo=mr());const v=h.sliceByTwo;(v.width<1.5*t||v.height=t)){k=Math.floor(1e3*Math.abs(I-v.x)),g[k]||(g[k]={});for(let M=b.y-p;M<=b.y+p;M++)M<0||M>=i||(D=Math.floor(1e3*Math.abs(M-v.y)),g[k][D]||(g[k][D]=c(Math.sqrt(Math.pow(k*h,2)+Math.pow(D*f,2))/1e3)),T=g[k][D],T>0&&(O=4*(M*t+I),E+=T,w+=T*o[O],X+=T*o[O+1],H+=T*o[O+2],Y+=T*o[O+3]))}O=4*(x*n+_),l[O]=w/E,l[O+1]=X/E,l[O+2]=H/E,l[O+3]=Y/E}return++_1&&k<-1||(g=2*k*k*k-3*k*k+1,g>0&&(Y=4*(H+O*t),I+=g*d[Y+3],b+=g,d[Y+3]<255&&(g=g*d[Y+3]/250),S+=g*d[Y],_+=g*d[Y+1],x+=g*d[Y+2],v+=g))}}h[p]=S/v,h[p+1]=_/v,h[p+2]=x/v,h[p+3]=I/b}return u}}Z(Vu,"type","Resize"),Z(Vu,"defaults",{resizeType:"hermite",scaleX:1,scaleY:1,lanczosLobes:3}),Z(Vu,"uniformLocations",["uDelta","uTaps"]),pt.setClass(Vu);class Uu extends pr{getFragmentSource(){return` precision highp float; uniform sampler2D uTexture; uniform float uSaturation; @@ -491,7 +483,7 @@ void main() { color.b += rgbMax != color.b ? (rgbMax - color.b) * uSaturation : 0.00; gl_FragColor = color; } -`}applyTo2d(e){let{imageData:{data:t}}=e;const r=-this.saturation;for(let n=0;n{let a=o.left-e.left,l=o.top-e.top,c=a*Math.cos(t)-l*Math.sin(t)+e.left,u=a*Math.sin(t)+l*Math.cos(t)+e.top;return new L(c,u)}).map(o=>o.y);return Math.max(...n)-Math.min(...n)}function Lp(i,...e){let t=-90,r=90,n=1;for(;r-t>n;){let o=t+(r-t)/3,a=r-(r-t)/3,l=i(o,...e),c=i(a,...e);l20&&(r=20),r<.01&&(r=.01),i.zoomToPoint({x:e.e.offsetX,y:e.e.offsetY},r),e.e.preventDefault(),e.e.stopPropagation()}),i.on("mouse:down",function(e){e.e.button===2&&(i.isDragging=!0,i.selection=!1,i.lastPosX=e.e.clientX,i.lastPosY=e.e.clientY)}),i.on("mouse:move",function(e){if(i.isDragging){let t=i.viewportTransform;t[4]+=e.e.clientX-i.lastPosX,t[5]+=e.e.clientY-i.lastPosY,i.requestRenderAll(),i.lastPosX=e.e.clientX,i.lastPosY=e.e.clientY}}),i.on("mouse:up",function(e){i.setViewportTransform(i.viewportTransform),i.isDragging=!1,i.selection=!0})}class Fp{constructor(e,t,r,n){this.root={x:e,y:t,w:r,h:n}}fit(e){var t,r,n,s=e.length;for(t=0;t=this.root.w+e,o=r&&this.root.w>=this.root.h+t;return s?this.growRight(e,t):o?this.growDown(e,t):n?this.growRight(e,t):r?this.growDown(e,t):null}growRight(e,t){this.root={used:!0,x:0,y:0,w:this.root.w+e,h:this.root.h,down:this.root,right:{x:this.root.w,y:0,w:e,h:this.root.h}};var r=this.findNode(this.root,e,t);return r?this.splitNode(r,e,t):null}growDown(e,t){this.root={used:!0,x:0,y:0,w:this.root.w,h:this.root.h+t,down:{x:0,y:this.root.h,w:this.root.w,h:t},right:this.root};var r=this.findNode(this.root,e,t);return r?this.splitNode(r,e,t):null}}function Rp(i){let e;return{c(){e=ve("canvas"),j(e,"width","600"),j(e,"height","400")},m(t,r){Y(t,e,r),i[6](e)},p:re,i:re,o:re,d(t){t&&V(e),i[6](null)}}}const mr=200;function Np(i,e,t){let{graph:r}=e,{layout:n}=e,s,o;const a=new Map,l=new Map,c=new Map;function u(p,b,C){p.angle=C;const y=new Nt([],{originX:"center",originY:"center",objectCaching:!1});return p.forEachObject(w=>{p.remove(w),y.add(w)}),o.remove(p),l.set(b,y),o.add(y),m(y),y.setCoords(),y}function h(p){if(!o)return;const b=10;let C=[];l.forEach((x,k)=>{let S=x;if(x._objects.length>1){const O=Lp(Ap,x);S=u(x,k,O)}C.push({w:S.width+b,h:S.height+b,componentId:k})});const y=o.getObjects().reduce((x,k)=>(k.isLCC&&(x.minLeft=Math.min(x.minLeft,k.left),x.minTop=Math.min(x.minTop,k.top),x.maxLeft=Math.max(x.maxLeft,k.left),x.maxTop=Math.max(x.maxTop,k.top)),x),{minLeft:1/0,minTop:1/0,maxLeft:-1/0,maxTop:-1/0});C.sort((x,k)=>x.w===k.w?k.h-x.h:k.w-x.w),new Fp(y.maxLeft+b+C[0].w/2,y.minTop,y.maxLeft-y.minLeft,y.maxTop-y.minTop).fit(C),C.forEach(x=>{if(x.fit){const k=l.get(x.componentId);k.left=x.fit.x,k.top=x.fit.y,k.setCoords(),m(k)}}),o.renderAll()}const d={controls:{mtr:Cp.createObjectDefaultControls().mtr}};Rt.createControls=()=>d,Nt.createControls=()=>d,Rt.ownDefaults=At($e({},Rt.ownDefaults),{lockScalingX:!0,lockScalingY:!0});function f(){o.discardActiveObject()}function g(){r.forEachNode(p=>{const b=c.get(p.id);if("component"in p.data){const y=new L(b.left,b.top).transform(b.group.calcTransformMatrix());n.setNodePosition(p.id,y.x-mr,y.y-mr)}else n.setNodePosition(p.id,b.left-mr,b.top-mr)})}function m(p,b=[1,0,0,1,0,0]){const C="_objects"in p;if(C){p._objects.forEach(x=>{m(x,p.calcTransformMatrix())});return}const w=new L(p.left,p.top).transform(C?p.calcTransformMatrix():b);p.linksDeparting.forEach(x=>{a.get(x).set({x1:w.x,y1:w.y})}),p.linksArriving.forEach(x=>{a.get(x).set({x2:w.x,y2:w.y})})}es(()=>{o=new pa(s,{fireRightClick:!0,stopContextMenu:!0}),jp(o),o.on({"object:moving":p=>m(p.target),"object:rotating":p=>m(p.target)}),r.forEachLink(p=>{const b=p.coords.map(y=>y+mr),C=new sr(b,{fill:null,stroke:"#909090",strokeWidth:1,selectable:!1,evented:!1,objectCaching:!1});a.set(p.id,C),o.add(C)}),r.forEachNode(p=>{const b=[],C=[];p.links&&p.links.forEach(x=>{x.fromId===p.id?b.push(x.id):C.push(x.id)});const y=n.getNodePosition(p.id),w=new kt({left:y.x+mr,top:y.y+mr,fill:p.data.color||"#000000",width:p.data.size||10,height:p.data.size||10,angle:90,hasControls:!1,originX:"center",originY:"center",objectCaching:!1,linksDeparting:b,linksArriving:C,isLCC:!("component"in p.data)});if(c.set(p.id,w),!p.data.component){o.add(w);return}if(!l.has(p.data.component)){const x=new Nt([w],{originX:"center",originY:"center",objectCaching:!1});l.set(p.data.component,x),o.add(x);return}l.get(p.data.component).add(w)}),o.requestRenderAll()}),Dh(()=>{g(),o.dispose()});function v(p){vt[p?"unshift":"push"](()=>{s=p,t(0,s)})}return i.$$set=p=>{"graph"in p&&t(1,r=p.graph),"layout"in p&&t(2,n=p.layout)},[s,r,n,h,f,g,v]}class Ip extends Ie{constructor(e){super(),Ne(this,e,Np,Rp,Ee,{graph:1,layout:2,packComponents:3,discardActiveSelection:4,persistNodePositions:5})}get packComponents(){return this.$$.ctx[3]}get discardActiveSelection(){return this.$$.ctx[4]}get persistNodePositions(){return this.$$.ctx[5]}}function Bp(i,e){return Cn.Graph.Layout.forceDirected(i,e)}function zp(i){const e=+this._x.call(null,i),t=+this._y.call(null,i);return _d(this.cover(e,t),e,t,i)}function _d(i,e,t,r){if(isNaN(e)||isNaN(t))return i;var n,s=i._root,o={data:r},a=i._x0,l=i._y0,c=i._x1,u=i._y1,h,d,f,g,m,v,p,b;if(!s)return i._root=o,i;for(;s.length;)if((m=e>=(h=(a+c)/2))?a=h:c=h,(v=t>=(d=(l+u)/2))?l=d:u=d,n=s,!(s=s[p=v<<1|m]))return n[p]=o,i;if(f=+i._x.call(null,s.data),g=+i._y.call(null,s.data),e===f&&t===g)return o.next=s,n?n[p]=o:i._root=o,i;do n=n?n[p]=new Array(4):i._root=new Array(4),(m=e>=(h=(a+c)/2))?a=h:c=h,(v=t>=(d=(l+u)/2))?l=d:u=d;while((p=v<<1|m)===(b=(g>=d)<<1|f>=h));return n[b]=s,n[p]=o,i}function Vp(i){var e,t,r=i.length,n,s,o=new Array(r),a=new Array(r),l=1/0,c=1/0,u=-1/0,h=-1/0;for(t=0;tu&&(u=n),sh&&(h=s));if(l>u||c>h)return this;for(this.cover(l,c).cover(u,h),t=0;ti||i>=n||r>e||e>=s;)switch(c=(eu||(a=g.y0)>h||(l=g.x1)=p)<<1|i>=v)&&(g=d[d.length-1],d[d.length-1]=d[d.length-1-m],d[d.length-1-m]=g)}else{var b=i-+this._x.call(null,f.data),C=e-+this._y.call(null,f.data),y=b*b+C*C;if(y=(d=(o+l)/2))?o=d:l=d,(m=h>=(f=(a+c)/2))?a=f:c=f,e=t,!(t=t[v=m<<1|g]))return this;if(!t.length)break;(e[v+1&3]||e[v+2&3]||e[v+3&3])&&(r=e,p=v)}for(;t.data!==i;)if(n=t,!(t=t.next))return this;return(s=t.next)&&delete t.next,n?(s?n.next=s:delete n.next,this):e?(s?e[v]=s:delete e[v],(t=e[0]||e[1]||e[2]||e[3])&&t===(e[3]||e[2]||e[1]||e[0])&&!t.length&&(r?r[p]=t:this._root=t),this):(this._root=s,this)}function qp(i){for(var e=0,t=i.length;e[e(w,x,o),w])),y;for(v=0,a=new Array(p);v{}};function yd(){for(var i=0,e=arguments.length,t={},r;i=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}})}Mi.prototype=yd.prototype={constructor:Mi,on:function(i,e){var t=this._,r=sv(i+"",t),n,s=-1,o=r.length;if(arguments.length<2){for(;++s0)for(var t=new Array(n),r=0,n,s;r=0&&i._call.call(void 0,e),i=i._next;--Qr}function _u(){Tr=(Ki=Fn.now())+ms,Qr=bn=0;try{lv()}finally{Qr=0,uv(),Tr=0}}function cv(){var i=Fn.now(),e=i-Ki;e>wd&&(ms-=e,Ki=i)}function uv(){for(var i,e=Ui,t,r=1/0;e;)e._call?(r>e._time&&(r=e._time),i=e,e=e._next):(t=e._next,e._next=null,e=i?i._next=t:Ui=t);yn=i,ya(r)}function ya(i){if(!Qr){bn&&(bn=clearTimeout(bn));var e=i-Tr;e>24?(i<1/0&&(bn=setTimeout(_u,i-Fn.now()-ms)),gn&&(gn=clearInterval(gn))):(gn||(Ki=Fn.now(),gn=setInterval(cv,wd)),Qr=1,Cd(_u))}}const hv=1664525,fv=1013904223,bu=4294967296;function dv(){let i=1;return()=>(i=(hv*i+fv)%bu)/bu}function gv(i){return i.x}function mv(i){return i.y}var pv=10,vv=Math.PI*(3-Math.sqrt(5));function _v(i){var e,t=1,r=.001,n=1-Math.pow(r,1/300),s=0,o=.6,a=new Map,l=kd(h),c=yd("tick","end"),u=dv();i==null&&(i=[]);function h(){d(),c.call("tick",e),t1?(v==null?a.delete(m):a.set(m,g(v)),e):a.get(m)},find:function(m,v,p){var b=0,C=i.length,y,w,x,k,S;for(p==null?p=1/0:p*=p,b=0;b1?(c.on(m,v),e):c.on(m)}}}function bv(){var i,e,t,r,n=En(-30),s,o=1,a=1/0,l=.81;function c(f){var g,m=i.length,v=bd(i,gv,mv).visitAfter(h);for(r=f,g=0;g=a)return;(f.data!==e||f.next)&&(p===0&&(p=Xr(t),y+=p*p),b===0&&(b=Xr(t),y+=b*b),y{const c={id:l.id},u=t.length;t.push(c),n.set(l.id,u)}),i.forEachLink(l=>{const c=n.get(l.fromId),u=n.get(l.toId),h=r.length,d={source:c,target:u,index:h};r.push(d),s.set(l.id,d)});var o=_v(t).alphaDecay(e.alphaDecay).velocityDecay(e.velocityDecay).force("charge",bv().strength(e.strength)).force("link",nv(r).distance(e.distance).iterations(e.iterations));return o.stop(),{simulator:o,step:function(){o.tick()},getNodePosition:a,getLinkPosition:function(l){var c=s.get(l);return{from:c.source,to:c.target}},getGraphRect:function(){var l=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,h=Number.NEGATIVE_INFINITY;return t.forEach(function(d){d.xu&&(u=d.x),d.yh&&(h=d.y)}),{x1:l,x2:u,y1:c,y2:h}},isNodePinned:function(){return!1},pinNode:function(){},dispose:function(){},setNodePosition:function(l,c,u){var h=a(l);h.x=c,h.y=u}};function a(l){var c=n.get(l);return t[c]}}const pr=(i,e)=>t=>{i.simulator[e](t.target.value)},Sd=[{value:"viva",name:"@anvaka/VivaGraphJS",spec:Bp,settings:[{id:"springLength",name:"Spring length",type:"range",min:1,max:100,step:1,value:100,effectorFn:pr},{id:"springCoeff",name:"Spring coefficient",type:"range",min:1e-4,max:.0025,step:1e-5,value:2e-4,effectorFn:pr},{id:"dragCoeff",name:"Drag coefficient",type:"range",min:.01,max:1,step:.01,value:.01,effectorFn:pr},{id:"gravity",name:"Gravity",type:"range",min:-2,max:-.1,step:.1,value:-.4,effectorFn:pr},{id:"timeStep",name:"Time step",type:"range",min:1,max:100,step:1,value:10,effectorFn:pr}]},{value:"d3",name:"@d3/d3-force",spec:yv,settings:[{id:"alphaDecay",name:"Temperature decay",type:"range",min:0,max:1,step:.001,value:.0228,effectorFn:pr},{id:"velocityDecay",name:"Velocity decay",type:"range",min:0,max:1,step:.01,value:.4,effectorFn:pr},{id:"strength",name:"Node repulsion",type:"range",min:0,max:200,step:.1,value:30,effectorFn:(i,e)=>t=>{i.simulator.force("charge")[e](-t.target.value)}},{id:"distance",name:"Link distance",type:"range",min:0,max:100,step:1,value:30,effectorFn:(i,e)=>t=>{i.simulator.force("link")[e](t.target.value)}},{id:"iterations",name:"Link rigidity",type:"range",min:0,max:200,step:.1,value:30,effectorFn:(i,e)=>t=>{i.simulator.force("link")[e](t.target.value)}}]}],wv=i=>{const e=i.nodes[0],t=Object.keys(e)[0];return r=>({id:r[t],data:r})},Cv=i=>{const e=i.links[0],t=Object.keys(e)[0],r=Object.keys(e)[1];return n=>({fromId:n[t],toId:n[r],data:n})};function xv(i){const e=i-1;return e*e*e+1}function Zi(i,{delay:e=0,duration:t=400,easing:r=xv,x:n=0,y:s=0,opacity:o=0}={}){const a=getComputedStyle(i),l=+a.opacity,c=a.transform==="none"?"":a.transform,u=l*(1-o),[h,d]=_l(n),[f,g]=_l(s);return{delay:e,duration:t,easing:r,css:(m,v)=>` - transform: ${c} translate(${(1-m)*h}${d}, ${(1-m)*f}${g}); - opacity: ${l-u*v}`}}const ll="-",kv=i=>{const e=Tv(i),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=i;return{getClassGroupId:o=>{const a=o.split(ll);return a[0]===""&&a.length!==1&&a.shift(),Td(a,e)||Sv(o)},getConflictingClassGroupIds:(o,a)=>{const l=t[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Td=(i,e)=>{var o;if(i.length===0)return e.classGroupId;const t=i[0],r=e.nextPart.get(t),n=r?Td(i.slice(1),r):void 0;if(n)return n;if(e.validators.length===0)return;const s=i.join(ll);return(o=e.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},yu=/^\[(.+)\]$/,Sv=i=>{if(yu.test(i)){const e=yu.exec(i)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},Tv=i=>{const{theme:e,prefix:t}=i,r={nextPart:new Map,validators:[]};return Ov(Object.entries(i.classGroups),t).forEach(([s,o])=>{wa(o,r,s,e)}),r},wa=(i,e,t,r)=>{i.forEach(n=>{if(typeof n=="string"){const s=n===""?e:wu(e,n);s.classGroupId=t;return}if(typeof n=="function"){if(Ev(n)){wa(n(r),e,t,r);return}e.validators.push({validator:n,classGroupId:t});return}Object.entries(n).forEach(([s,o])=>{wa(o,wu(e,s),t,r)})})},wu=(i,e)=>{let t=i;return e.split(ll).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},Ev=i=>i.isThemeGetter,Ov=(i,e)=>e?i.map(([t,r])=>{const n=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[e+o,a])):s);return[t,n]}):i,Dv=i=>{if(i<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,r=new Map;const n=(s,o)=>{t.set(s,o),e++,e>i&&(e=0,r=t,t=new Map)};return{get(s){let o=t.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return n(s,o),o},set(s,o){t.has(s)?t.set(s,o):n(s,o)}}},Ed="!",Mv=i=>{const{separator:e,experimentalParseClassName:t}=i,r=e.length===1,n=e[0],s=e.length,o=a=>{const l=[];let c=0,u=0,h;for(let v=0;vu?h-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:g,maybePostfixModifierPosition:m}};return t?a=>t({className:a,parseClassName:o}):o},Pv=i=>{if(i.length<=1)return i;const e=[];let t=[];return i.forEach(r=>{r[0]==="["?(e.push(...t.sort(),r),t=[]):t.push(r)}),e.push(...t.sort()),e},Av=i=>$e({cache:Dv(i.cacheSize),parseClassName:Mv(i)},kv(i)),Lv=/\s+/,jv=(i,e)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:n}=e,s=[],o=i.trim().split(Lv);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:f}=t(c);let g=!!f,m=r(g?d.substring(0,f):d);if(!m){if(!g){a=c+(a.length>0?" "+a:a);continue}if(m=r(d),!m){a=c+(a.length>0?" "+a:a);continue}g=!1}const v=Pv(u).join(":"),p=h?v+Ed:v,b=p+m;if(s.includes(b))continue;s.push(b);const C=n(m,g);for(let y=0;y0?" "+a:a)}return a};function Od(){let i=0,e,t,r="";for(;i{if(typeof i=="string")return i;let e,t="";for(let r=0;rh(u),i());return t=Av(c),r=t.cache.get,n=t.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=jv(l,t);return n(l,u),u}return function(){return s(Od.apply(null,arguments))}}const Oe=i=>{const e=t=>t[i]||[];return e.isThemeGetter=!0,e},Md=/^\[(?:([a-z-]+):)?(.+)\]$/i,Rv=/^\d+\/\d+$/,Nv=new Set(["px","full","screen"]),Iv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bv=/\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$/,zv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Vv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yt=i=>Ur(i)||Nv.has(i)||Rv.test(i),rr=i=>cn(i,"length",Zv),Ur=i=>!!i&&!Number.isNaN(Number(i)),Ho=i=>cn(i,"number",Ur),mn=i=>!!i&&Number.isInteger(Number(i)),Xv=i=>i.endsWith("%")&&Ur(i.slice(0,-1)),le=i=>Md.test(i),nr=i=>Iv.test(i),Wv=new Set(["length","size","percentage"]),Gv=i=>cn(i,Wv,Pd),Hv=i=>cn(i,"position",Pd),qv=new Set(["image","url"]),Uv=i=>cn(i,qv,Qv),Kv=i=>cn(i,"",Jv),pn=()=>!0,cn=(i,e,t)=>{const r=Md.exec(i);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):t(r[2]):!1},Zv=i=>Bv.test(i)&&!zv.test(i),Pd=()=>!1,Jv=i=>Vv.test(i),Qv=i=>Yv.test(i),$v=()=>{const i=Oe("colors"),e=Oe("spacing"),t=Oe("blur"),r=Oe("brightness"),n=Oe("borderColor"),s=Oe("borderRadius"),o=Oe("borderSpacing"),a=Oe("borderWidth"),l=Oe("contrast"),c=Oe("grayscale"),u=Oe("hueRotate"),h=Oe("invert"),d=Oe("gap"),f=Oe("gradientColorStops"),g=Oe("gradientColorStopPositions"),m=Oe("inset"),v=Oe("margin"),p=Oe("opacity"),b=Oe("padding"),C=Oe("saturate"),y=Oe("scale"),w=Oe("sepia"),x=Oe("skew"),k=Oe("space"),S=Oe("translate"),O=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto",le,e],F=()=>[le,e],R=()=>["",Yt,rr],A=()=>["auto",Ur,le],E=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],P=()=>["solid","dashed","dotted","double","none"],T=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",le],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],se=()=>[Ur,le];return{cacheSize:500,separator:":",theme:{colors:[pn],spacing:[Yt,rr],blur:["none","",nr,le],brightness:se(),borderColor:[i],borderRadius:["none","","full",nr,le],borderSpacing:F(),borderWidth:R(),contrast:se(),grayscale:q(),hueRotate:se(),invert:q(),gap:F(),gradientColorStops:[i],gradientColorStopPositions:[Xv,rr],inset:W(),margin:W(),opacity:se(),padding:F(),saturate:se(),scale:se(),sepia:q(),skew:se(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",le]}],container:["container"],columns:[{columns:[nr]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"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"],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:[...E(),le]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",mn,le]}],basis:[{basis:W()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",le]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",mn,le]}],"grid-cols":[{"grid-cols":[pn]}],"col-start-end":[{col:["auto",{span:["full",mn,le]},le]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[pn]}],"row-start-end":[{row:["auto",{span:[mn,le]},le]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",le]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",le,e]}],"min-w":[{"min-w":[le,e,"min","max","fit"]}],"max-w":[{"max-w":[le,e,"none","full","min","max","fit","prose",{screen:[nr]},nr]}],h:[{h:[le,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[le,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[le,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[le,e,"auto","min","max","fit"]}],"font-size":[{text:["base",nr,rr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ho]}],"font-family":[{font:[pn]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",le]}],"line-clamp":[{"line-clamp":["none",Ur,Ho]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Yt,le]}],"list-image":[{"list-image":["none",le]}],"list-style-type":[{list:["none","disc","decimal",le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[i]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[i]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...P(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Yt,rr]}],"underline-offset":[{"underline-offset":["auto",Yt,le]}],"text-decoration-color":[{decoration:[i]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...E(),Hv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Gv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Uv]}],"bg-color":[{bg:[i]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...P(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[p]}],"divide-style":[{divide:P()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...P()]}],"outline-offset":[{"outline-offset":[Yt,le]}],"outline-w":[{outline:[Yt,rr]}],"outline-color":[{outline:[i]}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[i]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[Yt,rr]}],"ring-offset-color":[{"ring-offset":[i]}],shadow:[{shadow:["","inner","none",nr,Kv]}],"shadow-color":[{shadow:[pn]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...T(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":T()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",nr,le]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[C]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",le]}],duration:[{duration:se()}],ease:[{ease:["linear","in","out","in-out",le]}],delay:[{delay:se()}],animate:[{animate:["none","spin","ping","pulse","bounce",le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[mn,le]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[x]}],"skew-y":[{"skew-y":[x]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",le]}],accent:[{accent:["auto",i]}],appearance:[{appearance:["none","auto"]}],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",le]}],"caret-color":[{caret:[i]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"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",le]}],fill:[{fill:[i,"none"]}],"stroke-w":[{stroke:[Yt,rr,Ho]}],stroke:[{stroke:[i,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},oe=Fv($v);function e1(i){let e=i[1],t,r,n=i[1]&&qo(i);return{c(){n&&n.c(),t=he()},m(s,o){n&&n.m(s,o),Y(s,t,o),r=!0},p(s,o){s[1]?e?Ee(e,s[1])?(n.d(1),n=qo(s),e=s[1],n.c(),n.m(t.parentNode,t)):n.p(s,o):(n=qo(s),e=s[1],n.c(),n.m(t.parentNode,t)):e&&(n.d(1),n=null,e=s[1])},i(s){r||(G(n,s),r=!0)},o(s){U(n,s),r=!1},d(s){s&&V(t),n&&n.d(s)}}}function t1(i){let e=i[1],t,r=!1,n,s=i[1]&&Uo(i);return{c(){s&&s.c(),t=he()},m(o,a){s&&s.m(o,a),Y(o,t,a),n=!0},p(o,a){o[1]?e?Ee(e,o[1])?(s.d(1),s=Uo(o),e=o[1],s.c(),r&&(r=!1,G(s)),s.m(t.parentNode,t)):(r&&(r=!1,G(s)),s.p(o,a)):(s=Uo(o),e=o[1],s.c(),G(s),s.m(t.parentNode,t)):e&&(r=!0,qe(),U(s,1,1,()=>{s=null,e=o[1],r=!1}),Ue())},i(o){n||(G(s,o),n=!0)},o(o){U(s,o),n=!1},d(o){o&&V(t),s&&s.d(o)}}}function qo(i){let e,t,r,n,s;const o=i[15].default,a=Ke(o,i,i[14],null);let l=[{role:i[4]},i[9],{class:i[8]}],c={};for(let u=0;u{n&&(r||(r=wl(e,i[5],i[6],!0)),r.run(1))}),n=!0)},o(h){U(l,h),h&&(r||(r=wl(e,i[5],i[6],!1)),r.run(0)),n=!1},d(h){h&&V(e),l&&l.d(h),i[26](null),h&&r&&r.end(),s=!1,Re(o)}}}function r1(i){let e,t,r,n;const s=[t1,e1],o=[];function a(l,c){return l[5]&&l[7]?0:l[7]?1:-1}return~(e=a(i))&&(t=o[e]=s[e](i)),{c(){t&&t.c(),r=he()},m(l,c){~e&&o[e].m(l,c),Y(l,r,c),n=!0},p(l,c){let u=e;e=a(l),e===u?~e&&o[e].p(l,c):(t&&(qe(),U(o[u],1,1,()=>{o[u]=null}),Ue()),~e?(t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),G(t,1),t.m(r.parentNode,r)):t=null)},i(l){n||(G(t),n=!0)},o(l){U(t),n=!1},d(l){l&&V(r),~e&&o[e].d(l)}}}const n1={gray:"bg-gray-50 dark:bg-gray-800",red:"bg-red-50 dark:bg-gray-800",yellow:"bg-yellow-50 dark:bg-gray-800 ",green:"bg-green-50 dark:bg-gray-800 ",indigo:"bg-indigo-50 dark:bg-gray-800 ",purple:"bg-purple-50 dark:bg-gray-800 ",pink:"bg-pink-50 dark:bg-gray-800 ",blue:"bg-blue-50 dark:bg-gray-800 ",light:"bg-gray-50 dark:bg-gray-700",dark:"bg-gray-50 dark:bg-gray-800",default:"bg-white dark:bg-gray-800",dropdown:"bg-white dark:bg-gray-700",navbar:"bg-white dark:bg-gray-900",navbarUl:"bg-gray-50 dark:bg-gray-800",form:"bg-gray-50 dark:bg-gray-700",primary:"bg-primary-50 dark:bg-gray-800 ",orange:"bg-orange-50 dark:bg-orange-800",none:""};function i1(i,e,t){const r=["tag","color","rounded","border","shadow","node","use","options","role","transition","params","open"];let n=ge(e,r),{$$slots:s={},$$scope:o}=e;const a=()=>{};Qo("background",!0);let{tag:l=n.href?"a":"div"}=e,{color:c="default"}=e,{rounded:u=!1}=e,{border:h=!1}=e,{shadow:d=!1}=e,{node:f=void 0}=e,{use:g=a}=e,{options:m={}}=e,{role:v=void 0}=e,{transition:p=void 0}=e,{params:b={}}=e,{open:C=!0}=e;const y=Mh(),w={gray:"text-gray-800 dark:text-gray-300",red:"text-red-800 dark:text-red-400",yellow:"text-yellow-800 dark:text-yellow-300",green:"text-green-800 dark:text-green-400",indigo:"text-indigo-800 dark:text-indigo-400",purple:"text-purple-800 dark:text-purple-400",pink:"text-pink-800 dark:text-pink-400",blue:"text-blue-800 dark:text-blue-400",light:"text-gray-700 dark:text-gray-300",dark:"text-gray-700 dark:text-gray-300",default:"text-gray-500 dark:text-gray-400",dropdown:"text-gray-700 dark:text-gray-200",navbar:"text-gray-700 dark:text-gray-200",navbarUl:"text-gray-700 dark:text-gray-400",form:"text-gray-900 dark:text-white",primary:"text-primary-800 dark:text-primary-400",orange:"text-orange-800 dark:text-orange-400",none:""},x={gray:"border-gray-300 dark:border-gray-800 divide-gray-300 dark:divide-gray-800",red:"border-red-300 dark:border-red-800 divide-red-300 dark:divide-red-800",yellow:"border-yellow-300 dark:border-yellow-800 divide-yellow-300 dark:divide-yellow-800",green:"border-green-300 dark:border-green-800 divide-green-300 dark:divide-green-800",indigo:"border-indigo-300 dark:border-indigo-800 divide-indigo-300 dark:divide-indigo-800",purple:"border-purple-300 dark:border-purple-800 divide-purple-300 dark:divide-purple-800",pink:"border-pink-300 dark:border-pink-800 divide-pink-300 dark:divide-pink-800",blue:"border-blue-300 dark:border-blue-800 divide-blue-300 dark:divide-blue-800",light:"border-gray-500 divide-gray-500",dark:"border-gray-500 divide-gray-500",default:"border-gray-200 dark:border-gray-700 divide-gray-200 dark:divide-gray-700",dropdown:"border-gray-100 dark:border-gray-600 divide-gray-100 dark:divide-gray-600",navbar:"border-gray-100 dark:border-gray-700 divide-gray-100 dark:divide-gray-700",navbarUl:"border-gray-100 dark:border-gray-700 divide-gray-100 dark:divide-gray-700",form:"border-gray-300 dark:border-gray-700 divide-gray-300 dark:divide-gray-700",primary:"border-primary-500 dark:border-primary-200 divide-primary-500 dark:divide-primary-200 ",orange:"border-orange-300 dark:border-orange-800 divide-orange-300 dark:divide-orange-800",none:""};let k;function S(B){z.call(this,i,B)}function O(B){z.call(this,i,B)}function _(B){z.call(this,i,B)}function W(B){z.call(this,i,B)}function F(B){z.call(this,i,B)}function R(B){z.call(this,i,B)}function A(B){z.call(this,i,B)}function E(B){z.call(this,i,B)}function P(B){z.call(this,i,B)}function T(B){z.call(this,i,B)}function N(B){vt[B?"unshift":"push"](()=>{f=B,t(0,f)})}function q(B){vt[B?"unshift":"push"](()=>{f=B,t(0,f)})}return i.$$set=B=>{t(32,e=Q(Q({},e),de(B))),t(9,n=ge(e,r)),"tag"in B&&t(1,l=B.tag),"color"in B&&t(10,c=B.color),"rounded"in B&&t(11,u=B.rounded),"border"in B&&t(12,h=B.border),"shadow"in B&&t(13,d=B.shadow),"node"in B&&t(0,f=B.node),"use"in B&&t(2,g=B.use),"options"in B&&t(3,m=B.options),"role"in B&&t(4,v=B.role),"transition"in B&&t(5,p=B.transition),"params"in B&&t(6,b=B.params),"open"in B&&t(7,C=B.open),"$$scope"in B&&t(14,o=B.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&128&&y(C?"open":"close"),i.$$.dirty[0]&128&&y("show",C),i.$$.dirty[0]&1024&&t(10,c=c!=null?c:"default"),i.$$.dirty[0]&1024&&Qo("color",c),t(8,k=oe(n1[c],w[c],u&&"rounded-lg",h&&"border",x[c],d&&"shadow-md",e.class))},e=de(e),[f,l,g,m,v,p,b,C,k,n,c,u,h,d,o,s,S,O,_,W,F,R,A,E,P,T,N,q]}class s1 extends Ie{constructor(e){super(),Ne(this,e,i1,r1,Ee,{tag:1,color:10,rounded:11,border:12,shadow:13,node:0,use:2,options:3,role:4,transition:5,params:6,open:7},null,[-1,-1])}}function o1(i){let e=i[2],t,r,n=i[2]&&Ko(i);return{c(){n&&n.c(),t=he()},m(s,o){n&&n.m(s,o),Y(s,t,o),r=!0},p(s,o){s[2]?e?Ee(e,s[2])?(n.d(1),n=Ko(s),e=s[2],n.c(),n.m(t.parentNode,t)):n.p(s,o):(n=Ko(s),e=s[2],n.c(),n.m(t.parentNode,t)):e&&(n.d(1),n=null,e=s[2])},i(s){r||(G(n,s),r=!0)},o(s){U(n,s),r=!1},d(s){s&&V(t),n&&n.d(s)}}}function a1(i){let e,t,r,n;const s=i[13].default,o=Ke(s,i,i[12],null);let a=[{type:i[1]},i[5],{disabled:i[3]},{class:i[4]}],l={};for(let c=0;c{o[u]=null}),Ue(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),G(t,1),t.m(r.parentNode,r))},i(l){n||(G(t),n=!0)},o(l){U(t),n=!1},d(l){l&&V(r),o[e].d(l)}}}function u1(i,e,t){const r=["pill","outline","size","href","type","color","shadow","tag","checked","disabled"];let n=ge(e,r),{$$slots:s={},$$scope:o}=e;const a=Pt("group");let{pill:l=!1}=e,{outline:c=!1}=e,{size:u=a?"sm":"md"}=e,{href:h=void 0}=e,{type:d="button"}=e,{color:f=a?c?"dark":"alternative":"primary"}=e,{shadow:g=!1}=e,{tag:m="button"}=e,{checked:v=void 0}=e,{disabled:p=!1}=e;const b={alternative:"text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-400 hover:text-primary-700 focus-within:text-primary-700 dark:focus-within:text-white dark:hover:text-white dark:hover:bg-gray-700",blue:"text-white bg-blue-700 hover:bg-blue-800 dark:bg-blue-600 dark:hover:bg-blue-700",dark:"text-white bg-gray-800 hover:bg-gray-900 dark:bg-gray-800 dark:hover:bg-gray-700",green:"text-white bg-green-700 hover:bg-green-800 dark:bg-green-600 dark:hover:bg-green-700",light:"text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600",primary:"text-white bg-primary-700 hover:bg-primary-800 dark:bg-primary-600 dark:hover:bg-primary-700",purple:"text-white bg-purple-700 hover:bg-purple-800 dark:bg-purple-600 dark:hover:bg-purple-700",red:"text-white bg-red-700 hover:bg-red-800 dark:bg-red-600 dark:hover:bg-red-700",yellow:"text-white bg-yellow-400 hover:bg-yellow-500 ",none:""},C={alternative:"text-primary-700 border dark:text-primary-500 bg-gray-100 dark:bg-gray-700 border-gray-300 shadow-gray-300 dark:shadow-gray-800 shadow-inner",blue:"text-blue-900 bg-blue-400 dark:bg-blue-500 shadow-blue-700 dark:shadow-blue-800 shadow-inner",dark:"text-white bg-gray-500 dark:bg-gray-600 shadow-gray-800 dark:shadow-gray-900 shadow-inner",green:"text-green-900 bg-green-400 dark:bg-green-500 shadow-green-700 dark:shadow-green-800 shadow-inner",light:"text-gray-900 bg-gray-100 border border-gray-300 dark:bg-gray-500 dark:text-gray-900 dark:border-gray-700 shadow-gray-300 dark:shadow-gray-700 shadow-inner",primary:"text-primary-900 bg-primary-400 dark:bg-primary-500 shadow-primary-700 dark:shadow-primary-800 shadow-inner",purple:"text-purple-900 bg-purple-400 dark:bg-purple-500 shadow-purple-700 dark:shadow-purple-800 shadow-inner",red:"text-red-900 bg-red-400 dark:bg-red-500 shadow-red-700 dark:shadow-red-800 shadow-inner",yellow:"text-yellow-900 bg-yellow-300 dark:bg-yellow-400 shadow-yellow-500 dark:shadow-yellow-700 shadow-inner",none:""},y={alternative:"focus-within:ring-gray-200 dark:focus-within:ring-gray-700",blue:"focus-within:ring-blue-300 dark:focus-within:ring-blue-800",dark:"focus-within:ring-gray-300 dark:focus-within:ring-gray-700",green:"focus-within:ring-green-300 dark:focus-within:ring-green-800",light:"focus-within:ring-gray-200 dark:focus-within:ring-gray-700",primary:"focus-within:ring-primary-300 dark:focus-within:ring-primary-800",purple:"focus-within:ring-purple-300 dark:focus-within:ring-purple-900",red:"focus-within:ring-red-300 dark:focus-within:ring-red-900",yellow:"focus-within:ring-yellow-300 dark:focus-within:ring-yellow-900",none:""},w={alternative:"shadow-gray-500/50 dark:shadow-gray-800/80",blue:"shadow-blue-500/50 dark:shadow-blue-800/80",dark:"shadow-gray-500/50 dark:shadow-gray-800/80",green:"shadow-green-500/50 dark:shadow-green-800/80",light:"shadow-gray-500/50 dark:shadow-gray-800/80",primary:"shadow-primary-500/50 dark:shadow-primary-800/80",purple:"shadow-purple-500/50 dark:shadow-purple-800/80",red:"shadow-red-500/50 dark:shadow-red-800/80 ",yellow:"shadow-yellow-500/50 dark:shadow-yellow-800/80 ",none:""},x={alternative:"text-gray-900 dark:text-gray-400 hover:text-white border border-gray-800 hover:bg-gray-900 focus-within:bg-gray-900 focus-within:text-white focus-within:ring-gray-300 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-600 dark:focus-within:ring-gray-800",blue:"text-blue-700 hover:text-white border border-blue-700 hover:bg-blue-800 dark:border-blue-500 dark:text-blue-500 dark:hover:text-white dark:hover:bg-blue-600",dark:"text-gray-900 hover:text-white border border-gray-800 hover:bg-gray-900 focus-within:bg-gray-900 focus-within:text-white dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-600",green:"text-green-700 hover:text-white border border-green-700 hover:bg-green-800 dark:border-green-500 dark:text-green-500 dark:hover:text-white dark:hover:bg-green-600",light:"text-gray-500 hover:text-gray-900 bg-white border border-gray-200 dark:border-gray-600 dark:hover:text-white dark:text-gray-400 hover:bg-gray-50 dark:bg-gray-700 dark:hover:bg-gray-600",primary:"text-primary-700 hover:text-white border border-primary-700 hover:bg-primary-700 dark:border-primary-500 dark:text-primary-500 dark:hover:text-white dark:hover:bg-primary-600",purple:"text-purple-700 hover:text-white border border-purple-700 hover:bg-purple-800 dark:border-purple-400 dark:text-purple-400 dark:hover:text-white dark:hover:bg-purple-500",red:"text-red-700 hover:text-white border border-red-700 hover:bg-red-800 dark:border-red-500 dark:text-red-500 dark:hover:text-white dark:hover:bg-red-600",yellow:"text-yellow-400 hover:text-white border border-yellow-400 hover:bg-yellow-500 dark:border-yellow-300 dark:text-yellow-300 dark:hover:text-white dark:hover:bg-yellow-400",none:""},k={xs:"px-3 py-2 text-xs",sm:"px-4 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},S=()=>c||f==="alternative"||f==="light";let O;function _(I){z.call(this,i,I)}function W(I){z.call(this,i,I)}function F(I){z.call(this,i,I)}function R(I){z.call(this,i,I)}function A(I){z.call(this,i,I)}function E(I){z.call(this,i,I)}function P(I){z.call(this,i,I)}function T(I){z.call(this,i,I)}function N(I){z.call(this,i,I)}function q(I){z.call(this,i,I)}function B(I){z.call(this,i,I)}function se(I){z.call(this,i,I)}function fe(I){z.call(this,i,I)}function Se(I){z.call(this,i,I)}function me(I){z.call(this,i,I)}function tt(I){z.call(this,i,I)}function Ge(I){z.call(this,i,I)}function Z(I){z.call(this,i,I)}return i.$$set=I=>{t(40,e=Q(Q({},e),de(I))),t(5,n=ge(e,r)),"pill"in I&&t(6,l=I.pill),"outline"in I&&t(7,c=I.outline),"size"in I&&t(8,u=I.size),"href"in I&&t(0,h=I.href),"type"in I&&t(1,d=I.type),"color"in I&&t(9,f=I.color),"shadow"in I&&t(10,g=I.shadow),"tag"in I&&t(2,m=I.tag),"checked"in I&&t(11,v=I.checked),"disabled"in I&&t(3,p=I.disabled),"$$scope"in I&&t(12,o=I.$$scope)},i.$$.update=()=>{t(4,O=oe("text-center font-medium",a?"focus-within:ring-2":"focus-within:ring-4",a&&"focus-within:z-10",a||"focus-within:outline-none","inline-flex items-center justify-center "+k[u],c&&v&&"border dark:border-gray-900",c&&v&&C[f],c&&!v&&x[f],!c&&v&&C[f],!c&&!v&&b[f],f==="alternative"&&(a&&!v?"dark:bg-gray-700 dark:text-white dark:border-gray-700 dark:hover:border-gray-600 dark:hover:bg-gray-600":"dark:bg-transparent dark:border-gray-600 dark:hover:border-gray-600"),c&&f==="dark"&&(a?v?"bg-gray-900 border-gray-800 dark:border-white dark:bg-gray-600":"dark:text-white border-gray-800 dark:border-white":"dark:text-gray-400 dark:border-gray-700"),y[f],S()&&a&&"[&:not(:first-child)]:-ms-px",a?l&&"first:rounded-s-full last:rounded-e-full"||"first:rounded-s-lg last:rounded-e-lg":l&&"rounded-full"||"rounded-lg",g&&"shadow-lg",g&&w[f],p&&"cursor-not-allowed opacity-50",e.class))},e=de(e),[h,d,m,p,O,n,l,c,u,f,g,v,o,s,_,W,F,R,A,E,P,T,N,q,B,se,fe,Se,me,tt,Ge,Z]}class ps extends Ie{constructor(e){super(),Ne(this,e,u1,c1,Ee,{pill:6,outline:7,size:8,href:0,type:1,color:9,shadow:10,tag:2,checked:11,disabled:3},null,[-1,-1])}}function h1(i){let e,t;const r=[i[3],{color:"none"},{class:i[1]}];let n={$$slots:{default:[d1]},$$scope:{ctx:i}};for(let s=0;s{o[u]=null}),Ue(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),G(t,1),t.m(r.parentNode,r))},i(l){n||(G(t),n=!0)},o(l){U(t),n=!1},d(l){l&&V(r),o[e].d(l)}}}function p1(i,e,t){const r=["color","shadow"];let n=ge(e,r),{$$slots:s={},$$scope:o}=e;const a=Pt("group");let{color:l="blue"}=e,{shadow:c=!1}=e;const u={blue:"text-white bg-gradient-to-r from-blue-500 via-blue-600 to-blue-700 hover:bg-gradient-to-br focus:ring-blue-300 dark:focus:ring-blue-800 ",green:"text-white bg-gradient-to-r from-green-400 via-green-500 to-green-600 hover:bg-gradient-to-br focus:ring-green-300 dark:focus:ring-green-800",cyan:"text-white bg-gradient-to-r from-cyan-400 via-cyan-500 to-cyan-600 hover:bg-gradient-to-br focus:ring-cyan-300 dark:focus:ring-cyan-800",teal:"text-white bg-gradient-to-r from-teal-400 via-teal-500 to-teal-600 hover:bg-gradient-to-br focus:ring-teal-300 dark:focus:ring-teal-800",lime:"text-gray-900 bg-gradient-to-r from-lime-200 via-lime-400 to-lime-500 hover:bg-gradient-to-br focus:ring-lime-300 dark:focus:ring-lime-800",red:"text-white bg-gradient-to-r from-red-400 via-red-500 to-red-600 hover:bg-gradient-to-br focus:ring-red-300 dark:focus:ring-red-800",pink:"text-white bg-gradient-to-r from-pink-400 via-pink-500 to-pink-600 hover:bg-gradient-to-br focus:ring-pink-300 dark:focus:ring-pink-800",purple:"text-white bg-gradient-to-r from-purple-500 via-purple-600 to-purple-700 hover:bg-gradient-to-br focus:ring-purple-300 dark:focus:ring-purple-800",purpleToBlue:"text-white bg-gradient-to-br from-purple-600 to-blue-500 hover:bg-gradient-to-bl focus:ring-blue-300 dark:focus:ring-blue-800",cyanToBlue:"text-white bg-gradient-to-r from-cyan-500 to-blue-500 hover:bg-gradient-to-bl focus:ring-cyan-300 dark:focus:ring-cyan-800",greenToBlue:"text-white bg-gradient-to-br from-green-400 to-blue-600 hover:bg-gradient-to-bl focus:ring-green-200 dark:focus:ring-green-800",purpleToPink:"text-white bg-gradient-to-r from-purple-500 to-pink-500 hover:bg-gradient-to-l focus:ring-purple-200 dark:focus:ring-purple-800",pinkToOrange:"text-white bg-gradient-to-br from-pink-500 to-orange-400 hover:bg-gradient-to-bl focus:ring-pink-200 dark:focus:ring-pink-800",tealToLime:"text-gray-900 bg-gradient-to-r from-teal-200 to-lime-200 hover:bg-gradient-to-l focus:ring-lime-200 dark:focus:ring-teal-700",redToYellow:"text-gray-900 bg-gradient-to-r from-red-200 via-red-300 to-yellow-200 hover:bg-gradient-to-bl focus:ring-red-100 dark:focus:ring-red-400"},h={blue:"shadow-blue-500/50 dark:shadow-blue-800/80",green:"shadow-green-500/50 dark:shadow-green-800/80",cyan:"shadow-cyan-500/50 dark:shadow-cyan-800/80",teal:"shadow-teal-500/50 dark:shadow-teal-800/80 ",lime:"shadow-lime-500/50 dark:shadow-lime-800/80",red:"shadow-red-500/50 dark:shadow-red-800/80 ",pink:"shadow-pink-500/50 dark:shadow-pink-800/80",purple:"shadow-purple-500/50 dark:shadow-purple-800/80",purpleToBlue:"shadow-blue-500/50 dark:shadow-blue-800/80",cyanToBlue:"shadow-cyan-500/50 dark:shadow-cyan-800/80",greenToBlue:"shadow-green-500/50 dark:shadow-green-800/80",purpleToPink:"shadow-purple-500/50 dark:shadow-purple-800/80",pinkToOrange:"shadow-pink-500/50 dark:shadow-pink-800/80",tealToLime:"shadow-lime-500/50 dark:shadow-teal-800/80",redToYellow:"shadow-red-500/50 dark:shadow-red-800/80"};let d,f;function g(R){z.call(this,i,R)}function m(R){z.call(this,i,R)}function v(R){z.call(this,i,R)}function p(R){z.call(this,i,R)}function b(R){z.call(this,i,R)}function C(R){z.call(this,i,R)}function y(R){z.call(this,i,R)}function w(R){z.call(this,i,R)}function x(R){z.call(this,i,R)}function k(R){z.call(this,i,R)}function S(R){z.call(this,i,R)}function O(R){z.call(this,i,R)}function _(R){z.call(this,i,R)}function W(R){z.call(this,i,R)}function F(R){z.call(this,i,R)}return i.$$set=R=>{t(2,e=Q(Q({},e),de(R))),t(3,n=ge(e,r)),"color"in R&&t(4,l=R.color),"shadow"in R&&t(5,c=R.shadow),"$$scope"in R&&t(22,o=R.$$scope)},i.$$.update=()=>{t(0,d=oe("inline-flex items-center justify-center w-full !border-0",e.pill||"!rounded-md","bg-white !text-gray-900 dark:bg-gray-900 dark:!text-white","hover:bg-transparent hover:!text-inherit","transition-all duration-75 ease-in group-hover:!bg-opacity-0 group-hover:!text-inherit")),t(1,f=oe(e.outline&&"p-0.5",u[l],c&&"shadow-lg",c&&h[l],a?e.pill&&"first:rounded-s-full last:rounded-e-full"||"first:rounded-s-lg last:rounded-e-lg":e.pill&&"rounded-full"||"rounded-lg",e.class))},e=de(e),[d,f,e,n,l,c,s,g,m,v,p,b,C,y,w,x,k,S,O,_,W,F,o]}class v1 extends Ie{constructor(e){super(),Ne(this,e,p1,m1,Ee,{color:4,shadow:5})}}const $r=Math.min,xr=Math.max,Ji=Math.round,Ci=Math.floor,cr=i=>({x:i,y:i}),_1={left:"right",right:"left",bottom:"top",top:"bottom"},b1={start:"end",end:"start"};function Ca(i,e,t){return xr(i,$r(e,t))}function Xn(i,e){return typeof i=="function"?i(e):i}function Er(i){return i.split("-")[0]}function Wn(i){return i.split("-")[1]}function Ad(i){return i==="x"?"y":"x"}function cl(i){return i==="y"?"height":"width"}function en(i){return["top","bottom"].includes(Er(i))?"y":"x"}function ul(i){return Ad(en(i))}function y1(i,e,t){t===void 0&&(t=!1);const r=Wn(i),n=ul(i),s=cl(n);let o=n==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Qi(o)),[o,Qi(o)]}function w1(i){const e=Qi(i);return[xa(i),e,xa(e)]}function xa(i){return i.replace(/start|end/g,e=>b1[e])}function C1(i,e,t){const r=["left","right"],n=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(i){case"top":case"bottom":return t?e?n:r:e?r:n;case"left":case"right":return e?s:o;default:return[]}}function x1(i,e,t,r){const n=Wn(i);let s=C1(Er(i),t==="start",r);return n&&(s=s.map(o=>o+"-"+n),e&&(s=s.concat(s.map(xa)))),s}function Qi(i){return i.replace(/left|right|bottom|top/g,e=>_1[e])}function k1(i){return $e({top:0,right:0,bottom:0,left:0},i)}function Ld(i){return typeof i!="number"?k1(i):{top:i,right:i,bottom:i,left:i}}function $i(i){const{x:e,y:t,width:r,height:n}=i;return{width:r,height:n,top:t,left:e,right:e+r,bottom:t+n,x:e,y:t}}function Cu(i,e,t){let{reference:r,floating:n}=i;const s=en(e),o=ul(e),a=cl(o),l=Er(e),c=s==="y",u=r.x+r.width/2-n.width/2,h=r.y+r.height/2-n.height/2,d=r[a]/2-n[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-n.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:h};break;case"left":f={x:r.x-n.width,y:h};break;default:f={x:r.x,y:r.y}}switch(Wn(e)){case"start":f[o]-=d*(t&&c?-1:1);break;case"end":f[o]+=d*(t&&c?-1:1);break}return f}const S1=(i,e,t)=>Me(Xd,null,function*(){const{placement:r="bottom",strategy:n="absolute",middleware:s=[],platform:o}=t,a=s.filter(Boolean),l=yield o.isRTL==null?void 0:o.isRTL(e);let c=yield o.getElementRects({reference:i,floating:e,strategy:n}),{x:u,y:h}=Cu(c,r,l),d=r,f={},g=0;for(let m=0;m({name:"arrow",options:i,fn(t){return Me(this,null,function*(){const{x:r,y:n,placement:s,rects:o,platform:a,elements:l,middlewareData:c}=t,{element:u,padding:h=0}=Xn(i,t)||{};if(u==null)return{};const d=Ld(h),f={x:r,y:n},g=ul(s),m=cl(g),v=yield a.getDimensions(u),p=g==="y",b=p?"top":"left",C=p?"bottom":"right",y=p?"clientHeight":"clientWidth",w=o.reference[m]+o.reference[g]-f[g]-o.floating[m],x=f[g]-o.reference[g],k=yield a.getOffsetParent==null?void 0:a.getOffsetParent(u);let S=k?k[y]:0;(!S||!(yield a.isElement==null?void 0:a.isElement(k)))&&(S=l.floating[y]||o.floating[m]);const O=w/2-x/2,_=S/2-v[m]/2-1,W=$r(d[b],_),F=$r(d[C],_),R=W,A=S-v[m]-F,E=S/2-v[m]/2+O,P=Ca(R,E,A),T=!c.arrow&&Wn(s)!=null&&E!==P&&o.reference[m]/2-(EP<=0)){var F,R;const P=(((F=o.flip)==null?void 0:F.index)||0)+1,T=S[P];if(T)return{data:{index:P,overflows:W},reset:{placement:T}};let N=(R=W.filter(q=>q.overflows[0]<=0).sort((q,B)=>q.overflows[1]-B.overflows[1])[0])==null?void 0:R.placement;if(!N)switch(g){case"bestFit":{var A;const q=(A=W.filter(B=>{if(k){const se=en(B.placement);return se===C||se==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(se=>se>0).reduce((se,fe)=>se+fe,0)]).sort((B,se)=>B[1]-se[1])[0])==null?void 0:A[0];q&&(N=q);break}case"initialPlacement":N=l;break}if(s!==N)return{reset:{placement:N}}}return{}})}}};function O1(i,e){return Me(this,null,function*(){const{placement:t,platform:r,elements:n}=i,s=yield r.isRTL==null?void 0:r.isRTL(n.floating),o=Er(t),a=Wn(t),l=en(t)==="y",c=["left","top"].includes(o)?-1:1,u=s&&l?-1:1,h=Xn(e,i);let{mainAxis:d,crossAxis:f,alignmentAxis:g}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof g=="number"&&(f=a==="end"?g*-1:g),l?{x:f*u,y:d*c}:{x:d*c,y:f*u}})}const D1=function(i){return i===void 0&&(i=0),{name:"offset",options:i,fn(t){return Me(this,null,function*(){var r,n;const{x:s,y:o,placement:a,middlewareData:l}=t,c=yield O1(t,i);return a===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:At($e({},c),{placement:a})}})}}},M1=function(i){return i===void 0&&(i={}),{name:"shift",options:i,fn(t){return Me(this,null,function*(){const{x:r,y:n,placement:s}=t,p=Xn(i,t),{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:C,y}=b;return{x:C,y}}}}=p,c=Cs(p,["mainAxis","crossAxis","limiter"]),u={x:r,y:n},h=yield jd(t,c),d=en(Er(s)),f=Ad(d);let g=u[f],m=u[d];if(o){const b=f==="y"?"top":"left",C=f==="y"?"bottom":"right",y=g+h[b],w=g-h[C];g=Ca(y,g,w)}if(a){const b=d==="y"?"top":"left",C=d==="y"?"bottom":"right",y=m+h[b],w=m-h[C];m=Ca(y,m,w)}const v=l.fn(At($e({},t),{[f]:g,[d]:m}));return At($e({},v),{data:{x:v.x-r,y:v.y-n,enabled:{[f]:o,[d]:a}}})})}}};function vs(){return typeof window!="undefined"}function un(i){return Fd(i)?(i.nodeName||"").toLowerCase():"#document"}function pt(i){var e;return(i==null||(e=i.ownerDocument)==null?void 0:e.defaultView)||window}function Vt(i){var e;return(e=(Fd(i)?i.ownerDocument:i.document)||window.document)==null?void 0:e.documentElement}function Fd(i){return vs()?i instanceof Node||i instanceof pt(i).Node:!1}function Dt(i){return vs()?i instanceof Element||i instanceof pt(i).Element:!1}function zt(i){return vs()?i instanceof HTMLElement||i instanceof pt(i).HTMLElement:!1}function xu(i){return!vs()||typeof ShadowRoot=="undefined"?!1:i instanceof ShadowRoot||i instanceof pt(i).ShadowRoot}function Gn(i){const{overflow:e,overflowX:t,overflowY:r,display:n}=Mt(i);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!["inline","contents"].includes(n)}function P1(i){return["table","td","th"].includes(un(i))}function _s(i){return[":popover-open",":modal"].some(e=>{try{return i.matches(e)}catch(t){return!1}})}function hl(i){const e=fl(),t=Dt(i)?Mt(i):i;return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(t.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(t.contain||"").includes(r))}function A1(i){let e=ur(i);for(;zt(e)&&!tn(e);){if(hl(e))return e;if(_s(e))return null;e=ur(e)}return null}function fl(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function tn(i){return["html","body","#document"].includes(un(i))}function Mt(i){return pt(i).getComputedStyle(i)}function bs(i){return Dt(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function ur(i){if(un(i)==="html")return i;const e=i.assignedSlot||i.parentNode||xu(i)&&i.host||Vt(i);return xu(e)?e.host:e}function Rd(i){const e=ur(i);return tn(e)?i.ownerDocument?i.ownerDocument.body:i.body:zt(e)&&Gn(e)?e:Rd(e)}function Rn(i,e,t){var r;e===void 0&&(e=[]),t===void 0&&(t=!0);const n=Rd(i),s=n===((r=i.ownerDocument)==null?void 0:r.body),o=pt(n);if(s){const a=ka(o);return e.concat(o,o.visualViewport||[],Gn(n)?n:[],a&&t?Rn(a):[])}return e.concat(n,Rn(n,[],t))}function ka(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function Nd(i){const e=Mt(i);let t=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const n=zt(i),s=n?i.offsetWidth:t,o=n?i.offsetHeight:r,a=Ji(t)!==s||Ji(r)!==o;return a&&(t=s,r=o),{width:t,height:r,$:a}}function dl(i){return Dt(i)?i:i.contextElement}function Kr(i){const e=dl(i);if(!zt(e))return cr(1);const t=e.getBoundingClientRect(),{width:r,height:n,$:s}=Nd(e);let o=(s?Ji(t.width):t.width)/r,a=(s?Ji(t.height):t.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const L1=cr(0);function Id(i){const e=pt(i);return!fl()||!e.visualViewport?L1:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function j1(i,e,t){return e===void 0&&(e=!1),!t||e&&t!==pt(i)?!1:e}function Or(i,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);const n=i.getBoundingClientRect(),s=dl(i);let o=cr(1);e&&(r?Dt(r)&&(o=Kr(r)):o=Kr(i));const a=j1(s,t,r)?Id(s):cr(0);let l=(n.left+a.x)/o.x,c=(n.top+a.y)/o.y,u=n.width/o.x,h=n.height/o.y;if(s){const d=pt(s),f=r&&Dt(r)?pt(r):r;let g=d,m=ka(g);for(;m&&r&&f!==g;){const v=Kr(m),p=m.getBoundingClientRect(),b=Mt(m),C=p.left+(m.clientLeft+parseFloat(b.paddingLeft))*v.x,y=p.top+(m.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,h*=v.y,l+=C,c+=y,g=pt(m),m=ka(g)}}return $i({width:u,height:h,x:l,y:c})}function F1(i){let{elements:e,rect:t,offsetParent:r,strategy:n}=i;const s=n==="fixed",o=Vt(r),a=e?_s(e.floating):!1;if(r===o||a&&s)return t;let l={scrollLeft:0,scrollTop:0},c=cr(1);const u=cr(0),h=zt(r);if((h||!h&&!s)&&((un(r)!=="body"||Gn(o))&&(l=bs(r)),zt(r))){const d=Or(r);c=Kr(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-l.scrollLeft*c.x+u.x,y:t.y*c.y-l.scrollTop*c.y+u.y}}function R1(i){return Array.from(i.getClientRects())}function Sa(i,e){const t=bs(i).scrollLeft;return e?e.left+t:Or(Vt(i)).left+t}function N1(i){const e=Vt(i),t=bs(i),r=i.ownerDocument.body,n=xr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=xr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-t.scrollLeft+Sa(i);const a=-t.scrollTop;return Mt(r).direction==="rtl"&&(o+=xr(e.clientWidth,r.clientWidth)-n),{width:n,height:s,x:o,y:a}}function I1(i,e){const t=pt(i),r=Vt(i),n=t.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(n){s=n.width,o=n.height;const c=fl();(!c||c&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:s,height:o,x:a,y:l}}function B1(i,e){const t=Or(i,!0,e==="fixed"),r=t.top+i.clientTop,n=t.left+i.clientLeft,s=zt(i)?Kr(i):cr(1),o=i.clientWidth*s.x,a=i.clientHeight*s.y,l=n*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function ku(i,e,t){let r;if(e==="viewport")r=I1(i,t);else if(e==="document")r=N1(Vt(i));else if(Dt(e))r=B1(e,t);else{const n=Id(i);r=At($e({},e),{x:e.x-n.x,y:e.y-n.y})}return $i(r)}function Bd(i,e){const t=ur(i);return t===e||!Dt(t)||tn(t)?!1:Mt(t).position==="fixed"||Bd(t,e)}function z1(i,e){const t=e.get(i);if(t)return t;let r=Rn(i,[],!1).filter(a=>Dt(a)&&un(a)!=="body"),n=null;const s=Mt(i).position==="fixed";let o=s?ur(i):i;for(;Dt(o)&&!tn(o);){const a=Mt(o),l=hl(o);!l&&a.position==="fixed"&&(n=null),(s?!l&&!n:!l&&a.position==="static"&&!!n&&["absolute","fixed"].includes(n.position)||Gn(o)&&!l&&Bd(i,o))?r=r.filter(u=>u!==o):n=a,o=ur(o)}return e.set(i,r),r}function V1(i){let{element:e,boundary:t,rootBoundary:r,strategy:n}=i;const o=[...t==="clippingAncestors"?_s(e)?[]:z1(e,this._c):[].concat(t),r],a=o[0],l=o.reduce((c,u)=>{const h=ku(e,u,n);return c.top=xr(h.top,c.top),c.right=$r(h.right,c.right),c.bottom=$r(h.bottom,c.bottom),c.left=xr(h.left,c.left),c},ku(e,a,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Y1(i){const{width:e,height:t}=Nd(i);return{width:e,height:t}}function X1(i,e,t){const r=zt(e),n=Vt(e),s=t==="fixed",o=Or(i,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=cr(0);if(r||!r&&!s)if((un(e)!=="body"||Gn(n))&&(a=bs(e)),r){const f=Or(e,!0,s,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else n&&(l.x=Sa(n));let c=0,u=0;if(n&&!r&&!s){const f=n.getBoundingClientRect();u=f.top+a.scrollTop,c=f.left+a.scrollLeft-Sa(n,f)}const h=o.left+a.scrollLeft-l.x-c,d=o.top+a.scrollTop-l.y-u;return{x:h,y:d,width:o.width,height:o.height}}function Zo(i){return Mt(i).position==="static"}function Su(i,e){if(!zt(i)||Mt(i).position==="fixed")return null;if(e)return e(i);let t=i.offsetParent;return Vt(i)===t&&(t=t.ownerDocument.body),t}function zd(i,e){const t=pt(i);if(_s(i))return t;if(!zt(i)){let n=ur(i);for(;n&&!tn(n);){if(Dt(n)&&!Zo(n))return n;n=ur(n)}return t}let r=Su(i,e);for(;r&&P1(r)&&Zo(r);)r=Su(r,e);return r&&tn(r)&&Zo(r)&&!hl(r)?t:r||A1(i)||t}const W1=function(i){return Me(this,null,function*(){const e=this.getOffsetParent||zd,t=this.getDimensions,r=yield t(i.floating);return{reference:X1(i.reference,yield e(i.floating),i.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function G1(i){return Mt(i).direction==="rtl"}const H1={convertOffsetParentRelativeRectToViewportRelativeRect:F1,getDocumentElement:Vt,getClippingRect:V1,getOffsetParent:zd,getElementRects:W1,getClientRects:R1,getDimensions:Y1,getScale:Kr,isElement:Dt,isRTL:G1};function q1(i,e){let t=null,r;const n=Vt(i);function s(){var a;clearTimeout(r),(a=t)==null||a.disconnect(),t=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:h,height:d}=i.getBoundingClientRect();if(a||e(),!h||!d)return;const f=Ci(u),g=Ci(n.clientWidth-(c+h)),m=Ci(n.clientHeight-(u+d)),v=Ci(c),b={rootMargin:-f+"px "+-g+"px "+-m+"px "+-v+"px",threshold:xr(0,$r(1,l))||1};let C=!0;function y(w){const x=w[0].intersectionRatio;if(x!==l){if(!C)return o();x?o(!1,x):r=setTimeout(()=>{o(!1,1e-7)},1e3)}C=!1}try{t=new IntersectionObserver(y,At($e({},b),{root:n.ownerDocument}))}catch(w){t=new IntersectionObserver(y,b)}t.observe(i)}return o(!0),s}function Tu(i,e,t,r){r===void 0&&(r={});const{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=dl(i),u=n||s?[...c?Rn(c):[],...Rn(e)]:[];u.forEach(p=>{n&&p.addEventListener("scroll",t,{passive:!0}),s&&p.addEventListener("resize",t)});const h=c&&a?q1(c,t):null;let d=-1,f=null;o&&(f=new ResizeObserver(p=>{let[b]=p;b&&b.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var C;(C=f)==null||C.observe(e)})),t()}),c&&!l&&f.observe(c),f.observe(e));let g,m=l?Or(i):null;l&&v();function v(){const p=Or(i);m&&(p.x!==m.x||p.y!==m.y||p.width!==m.width||p.height!==m.height)&&t(),m=p,g=requestAnimationFrame(v)}return t(),()=>{var p;u.forEach(b=>{n&&b.removeEventListener("scroll",t),s&&b.removeEventListener("resize",t)}),h==null||h(),(p=f)==null||p.disconnect(),f=null,l&&cancelAnimationFrame(g)}}const U1=D1,K1=M1,Z1=E1,J1=T1,Q1=(i,e,t)=>{const r=new Map,n=$e({platform:H1},t),s=At($e({},n.platform),{_c:r});return S1(i,e,At($e({},n),{platform:s}))};function Eu(i){let e;return{c(){e=ve("div")},m(t,r){Y(t,e,r),i[23](e)},p:re,d(t){t&&V(e),i[23](null)}}}function Ou(i){let e,t,r;const n=[{use:i[9]},{options:i[3]},{role:"tooltip"},{tabindex:i[1]?-1:void 0},i[11]];function s(a){i[24](a)}let o={$$slots:{default:[$1]},$$scope:{ctx:i}};for(let a=0;ars(e,"open",s)),e.$on("focusin",function(){ct(ir(i[1],i[7]))&&ir(i[1],i[7]).apply(this,arguments)}),e.$on("focusout",function(){ct(ir(i[1],i[8]))&&ir(i[1],i[8]).apply(this,arguments)}),e.$on("mouseenter",function(){ct(ir(i[1]&&i[4],i[7]))&&ir(i[1]&&i[4],i[7]).apply(this,arguments)}),e.$on("mouseleave",function(){ct(ir(i[1]&&i[4],i[8]))&&ir(i[1]&&i[4],i[8]).apply(this,arguments)}),{c(){xe(e.$$.fragment)},m(a,l){be(e,a,l),r=!0},p(a,l){i=a;const c=l[0]&2570?we(n,[l[0]&512&&{use:i[9]},l[0]&8&&{options:i[3]},n[2],l[0]&2&&{tabindex:i[1]?-1:void 0},l[0]&2048&&Dr(i[11])]):{};l[0]&33554500&&(c.$$scope={dirty:l,ctx:i}),!t&&l[0]&1&&(t=!0,c.open=i[0],ts(()=>t=!1)),e.$set(c)},i(a){r||(G(e.$$.fragment,a),r=!0)},o(a){U(e.$$.fragment,a),r=!1},d(a){ye(e,a)}}}function Du(i){let e,t,r;return{c(){e=ve("div"),j(e,"class",i[6])},m(n,s){Y(n,e,s),t||(r=Ea(i[10].call(null,e)),t=!0)},p(n,s){s[0]&64&&j(e,"class",n[6])},d(n){n&&V(e),t=!1,r()}}}function $1(i){let e,t,r;const n=i[22].default,s=Ke(n,i,i[25],null);let o=i[2]&&Du(i);return{c(){s&&s.c(),e=He(),o&&o.c(),t=he()},m(a,l){s&&s.m(a,l),Y(a,e,l),o&&o.m(a,l),Y(a,t,l),r=!0},p(a,l){s&&s.p&&(!r||l[0]&33554432)&&Je(s,n,a,a[25],r?Ze(n,a[25],l,null):Qe(a[25]),null),a[2]?o?o.p(a,l):(o=Du(a),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},i(a){r||(G(s,a),r=!0)},o(a){U(s,a),r=!1},d(a){a&&(V(e),V(t)),s&&s.d(a),o&&o.d(a)}}}function e_(i){let e,t,r,n=!i[3]&&Eu(i),s=i[3]&&Ou(i);return{c(){n&&n.c(),e=He(),s&&s.c(),t=he()},m(o,a){n&&n.m(o,a),Y(o,e,a),s&&s.m(o,a),Y(o,t,a),r=!0},p(o,a){o[3]?n&&(n.d(1),n=null):n?n.p(o,a):(n=Eu(o),n.c(),n.m(e.parentNode,e)),o[3]?s?(s.p(o,a),a[0]&8&&G(s,1)):(s=Ou(o),s.c(),G(s,1),s.m(t.parentNode,t)):s&&(qe(),U(s,1,1,()=>{s=null}),Ue())},i(o){r||(G(s),r=!0)},o(o){U(s),r=!1},d(o){o&&(V(e),V(t)),n&&n.d(o),s&&s.d(o)}}}function ir(i,e){return i?e:()=>{}}function t_(i,e,t){let r;const n=["activeContent","arrow","offset","placement","trigger","triggeredBy","reference","strategy","open","yOnly","middlewares"];let s=ge(e,n),{$$slots:o={},$$scope:a}=e,{activeContent:l=!1}=e,{arrow:c=!0}=e,{offset:u=8}=e,{placement:h="top"}=e,{trigger:d="hover"}=e,{triggeredBy:f=void 0}=e,{reference:g=void 0}=e,{strategy:m="absolute"}=e,{open:v=!1}=e,{yOnly:p=!1}=e,{middlewares:b=[Z1(),K1()]}=e;const C=Mh();let y,w,x,k,S,O,_=[],W=!1;const F=()=>(W=!0,setTimeout(()=>W=!1,250)),R=Z=>{x===void 0&&console.error("trigger undefined"),!g&&_.includes(Z.target)&&x!==Z.target&&(t(3,x=Z.target),F()),y&&Z.type==="focusin"&&!v&&F(),t(0,v=y&&Z.type==="click"&&!W?!v:!0)},A=Z=>Z.matches(":hover"),E=Z=>Z.contains(document.activeElement),P=Z=>Z!=null?`${Z}px`:"",T=Z=>{l?setTimeout(()=>{const I=[x,k,..._].filter(Boolean);Z.type==="mouseleave"&&I.some(A)||Z.type==="focusout"&&I.some(E)||t(0,v=!1)},100):t(0,v=!1)};let N;const q={left:"right",right:"left",bottom:"top",top:"bottom"};function B(){Q1(x,k,{placement:h,strategy:m,middleware:r}).then(({x:Z,y:I,middlewareData:K,placement:te,strategy:ae})=>{k.style.position=ae,k.style.left=p?"0":P(Z),k.style.top=P(I),K.arrow&&S instanceof HTMLDivElement&&(t(20,S.style.left=P(K.arrow.x),S),t(20,S.style.top=P(K.arrow.y),S),t(21,N=q[te.split("-")[0]]),t(20,S.style[N]=P(-S.offsetWidth/2-(e.border?1:0)),S))})}function se(Z,I){k=Z;let K=Tu(I,k,B);return{update(te){K(),K=Tu(te,k,B)},destroy(){K()}}}es(()=>{var I;const Z=[["focusin",R,!0],["focusout",T,!0],["click",R,y],["mouseenter",R,w],["mouseleave",T,w]];return f?_=[...document.querySelectorAll(f)]:_=O.previousElementSibling?[O.previousElementSibling]:[],_.length||console.error("No triggers found."),_.forEach(K=>{K.tabIndex<0&&(K.tabIndex=0);for(const[te,ae,Le]of Z)Le&&K.addEventListener(te,ae)}),g?(t(3,x=(I=document.querySelector(g))!=null?I:document.body),x===document.body?console.error(`Popup reference not found: '${g}'`):(x.addEventListener("focusout",T),w&&x.addEventListener("mouseleave",T))):t(3,x=_[0]),document.addEventListener("click",fe),()=>{_.forEach(K=>{if(K)for(const[te,ae]of Z)K.removeEventListener(te,ae)}),x&&(x.removeEventListener("focusout",T),x.removeEventListener("mouseleave",T)),document.removeEventListener("click",fe)}});function fe(Z){v&&!Z.composedPath().includes(k)&&!_.some(I=>Z.composedPath().includes(I))&&T(Z)}let Se;function me(Z){return t(20,S=Z),{destroy(){t(20,S=null)}}}function tt(Z){vt[Z?"unshift":"push"](()=>{O=Z,t(5,O)})}function Ge(Z){v=Z,t(0,v)}return i.$$set=Z=>{t(39,e=Q(Q({},e),de(Z))),t(11,s=ge(e,n)),"activeContent"in Z&&t(1,l=Z.activeContent),"arrow"in Z&&t(2,c=Z.arrow),"offset"in Z&&t(12,u=Z.offset),"placement"in Z&&t(13,h=Z.placement),"trigger"in Z&&t(14,d=Z.trigger),"triggeredBy"in Z&&t(15,f=Z.triggeredBy),"reference"in Z&&t(16,g=Z.reference),"strategy"in Z&&t(17,m=Z.strategy),"open"in Z&&t(0,v=Z.open),"yOnly"in Z&&t(18,p=Z.yOnly),"middlewares"in Z&&t(19,b=Z.middlewares),"$$scope"in Z&&t(25,a=Z.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&16384&&(y=d==="click"),i.$$.dirty[0]&16384&&t(4,w=d==="hover"),i.$$.dirty[0]&1&&C("show",v),i.$$.dirty[0]&8200&&h&&(t(3,x),t(13,h)),i.$$.dirty[0]&1576960&&(r=[...b,U1(+u),S&&J1({element:S,padding:10})]),t(6,Se=Od("absolute pointer-events-none block w-[10px] h-[10px] rotate-45 bg-inherit border-inherit",e.border&&N==="bottom"&&"border-b border-e",e.border&&N==="top"&&"border-t border-s ",e.border&&N==="right"&&"border-t border-e ",e.border&&N==="left"&&"border-b border-s "))},e=de(e),[v,l,c,x,w,O,Se,R,T,se,me,s,u,h,d,f,g,m,p,b,S,N,o,tt,Ge,a]}class Vd extends Ie{constructor(e){super(),Ne(this,e,t_,e_,Ee,{activeContent:1,arrow:2,offset:12,placement:13,trigger:14,triggeredBy:15,reference:16,strategy:17,open:0,yOnly:18,middlewares:19},null,[-1,-1])}}function r_(i){let e;const t=i[7].default,r=Ke(t,i,i[6],null);return{c(){r&&r.c()},m(n,s){r&&r.m(n,s),e=!0},p(n,s){r&&r.p&&(!e||s&64)&&Je(r,t,n,n[6],e?Ze(t,n[6],s,null):Qe(n[6]),null)},i(n){e||(G(r,n),e=!0)},o(n){U(r,n),e=!1},d(n){r&&r.d(n)}}}function n_(i){let e,t;const r=i[7].default,n=Ke(r,i,i[6],null);let s=[i[3],{class:i[2]}],o={};for(let a=0;a{o[u]=null}),Ue(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),G(t,1),t.m(r.parentNode,r))},i(l){n||(G(t),n=!0)},o(l){U(t),n=!1},d(l){l&&V(r),o[e].d(l)}}}function s_(i,e,t){let r;const n=["color","defaultClass","show"];let s=ge(e,n),{$$slots:o={},$$scope:a}=e,{color:l="gray"}=e,{defaultClass:c="text-sm rtl:text-right font-medium block"}=e,{show:u=!0}=e,h;const d={gray:"text-gray-900 dark:text-gray-300",green:"text-green-700 dark:text-green-500",red:"text-red-700 dark:text-red-500",disabled:"text-gray-400 dark:text-gray-500"};function f(g){vt[g?"unshift":"push"](()=>{h=g,t(1,h)})}return i.$$set=g=>{t(10,e=Q(Q({},e),de(g))),t(3,s=ge(e,n)),"color"in g&&t(4,l=g.color),"defaultClass"in g&&t(5,c=g.defaultClass),"show"in g&&t(0,u=g.show),"$$scope"in g&&t(6,a=g.$$scope)},i.$$.update=()=>{if(i.$$.dirty&18){const g=h==null?void 0:h.control;t(4,l=g!=null&&g.disabled?"disabled":l)}t(2,r=oe(c,d[l],e.class))},e=de(e),[u,h,r,s,l,c,a,o,f]}class Yd extends Ie{constructor(e){super(),Ne(this,e,s_,i_,Ee,{color:4,defaultClass:5,show:0})}}let o_=Date.now();function a_(){return(++o_).toString(36)}function l_(i){let e,t,r,n=[{type:"range"},i[2],{class:i[1]}],s={};for(let o=0;o{t(11,e=Q(Q({},e),de(m))),t(2,n=ge(e,r)),"value"in m&&t(0,s=m.value),"size"in m&&t(3,o=m.size)},i.$$.update=()=>{var m;t(1,l=oe("w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700",(m=a[o])!=null?m:a.md,e.class))},e=de(e),[s,l,n,o,c,u,h,d,f,g]}class u_ extends Ie{constructor(e){super(),Ne(this,e,c_,l_,Ee,{value:0,size:3})}}function Mu(i,e,t){const r=i.slice();return r[17]=e[t].value,r[18]=e[t].name,r}function Pu(i){let e,t,r;return{c(){e=ve("option"),t=ie(i[2]),e.disabled=!0,e.selected=r=i[0]===void 0?!0:void 0,e.__value="",On(e,e.__value)},m(n,s){Y(n,e,s),H(e,t)},p(n,s){s&4&&ce(t,n[2]),s&3&&r!==(r=n[0]===void 0?!0:void 0)&&(e.selected=r)},d(n){n&&V(e)}}}function Au(i){let e;const t=i[10].default,r=Ke(t,i,i[9],null);return{c(){r&&r.c()},m(n,s){r&&r.m(n,s),e=!0},p(n,s){r&&r.p&&(!e||s&512)&&Je(r,t,n,n[9],e?Ze(t,n[9],s,null):Qe(n[9]),null)},i(n){e||(G(r,n),e=!0)},o(n){U(r,n),e=!1},d(n){r&&r.d(n)}}}function Lu(i){let e,t=i[18]+"",r,n,s;return{c(){e=ve("option"),r=ie(t),e.__value=n=i[17],On(e,e.__value),e.selected=s=i[17]===i[0]?!0:void 0},m(o,a){Y(o,e,a),H(e,r)},p(o,a){a&2&&t!==(t=o[18]+"")&&ce(r,t),a&2&&n!==(n=o[17])&&(e.__value=n,On(e,e.__value)),a&3&&s!==(s=o[17]===o[0]?!0:void 0)&&(e.selected=s)},d(o){o&&V(e)}}}function h_(i){let e,t,r,n,s=i[2]&&Pu(i),o=Fi(i[1]),a=[];for(let h=0;hi[14].call(e))},m(h,d){Y(h,e,d),s&&s.m(e,null),H(e,t);for(let f=0;f{l=null}),Ue()):(l=Au(h),l.c(),G(l,1),l.m(e,null))}Ot(e,u=we(c,[d&16&&h[4],{class:h[3]}])),d&24&&"value"in u&&(u.multiple?yl:Un)(e,u.value),d&3&&Un(e,h[0])},i:re,o:re,d(h){h&&V(e),s&&s.d(),Eh(a,h),l&&l.d(),r=!1,Re(n)}}}const f_="block w-full";function d_(i,e,t){const r=["items","value","placeholder","underline","size","defaultClass","underlineClass"];let n=ge(e,r),{$$slots:s={},$$scope:o}=e,{items:a=[]}=e,{value:l=""}=e,{placeholder:c="Choose option ..."}=e,{underline:u=!1}=e,{size:h="md"}=e,{defaultClass:d="text-gray-900 disabled:text-gray-400 bg-gray-50 border border-gray-300 rounded-lg focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:disabled:text-gray-500 dark:focus:ring-primary-500 dark:focus:border-primary-500"}=e,{underlineClass:f="text-gray-500 disabled:text-gray-400 bg-transparent border-0 border-b-2 border-gray-200 appearance-none dark:text-gray-400 dark:disabled:text-gray-500 dark:border-gray-700 focus:outline-none focus:ring-0 focus:border-gray-200 peer"}=e;const g={sm:"text-sm p-2",md:"text-sm p-2.5",lg:"text-base py-3 px-4"};let m;function v(y){z.call(this,i,y)}function p(y){z.call(this,i,y)}function b(y){z.call(this,i,y)}function C(){l=ng(this),t(0,l),t(1,a)}return i.$$set=y=>{t(16,e=Q(Q({},e),de(y))),t(4,n=ge(e,r)),"items"in y&&t(1,a=y.items),"value"in y&&t(0,l=y.value),"placeholder"in y&&t(2,c=y.placeholder),"underline"in y&&t(5,u=y.underline),"size"in y&&t(6,h=y.size),"defaultClass"in y&&t(7,d=y.defaultClass),"underlineClass"in y&&t(8,f=y.underlineClass),"$$scope"in y&&t(9,o=y.$$scope)},i.$$.update=()=>{t(3,m=oe(f_,u?f:d,g[h],u&&"!px-0",e.class))},e=de(e),[l,a,c,m,n,u,h,d,f,o,s,v,p,b,C]}class g_ extends Ie{constructor(e){super(),Ne(this,e,d_,h_,Ee,{items:1,value:0,placeholder:2,underline:5,size:6,defaultClass:7,underlineClass:8})}}const m_=i=>({}),ju=i=>({}),p_=i=>({}),Fu=i=>({}),v_=i=>({}),Ru=i=>({});function __(i){let e,t;const r=[{pill:i[2]},{name:i[5]},{"aria-controls":i[4]},{"aria-expanded":i[0]},i[9],{class:"!p-3"}];let n={$$slots:{default:[w_]},$$scope:{ctx:i}};for(let s=0;s{o[u]=null}),Ue(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),G(t,1),t.m(r.parentNode,r))},i(l){n||(G(t),n=!0)},o(l){U(t),n=!1},d(l){l&&V(r),o[e].d(l)}}}function S_(i){let e;const t=i[14].default,r=Ke(t,i,i[16],null);return{c(){r&&r.c()},m(n,s){r&&r.m(n,s),e=!0},p(n,s){r&&r.p&&(!e||s&65536)&&Je(r,t,n,n[16],e?Ze(t,n[16],s,null):Qe(n[16]),null)},i(n){e||(G(r,n),e=!0)},o(n){U(r,n),e=!1},d(n){r&&r.d(n)}}}function T_(i){let e,t,r,n,s;const o=i[14].button,a=Ke(o,i,i[16],Ru),l=a||k_(i);function c(h){i[15](h)}let u={id:i[4],trigger:i[3],arrow:!1,color:"none",activeContent:!0,placement:i[1],class:i[8],$$slots:{default:[S_]},$$scope:{ctx:i}};return i[0]!==void 0&&(u.open=i[0]),r=new Vd({props:u}),vt.push(()=>rs(r,"open",c)),{c(){e=ve("div"),l&&l.c(),t=He(),xe(r.$$.fragment),j(e,"class",i[7])},m(h,d){Y(h,e,d),l&&l.m(e,null),H(e,t),be(r,e,null),s=!0},p(h,[d]){a?a.p&&(!s||d&65536)&&Je(a,o,h,h[16],s?Ze(o,h[16],d,v_):Qe(h[16]),Ru):l&&l.p&&(!s||d&66165)&&l.p(h,s?d:-1);const f={};d&16&&(f.id=h[4]),d&8&&(f.trigger=h[3]),d&2&&(f.placement=h[1]),d&256&&(f.class=h[8]),d&65536&&(f.$$scope={dirty:d,ctx:h}),!n&&d&1&&(n=!0,f.open=h[0],ts(()=>n=!1)),r.$set(f),(!s||d&128)&&j(e,"class",h[7])},i(h){s||(G(l,h),G(r.$$.fragment,h),s=!0)},o(h){U(l,h),U(r.$$.fragment,h),s=!1},d(h){h&&V(e),l&&l.d(h),ye(r)}}}function E_(i,e,t){const r=["defaultClass","popperDefaultClass","placement","pill","tooltip","trigger","textOutside","id","name","gradient","open"];let n=ge(e,r),{$$slots:s={},$$scope:o}=e,{defaultClass:a="fixed end-6 bottom-6"}=e,{popperDefaultClass:l="flex items-center mb-4 gap-2"}=e,{placement:c="top"}=e,{pill:u=!0}=e,{tooltip:h="left"}=e,{trigger:d="hover"}=e,{textOutside:f=!1}=e,{id:g=a_()}=e,{name:m="Open actions menu"}=e,{gradient:v=!1}=e,{open:p=!1}=e;Qo("speed-dial",{pill:u,tooltip:h,textOutside:f});let b,C;function y(w){p=w,t(0,p)}return i.$$set=w=>{t(17,e=Q(Q({},e),de(w))),t(9,n=ge(e,r)),"defaultClass"in w&&t(10,a=w.defaultClass),"popperDefaultClass"in w&&t(11,l=w.popperDefaultClass),"placement"in w&&t(1,c=w.placement),"pill"in w&&t(2,u=w.pill),"tooltip"in w&&t(12,h=w.tooltip),"trigger"in w&&t(3,d=w.trigger),"textOutside"in w&&t(13,f=w.textOutside),"id"in w&&t(4,g=w.id),"name"in w&&t(5,m=w.name),"gradient"in w&&t(6,v=w.gradient),"open"in w&&t(0,p=w.open),"$$scope"in w&&t(16,o=w.$$scope)},i.$$.update=()=>{t(7,b=oe(a,"group",e.class)),i.$$.dirty&2050&&t(8,C=oe(l,["top","bottom"].includes(c.split("-")[0])&&"flex-col"))},e=de(e),[p,c,u,d,g,m,v,b,C,n,a,l,h,f,s,y,o]}class O_ extends Ie{constructor(e){super(),Ne(this,e,E_,T_,Ee,{defaultClass:10,popperDefaultClass:11,placement:1,pill:2,tooltip:12,trigger:3,textOutside:13,id:4,name:5,gradient:6,open:0})}}function D_(i){let e;const t=i[4].default,r=Ke(t,i,i[6],null);return{c(){r&&r.c()},m(n,s){r&&r.m(n,s),e=!0},p(n,s){r&&r.p&&(!e||s&64)&&Je(r,t,n,n[6],e?Ze(t,n[6],s,null):Qe(n[6]),null)},i(n){e||(G(r,n),e=!0)},o(n){U(r,n),e=!1},d(n){r&&r.d(n)}}}function M_(i){let e,t;const r=[{rounded:!0},{shadow:!0},i[1],{class:i[0]}];let n={$$slots:{default:[D_]},$$scope:{ctx:i}};for(let s=0;s{t(8,e=Q(Q({},e),de(d))),t(1,n=ge(e,r)),"type"in d&&t(2,a=d.type),"defaultClass"in d&&t(3,l=d.defaultClass),"$$scope"in d&&t(6,o=d.$$scope)},i.$$.update=()=>{n.color?t(2,a="custom"):t(1,n.color="none",n),["light","auto"].includes(a)&&t(1,n.border=!0,n),t(0,u=oe("tooltip",l,c[a],e.class))},e=de(e),[u,n,a,l,s,h,o]}class A_ extends Ie{constructor(e){super(),Ne(this,e,P_,M_,Ee,{type:2,defaultClass:3})}}function L_(i){let e,t;return{c(){e=ve("span"),t=ie(i[0]),j(e,"class",i[5])},m(r,n){Y(r,e,n),H(e,t)},p(r,n){n&1&&ce(t,r[0]),n&32&&j(e,"class",r[5])},d(r){r&&V(e)}}}function j_(i){let e,t;return{c(){e=ve("span"),t=ie(i[0]),j(e,"class",i[4])},m(r,n){Y(r,e,n),H(e,t)},p(r,n){n&1&&ce(t,r[0]),n&16&&j(e,"class",r[4])},d(r){r&&V(e)}}}function F_(i){let e,t;return{c(){e=ve("span"),t=ie(i[0]),j(e,"class","sr-only")},m(r,n){Y(r,e,n),H(e,t)},p(r,n){n&1&&ce(t,r[0])},d(r){r&&V(e)}}}function R_(i){let e,t,r;const n=i[9].default,s=Ke(n,i,i[11],null);function o(c,u){return c[1]!=="none"?F_:c[3]?j_:L_}let a=o(i),l=a(i);return{c(){s&&s.c(),e=He(),l.c(),t=he()},m(c,u){s&&s.m(c,u),Y(c,e,u),l.m(c,u),Y(c,t,u),r=!0},p(c,u){s&&s.p&&(!r||u&2048)&&Je(s,n,c,c[11],r?Ze(n,c[11],u,null):Qe(c[11]),null),a===(a=o(c))&&l?l.p(c,u):(l.d(1),l=a(c),l&&(l.c(),l.m(t.parentNode,t)))},i(c){r||(G(s,c),r=!0)},o(c){U(s,c),r=!1},d(c){c&&(V(e),V(t)),s&&s.d(c),l.d(c)}}}function Nu(i){let e,t;return e=new A_({props:{placement:i[1],style:"dark",$$slots:{default:[N_]},$$scope:{ctx:i}}}),{c(){xe(e.$$.fragment)},m(r,n){be(e,r,n),t=!0},p(r,n){const s={};n&2&&(s.placement=r[1]),n&2049&&(s.$$scope={dirty:n,ctx:r}),e.$set(s)},i(r){t||(G(e.$$.fragment,r),t=!0)},o(r){U(e.$$.fragment,r),t=!1},d(r){ye(e,r)}}}function N_(i){let e;return{c(){e=ie(i[0])},m(t,r){Y(t,e,r)},p(t,r){r&1&&ce(e,t[0])},d(t){t&&V(e)}}}function I_(i){let e,t,r,n;const s=[{pill:i[2]},{outline:!0},{color:"light"},i[7],{class:i[6]}];let o={$$slots:{default:[R_]},$$scope:{ctx:i}};for(let l=0;l{a=null}),Ue())},i(l){n||(G(e.$$.fragment,l),G(a),n=!0)},o(l){U(e.$$.fragment,l),U(a),n=!1},d(l){l&&(V(t),V(r)),ye(e,l),a&&a.d(l)}}}function B_(i,e,t){const r=["btnDefaultClass","name","tooltip","pill","textOutside","textOutsideClass","textDefaultClass"];let n=ge(e,r),{$$slots:s={},$$scope:o}=e;const a=Pt("speed-dial");let{btnDefaultClass:l="w-[52px] h-[52px] shadow-sm !p-2"}=e,{name:c=""}=e,{tooltip:u=a.tooltip}=e,{pill:h=a.pill}=e,{textOutside:d=a.textOutside}=e,{textOutsideClass:f="block absolute -start-14 top-1/2 mb-px text-sm font-medium -translate-y-1/2"}=e,{textDefaultClass:g="block mb-px text-xs font-medium"}=e,m;function v(p){z.call(this,i,p)}return i.$$set=p=>{t(13,e=Q(Q({},e),de(p))),t(7,n=ge(e,r)),"btnDefaultClass"in p&&t(8,l=p.btnDefaultClass),"name"in p&&t(0,c=p.name),"tooltip"in p&&t(1,u=p.tooltip),"pill"in p&&t(2,h=p.pill),"textOutside"in p&&t(3,d=p.textOutside),"textOutsideClass"in p&&t(4,f=p.textOutsideClass),"textDefaultClass"in p&&t(5,g=p.textDefaultClass),"$$scope"in p&&t(11,o=p.$$scope)},i.$$.update=()=>{t(6,m=oe(l,u==="none"&&"flex-col",d&&"relative",e.class))},e=de(e),[c,u,h,d,f,g,m,n,l,s,v,o]}class rn extends Ie{constructor(e){super(),Ne(this,e,B_,I_,Ee,{btnDefaultClass:8,name:0,tooltip:1,pill:2,textOutside:3,textOutsideClass:4,textDefaultClass:5})}}function z_(i){var u;let e,t,r,n,s,o=i[4].id&&i[4].title&&Iu(i),a=i[5].id&&i[5].desc&&Bu(i),l=[{xmlns:"http://www.w3.org/2000/svg"},{fill:i[2]},i[10],{class:n=oe("shrink-0",i[8][(u=i[0])!=null?u:"md"],i[11].class)},{role:i[1]},{"aria-label":i[6]},{"aria-describedby":s=i[7]?i[9]:void 0},{viewBox:"0 0 24 24"}],c={};for(let h=0;h{t(11,e=Q(Q({},e),de(_))),t(10,n=ge(e,r)),"size"in _&&t(0,a=_.size),"role"in _&&t(1,l=_.role),"color"in _&&t(2,c=_.color),"withEvents"in _&&t(3,u=_.withEvents),"title"in _&&t(4,h=_.title),"desc"in _&&t(5,d=_.desc),"ariaLabel"in _&&t(6,m=_.ariaLabel)},i.$$.update=()=>{i.$$.dirty&48&&(h.id||d.id?t(7,g=!0):t(7,g=!1))},e=de(e),[a,l,c,u,h,d,m,g,o,f,n,e,v,p,b,C,y,w,x,k,S]}class W_ extends Ie{constructor(e){super(),Ne(this,e,X_,Y_,Ee,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}function G_(i){var u;let e,t,r,n,s,o=i[4].id&&i[4].title&&Yu(i),a=i[5].id&&i[5].desc&&Xu(i),l=[{xmlns:"http://www.w3.org/2000/svg"},{fill:"none"},{color:i[2]},i[10],{class:n=oe("shrink-0",i[8][(u=i[0])!=null?u:"md"],i[11].class)},{role:i[1]},{"aria-label":i[6]},{"aria-describedby":s=i[7]?i[9]:void 0},{viewBox:"0 0 24 24"}],c={};for(let h=0;h{t(11,e=Q(Q({},e),de(_))),t(10,n=ge(e,r)),"size"in _&&t(0,a=_.size),"role"in _&&t(1,l=_.role),"color"in _&&t(2,c=_.color),"withEvents"in _&&t(3,u=_.withEvents),"title"in _&&t(4,h=_.title),"desc"in _&&t(5,d=_.desc),"ariaLabel"in _&&t(6,m=_.ariaLabel)},i.$$.update=()=>{i.$$.dirty&48&&(h.id||d.id?t(7,g=!0):t(7,g=!1))},e=de(e),[a,l,c,u,h,d,m,g,o,f,n,e,v,p,b,C,y,w,x,k,S]}class K_ extends Ie{constructor(e){super(),Ne(this,e,U_,q_,Ee,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}function Z_(i){var h;let e,t,r,n,s,o,a=i[4].id&&i[4].title&&Hu(i),l=i[5].id&&i[5].desc&&qu(i),c=[{xmlns:"http://www.w3.org/2000/svg"},{fill:i[2]},i[10],{class:s=oe("shrink-0",i[8][(h=i[0])!=null?h:"md"],i[11].class)},{role:i[1]},{"aria-label":i[6]},{"aria-describedby":o=i[7]?i[9]:void 0},{viewBox:"0 0 24 24"}],u={};for(let d=0;d{t(11,e=Q(Q({},e),de(_))),t(10,n=ge(e,r)),"size"in _&&t(0,a=_.size),"role"in _&&t(1,l=_.role),"color"in _&&t(2,c=_.color),"withEvents"in _&&t(3,u=_.withEvents),"title"in _&&t(4,h=_.title),"desc"in _&&t(5,d=_.desc),"ariaLabel"in _&&t(6,m=_.ariaLabel)},i.$$.update=()=>{i.$$.dirty&48&&(h.id||d.id?t(7,g=!0):t(7,g=!1))},e=de(e),[a,l,c,u,h,d,m,g,o,f,n,e,v,p,b,C,y,w,x,k,S]}class eb extends Ie{constructor(e){super(),Ne(this,e,$_,Q_,Ee,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}function tb(i){var u;let e,t,r,n,s,o=i[4].id&&i[4].title&&Zu(i),a=i[5].id&&i[5].desc&&Ju(i),l=[{xmlns:"http://www.w3.org/2000/svg"},{fill:i[2]},i[10],{class:n=oe("shrink-0",i[8][(u=i[0])!=null?u:"md"],i[11].class)},{role:i[1]},{"aria-label":i[6]},{"aria-describedby":s=i[7]?i[9]:void 0},{viewBox:"0 0 24 24"}],c={};for(let h=0;h{t(11,e=Q(Q({},e),de(_))),t(10,n=ge(e,r)),"size"in _&&t(0,a=_.size),"role"in _&&t(1,l=_.role),"color"in _&&t(2,c=_.color),"withEvents"in _&&t(3,u=_.withEvents),"title"in _&&t(4,h=_.title),"desc"in _&&t(5,d=_.desc),"ariaLabel"in _&&t(6,m=_.ariaLabel)},i.$$.update=()=>{i.$$.dirty&48&&(h.id||d.id?t(7,g=!0):t(7,g=!1))},e=de(e),[a,l,c,u,h,d,m,g,o,f,n,e,v,p,b,C,y,w,x,k,S]}class sb extends Ie{constructor(e){super(),Ne(this,e,ib,nb,Ee,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}function ob(i){var u;let e,t,r,n,s,o=i[4].id&&i[4].title&&eh(i),a=i[5].id&&i[5].desc&&th(i),l=[{xmlns:"http://www.w3.org/2000/svg"},{fill:i[2]},i[10],{class:n=oe("shrink-0",i[8][(u=i[0])!=null?u:"md"],i[11].class)},{role:i[1]},{"aria-label":i[6]},{"aria-describedby":s=i[7]?i[9]:void 0},{viewBox:"0 0 24 24"}],c={};for(let h=0;h{t(11,e=Q(Q({},e),de(_))),t(10,n=ge(e,r)),"size"in _&&t(0,a=_.size),"role"in _&&t(1,l=_.role),"color"in _&&t(2,c=_.color),"withEvents"in _&&t(3,u=_.withEvents),"title"in _&&t(4,h=_.title),"desc"in _&&t(5,d=_.desc),"ariaLabel"in _&&t(6,m=_.ariaLabel)},i.$$.update=()=>{i.$$.dirty&48&&(h.id||d.id?t(7,g=!0):t(7,g=!1))},e=de(e),[a,l,c,u,h,d,m,g,o,f,n,e,v,p,b,C,y,w,x,k,S]}class ub extends Ie{constructor(e){super(),Ne(this,e,cb,lb,Ee,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}function hb(i){var u;let e,t,r,n,s,o=i[4].id&&i[4].title&&ih(i),a=i[5].id&&i[5].desc&&sh(i),l=[{xmlns:"http://www.w3.org/2000/svg"},{fill:i[2]},i[10],{class:n=oe("shrink-0",i[8][(u=i[0])!=null?u:"md"],i[11].class)},{role:i[1]},{"aria-label":i[6]},{"aria-describedby":s=i[7]?i[9]:void 0},{viewBox:"0 0 24 24"}],c={};for(let h=0;h{t(11,e=Q(Q({},e),de(_))),t(10,n=ge(e,r)),"size"in _&&t(0,a=_.size),"role"in _&&t(1,l=_.role),"color"in _&&t(2,c=_.color),"withEvents"in _&&t(3,u=_.withEvents),"title"in _&&t(4,h=_.title),"desc"in _&&t(5,d=_.desc),"ariaLabel"in _&&t(6,m=_.ariaLabel)},i.$$.update=()=>{i.$$.dirty&48&&(h.id||d.id?t(7,g=!0):t(7,g=!1))},e=de(e),[a,l,c,u,h,d,m,g,o,f,n,e,v,p,b,C,y,w,x,k,S]}class mb extends Ie{constructor(e){super(),Ne(this,e,gb,db,Ee,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}function pb(i){var u;let e,t,r,n,s,o=i[4].id&&i[4].title&&lh(i),a=i[5].id&&i[5].desc&&ch(i),l=[{xmlns:"http://www.w3.org/2000/svg"},{fill:i[2]},i[10],{class:n=oe("shrink-0",i[8][(u=i[0])!=null?u:"md"],i[11].class)},{role:i[1]},{"aria-label":i[6]},{"aria-describedby":s=i[7]?i[9]:void 0},{viewBox:"0 0 24 24"}],c={};for(let h=0;h{t(11,e=Q(Q({},e),de(_))),t(10,n=ge(e,r)),"size"in _&&t(0,a=_.size),"role"in _&&t(1,l=_.role),"color"in _&&t(2,c=_.color),"withEvents"in _&&t(3,u=_.withEvents),"title"in _&&t(4,h=_.title),"desc"in _&&t(5,d=_.desc),"ariaLabel"in _&&t(6,m=_.ariaLabel)},i.$$.update=()=>{i.$$.dirty&48&&(h.id||d.id?t(7,g=!0):t(7,g=!1))},e=de(e),[a,l,c,u,h,d,m,g,o,f,n,e,v,p,b,C,y,w,x,k,S]}class yb extends Ie{constructor(e){super(),Ne(this,e,bb,_b,Ee,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}function wb(i){var u;let e,t,r,n,s,o=i[4].id&&i[4].title&&fh(i),a=i[5].id&&i[5].desc&&dh(i),l=[{xmlns:"http://www.w3.org/2000/svg"},{fill:i[2]},i[10],{class:n=oe("shrink-0",i[8][(u=i[0])!=null?u:"md"],i[11].class)},{role:i[1]},{"aria-label":i[6]},{"aria-describedby":s=i[7]?i[9]:void 0},{viewBox:"0 0 24 24"}],c={};for(let h=0;h{t(11,e=Q(Q({},e),de(_))),t(10,n=ge(e,r)),"size"in _&&t(0,a=_.size),"role"in _&&t(1,l=_.role),"color"in _&&t(2,c=_.color),"withEvents"in _&&t(3,u=_.withEvents),"title"in _&&t(4,h=_.title),"desc"in _&&t(5,d=_.desc),"ariaLabel"in _&&t(6,m=_.ariaLabel)},i.$$.update=()=>{i.$$.dirty&48&&(h.id||d.id?t(7,g=!0):t(7,g=!1))},e=de(e),[a,l,c,u,h,d,m,g,o,f,n,e,v,p,b,C,y,w,x,k,S]}class Sb extends Ie{constructor(e){super(),Ne(this,e,kb,xb,Ee,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}function ph(i,e,t){const r=i.slice();return r[19]=e[t],r}function vh(i){let e,t,r,n,s,o,a,l,c=i[1],u,h,d;a=new Yd({props:{$$slots:{default:[Tb]},$$scope:{ctx:i}}});let f=bh(i);return{c(){e=ve("aside"),t=ve("div"),r=ve("ul"),r.innerHTML='
  • Settings

  • ',n=He(),s=ve("ul"),o=ve("li"),xe(a.$$.fragment),l=He(),f.c(),j(r,"class","space-y-2 font-medium text-lg"),j(o,"class","mb-4"),j(s,"class","pt-4 mt-4 space-y-2 font-medium border-t border-gray-200 dark:border-gray-700"),j(t,"class","h-full px-3 py-4 overflow-hidden bg-gray-50 dark:bg-gray-800"),j(e,"id","expanded-sidebar"),j(e,"class","fixed top-0 left-0 z-40 w-48 h-screen overflow-hidden"),j(e,"aria-label","Sidebar")},m(g,m){Y(g,e,m),H(e,t),H(t,r),H(t,n),H(t,s),H(s,o),be(a,o,null),H(t,l),f.m(t,null),d=!0},p(g,m){const v={};m&4194306&&(v.$$scope={dirty:m,ctx:g}),a.$set(v),m&2&&Ee(c,c=g[1])?(qe(),U(f,1,1,re),Ue(),f=bh(g),f.c(),G(f,1),f.m(t,null)):f.p(g,m)},i(g){d||(G(a.$$.fragment,g),G(f),g&&It(()=>{d&&(h&&h.end(1),u=Ah(e,Zi,{x:-200,duration:300}),u.start())}),d=!0)},o(g){U(a.$$.fragment,g),U(f),u&&u.invalidate(),g&&(h=Lh(e,Zi,{x:-200,duration:300})),d=!1},d(g){g&&V(e),ye(a),f.d(g),g&&h&&h.end()}}}function Tb(i){let e,t,r,n;function s(a){i[15](a)}let o={class:"mt-2",items:Sd,placeholder:""};return i[1]!==void 0&&(o.value=i[1]),t=new g_({props:o}),vt.push(()=>rs(t,"value",s)),{c(){e=ie(`Layout algorithm - `),xe(t.$$.fragment)},m(a,l){Y(a,e,l),be(t,a,l),n=!0},p(a,l){const c={};!r&&l&2&&(r=!0,c.value=a[1],ts(()=>r=!1)),t.$set(c)},i(a){n||(G(t.$$.fragment,a),n=!0)},o(a){U(t.$$.fragment,a),n=!1},d(a){a&&V(e),ye(t,a)}}}function Eb(i){let e=i[19].name+"",t;return{c(){t=ie(e)},m(r,n){Y(r,t,n)},p(r,n){n&4&&e!==(e=r[19].name+"")&&ce(t,e)},d(r){r&&V(t)}}}function _h(i){let e,t,r,n,s,o;return t=new Yd({props:{$$slots:{default:[Eb]},$$scope:{ctx:i}}}),n=new u_({props:{size:"sm",id:i[19].id,min:i[19].min,max:i[19].max,value:i[19].value,step:i[19].step}}),n.$on("change",function(){ct(i[19].effectorFn(i[5],i[19].id))&&i[19].effectorFn(i[5],i[19].id).apply(this,arguments)}),{c(){e=ve("li"),xe(t.$$.fragment),r=He(),xe(n.$$.fragment),s=He()},m(a,l){Y(a,e,l),be(t,e,null),H(e,r),be(n,e,null),H(e,s),o=!0},p(a,l){i=a;const c={};l&4194308&&(c.$$scope={dirty:l,ctx:i}),t.$set(c);const u={};l&4&&(u.id=i[19].id),l&4&&(u.min=i[19].min),l&4&&(u.max=i[19].max),l&4&&(u.value=i[19].value),l&4&&(u.step=i[19].step),n.$set(u)},i(a){o||(G(t.$$.fragment,a),G(n.$$.fragment,a),o=!0)},o(a){U(t.$$.fragment,a),U(n.$$.fragment,a),o=!1},d(a){a&&V(e),ye(t),ye(n)}}}function bh(i){let e,t,r,n,s=Fi(i[2].settings),o=[];for(let l=0;lU(o[l],1,1,()=>{o[l]=null});return{c(){e=ve("ul");for(let l=0;l{n&&(r&&r.end(1),t=Ah(e,Zi,{delay:250,duration:200}),t.start())}),n=!0}},o(l){o=o.filter(Boolean);for(let c=0;crs(e,"usePrecomputedPositions",n)),{c(){xe(e.$$.fragment)},m(o,a){be(e,o,a),r=!0},p(o,a){const l={};a&1&&(l.graph=o[0]),a&32&&(l.layout=o[5]),!t&&a&64&&(t=!0,l.usePrecomputedPositions=o[6],ts(()=>t=!1)),e.$set(l)},i(o){r||(G(e.$$.fragment,o),r=!0)},o(o){U(e.$$.fragment,o),r=!1},d(o){ye(e,o)}}}function wh(i){let e,t,r,n;return e=new rn({props:{name:i[9]?"Pause":"Resume",$$slots:{default:[Lb]},$$scope:{ctx:i}}}),e.$on("click",i[11]),r=new rn({props:{name:"Layout settings",$$slots:{default:[jb]},$$scope:{ctx:i}}}),r.$on("click",i[13]),{c(){xe(e.$$.fragment),t=He(),xe(r.$$.fragment)},m(s,o){be(e,s,o),Y(s,t,o),be(r,s,o),n=!0},p(s,o){const a={};o&512&&(a.name=s[9]?"Pause":"Resume"),o&4194816&&(a.$$scope={dirty:o,ctx:s}),e.$set(a);const l={};o&4194304&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){n||(G(e.$$.fragment,s),G(r.$$.fragment,s),n=!0)},o(s){U(e.$$.fragment,s),U(r.$$.fragment,s),n=!1},d(s){s&&V(t),ye(e,s),ye(r,s)}}}function Pb(i){let e,t;return e=new mb({props:{slot:"icon",class:"w-8 h-8"}}),{c(){xe(e.$$.fragment)},m(r,n){be(e,r,n),t=!0},i(r){t||(G(e.$$.fragment,r),t=!0)},o(r){U(e.$$.fragment,r),t=!1},d(r){ye(e,r)}}}function Ab(i){let e,t;return e=new ub({props:{slot:"icon",class:"w-8 h-8"}}),{c(){xe(e.$$.fragment)},m(r,n){be(e,r,n),t=!0},i(r){t||(G(e.$$.fragment,r),t=!0)},o(r){U(e.$$.fragment,r),t=!1},d(r){ye(e,r)}}}function Lb(i){let e,t,r,n;const s=[Ab,Pb],o=[];function a(l,c){return l[9]?0:1}return e=a(i),t=o[e]=s[e](i),{c(){t.c(),r=he()},m(l,c){o[e].m(l,c),Y(l,r,c),n=!0},p(l,c){let u=e;e=a(l),e!==u&&(qe(),U(o[u],1,1,()=>{o[u]=null}),Ue(),t=o[e],t||(t=o[e]=s[e](l),t.c()),G(t,1),t.m(r.parentNode,r))},i(l){n||(G(t),n=!0)},o(l){U(t),n=!1},d(l){l&&V(r),o[e].d(l)}}}function jb(i){let e,t;return e=new W_({props:{class:"w-6 h-6"}}),{c(){xe(e.$$.fragment)},m(r,n){be(e,r,n),t=!0},p:re,i(r){t||(G(e.$$.fragment,r),t=!0)},o(r){U(e.$$.fragment,r),t=!1},d(r){ye(e,r)}}}function Fb(i){let e,t;return e=new rn({props:{name:"Edit",$$slots:{default:[Nb]},$$scope:{ctx:i}}}),e.$on("click",i[12]),{c(){xe(e.$$.fragment)},m(r,n){be(e,r,n),t=!0},p(r,n){const s={};n&4194304&&(s.$$scope={dirty:n,ctx:r}),e.$set(s)},i(r){t||(G(e.$$.fragment,r),t=!0)},o(r){U(e.$$.fragment,r),t=!1},d(r){ye(e,r)}}}function Rb(i){let e,t,r,n;return e=new rn({props:{name:"Simulation",$$slots:{default:[Ib]},$$scope:{ctx:i}}}),e.$on("click",i[12]),r=new rn({props:{name:"Pack components",$$slots:{default:[Bb]},$$scope:{ctx:i}}}),r.$on("click",function(){ct(i[4].packComponents)&&i[4].packComponents.apply(this,arguments)}),{c(){xe(e.$$.fragment),t=He(),xe(r.$$.fragment)},m(s,o){be(e,s,o),Y(s,t,o),be(r,s,o),n=!0},p(s,o){i=s;const a={};o&4194304&&(a.$$scope={dirty:o,ctx:i}),e.$set(a);const l={};o&4194304&&(l.$$scope={dirty:o,ctx:i}),r.$set(l)},i(s){n||(G(e.$$.fragment,s),G(r.$$.fragment,s),n=!0)},o(s){U(e.$$.fragment,s),U(r.$$.fragment,s),n=!1},d(s){s&&V(t),ye(e,s),ye(r,s)}}}function Nb(i){let e,t;return e=new eb({props:{class:"w-6 h-6"}}),{c(){xe(e.$$.fragment)},m(r,n){be(e,r,n),t=!0},p:re,i(r){t||(G(e.$$.fragment,r),t=!0)},o(r){U(e.$$.fragment,r),t=!1},d(r){ye(e,r)}}}function Ib(i){let e,t;return e=new yb({props:{class:"w-6 h-6"}}),{c(){xe(e.$$.fragment)},m(r,n){be(e,r,n),t=!0},p:re,i(r){t||(G(e.$$.fragment,r),t=!0)},o(r){U(e.$$.fragment,r),t=!1},d(r){ye(e,r)}}}function Bb(i){let e,t;return e=new sb({props:{class:"w-6 h-6"}}),{c(){xe(e.$$.fragment)},m(r,n){be(e,r,n),t=!0},p:re,i(r){t||(G(e.$$.fragment,r),t=!0)},o(r){U(e.$$.fragment,r),t=!1},d(r){ye(e,r)}}}function zb(i){let e,t;return e=new Sb({props:{class:"w-6 h-6"}}),{c(){xe(e.$$.fragment)},m(r,n){be(e,r,n),t=!0},p:re,i(r){t||(G(e.$$.fragment,r),t=!0)},o(r){U(e.$$.fragment,r),t=!1},d(r){ye(e,r)}}}function Vb(i){let e,t,r,n,s,o,a=i[3]===i[10].SIMULATING&&wh(i);const l=[Rb,Fb],c=[];function u(h,d){return h[8]?0:1}return t=u(i),r=c[t]=l[t](i),s=new rn({props:{name:"Finish",$$slots:{default:[zb]},$$scope:{ctx:i}}}),s.$on("click",i[14]),{c(){a&&a.c(),e=He(),r.c(),n=He(),xe(s.$$.fragment)},m(h,d){a&&a.m(h,d),Y(h,e,d),c[t].m(h,d),Y(h,n,d),be(s,h,d),o=!0},p(h,d){h[3]===h[10].SIMULATING?a?(a.p(h,d),d&8&&G(a,1)):(a=wh(h),a.c(),G(a,1),a.m(e.parentNode,e)):a&&(qe(),U(a,1,1,()=>{a=null}),Ue());let f=t;t=u(h),t===f?c[t].p(h,d):(qe(),U(c[f],1,1,()=>{c[f]=null}),Ue(),r=c[t],r?r.p(h,d):(r=c[t]=l[t](h),r.c()),G(r,1),r.m(n.parentNode,n));const g={};d&4194304&&(g.$$scope={dirty:d,ctx:h}),s.$set(g)},i(h){o||(G(a),G(r),G(s.$$.fragment,h),o=!0)},o(h){U(a),U(r),U(s.$$.fragment,h),o=!1},d(h){h&&(V(e),V(n)),a&&a.d(h),c[t].d(h),ye(s,h)}}}function Yb(i){let e,t;return e=new K_({props:{slot:"icon",class:"w-8 h-8"}}),{c(){xe(e.$$.fragment)},m(r,n){be(e,r,n),t=!0},p:re,i(r){t||(G(e.$$.fragment,r),t=!0)},o(r){U(e.$$.fragment,r),t=!1},d(r){ye(e,r)}}}function Xb(i){let e,t,r,n,s,o,a,l,c=i[7]&&!i[8]&&vh(i);const u=[Mb,Db,Ob],h=[];function d(f,g){return f[0]&&!f[8]?0:f[8]?1:2}return n=d(i),s=h[n]=u[n](i),a=new O_({props:{color:"dark",defaultClass:"fixed end-6 top-6",pill:!1,$$slots:{icon:[Yb],default:[Vb]},$$scope:{ctx:i}}}),{c(){c&&c.c(),e=He(),t=ve("main"),r=ve("div"),s.c(),o=He(),xe(a.$$.fragment),j(r,"class","flex flex-grow bg-slate-50"),j(t,"class","container flex flex-col h-screen")},m(f,g){c&&c.m(f,g),Y(f,e,g),Y(f,t,g),H(t,r),h[n].m(r,null),H(t,o),be(a,t,null),l=!0},p(f,[g]){f[7]&&!f[8]?c?(c.p(f,g),g&384&&G(c,1)):(c=vh(f),c.c(),G(c,1),c.m(e.parentNode,e)):c&&(qe(),U(c,1,1,()=>{c=null}),Ue());let m=n;n=d(f),n===m?h[n].p(f,g):(qe(),U(h[m],1,1,()=>{h[m]=null}),Ue(),s=h[n],s?s.p(f,g):(s=h[n]=u[n](f),s.c()),G(s,1),s.m(r,null));const v={};g&4195096&&(v.$$scope={dirty:g,ctx:f}),a.$set(v)},i(f){l||(G(c),G(s),G(a.$$.fragment,f),l=!0)},o(f){U(c),U(s),U(a.$$.fragment,f),l=!1},d(f){f&&(V(e),V(t)),c&&c.d(f),h[n].d(),ye(a)}}}function Wb(i,e,t){let r,n,s;Jo(i,Ss,x=>t(8,n=x)),Jo(i,ki,x=>t(9,s=x));const o={SIMULATING:"simulating",EDITING:"editing"};let a=o.SIMULATING,l,c,u,h="viva",d=!0;function f(){qn(ki,s=!s,s),s&&t(3,a=o.SIMULATING)}function g(x){return Me(this,null,function*(){console.log("Received Shiny data:"),console.log(x),t(0,c=Cn.Graph.serializer().loadFromJSON(x,wv(x),Cv(x)))})}function m(){n?(l.discardActiveSelection(),qn(ki,s=!1,s),qn(Ss,n=!1,n),t(3,a=o.SIMULATING)):(qn(Ss,n=!0,n),t(3,a=o.EDITING))}let v=!0;function p(){t(7,v=!v)}function b(){let x=[];n&&l.persistNodePositions(),c.forEachNode(function(k){var S=u.getNodePosition(k.id);x.push({x:S.x,y:S.y})}),Shiny.setInputValue("coordinates",x)}es(()=>{jQuery(document).on("shiny:connected",function(){console.log("Shiny connected"),Shiny.addCustomMessageHandler("dataTransferredFromServer",g),Shiny.setInputValue("svelteAppMounted",!0)})});function C(x){h=x,t(1,h)}function y(x){d=x,t(6,d)}function w(x){vt[x?"unshift":"push"](()=>{l=x,t(4,l)})}return i.$$.update=()=>{if(i.$$.dirty&2&&t(2,r=Sd.find(x=>x.value===h)),i.$$.dirty&5&&c){let x={};r.settings.forEach(k=>{x[k.id]=k.value}),t(5,u=r.spec(c,x))}},[c,h,r,a,l,u,d,v,n,s,o,f,m,p,b,C,y,w]}class Gb extends Ie{constructor(e){super(),Ne(this,e,Wb,Xb,Ee,{})}}new Gb({target:document.getElementById("app")})});export default Hb(); +`}applyTo2d(e){let{imageData:{data:t}}=e;const i=-this.vibrance;for(let n=0;n{let a=o.left-e.left,l=o.top-e.top,c=a*Math.cos(t)-l*Math.sin(t)+e.left,d=a*Math.sin(t)+l*Math.cos(t)+e.top;return new ve(c,d)}).map(o=>o.y);return Math.max(...n)-Math.min(...n)}function EO(r,...e){let t=-90,i=90,n=1;for(;i-t>n;){let o=t+(i-t)/3,a=i-(i-t)/3,l=r(o,...e),c=r(a,...e);l20&&(i=20),i<.01&&(i=.01),r.zoomToPoint({x:e.e.offsetX,y:e.e.offsetY},i),e.e.preventDefault(),e.e.stopPropagation()}),r.on("mouse:down",function(e){e.e.button===2&&(r.isDragging=!0,r.selection=!1,r.lastPosX=e.e.clientX,r.lastPosY=e.e.clientY)}),r.on("mouse:move",function(e){if(r.isDragging){let t=r.viewportTransform;t[4]+=e.e.clientX-r.lastPosX,t[5]+=e.e.clientY-r.lastPosY,r.requestRenderAll(),r.lastPosX=e.e.clientX,r.lastPosY=e.e.clientY}}),r.on("mouse:up",function(e){r.setViewportTransform(r.viewportTransform),r.isDragging=!1,r.selection=!0})}class OO{constructor(e,t,i,n){this.root={x:e,y:t,w:i,h:n}}fit(e){var t,i,n,s=e.length;for(t=0;t=this.root.w+e,o=i&&this.root.w>=this.root.h+t;return s?this.growRight(e,t):o?this.growDown(e,t):n?this.growRight(e,t):i?this.growDown(e,t):null}growRight(e,t){this.root={used:!0,x:0,y:0,w:this.root.w+e,h:this.root.h,down:this.root,right:{x:this.root.w,y:0,w:e,h:this.root.h}};var i=this.findNode(this.root,e,t);return i?this.splitNode(i,e,t):null}growDown(e,t){this.root={used:!0,x:0,y:0,w:this.root.w,h:this.root.h+t,down:{x:0,y:this.root.h,w:this.root.w,h:t},right:this.root};var i=this.findNode(this.root,e,t);return i?this.splitNode(i,e,t):null}}function IO(r){let e;return{c(){e=ai("canvas"),ae(e,"width","600"),ae(e,"height","400")},m(t,i){Me(t,e,i),r[6](e)},p:Pt,i:Pt,o:Pt,d(t){t&&Le(e),r[6](null)}}}function $b(r){return r.getObjects().reduce((e,t)=>(t.isLCC&&(e.minLeft=Math.min(e.minLeft,t.left),e.minTop=Math.min(e.minTop,t.top),e.maxLeft=Math.max(e.maxLeft,t.left),e.maxTop=Math.max(e.maxTop,t.top)),e),{minLeft:1/0,minTop:1/0,maxLeft:-1/0,maxTop:-1/0})}function LO(r,e,t){let{simulation:i}=e,{nodePositions:n}=e,s,o;const a=new Map,l=new Map,c=new Map;function d(v,b,S){v.angle=S;const _=new es([],{originX:"center",originY:"center",objectCaching:!1});return v.forEachObject(x=>{v.remove(x),_.add(x)}),o.remove(v),l.set(b,_),o.add(_),p(_),_.setCoords(),_}function u(v){if(!o)return;const b=10;let S=[];l.forEach((I,T)=>{let O=I;if(I._objects.length>1){const E=EO(kO,I);O=d(I,T,E)}S.push({w:O.width+b,h:O.height+b,componentId:T})});const _=$b(o);S.sort((I,T)=>I.w===T.w?T.h-I.h:T.w-I.w),new OO(_.maxLeft+b+S[0].w/2,_.minTop,_.maxLeft-_.minLeft,_.maxTop-_.minTop).fit(S),S.forEach(I=>{if(I.fit){const T=l.get(I.componentId);T.left=I.fit.x,T.top=I.fit.y,T.setCoords(),p(T)}}),o.renderAll()}const h={controls:{mtr:gO.createObjectDefaultControls().mtr}};Qn.createControls=()=>h,es.createControls=()=>h,Qn.ownDefaults=fn(Ui({},Qn.ownDefaults),{lockScalingX:!0,lockScalingY:!0});function f(){o.discardActiveObject()}function m(){i.forEachNode(v=>{const b=c.get(v.id);if(b.isLCC){t(1,n[v.id]={x:b.left,y:b.top},n);return}const _=new ve(b.left,b.top).transform(b.group.calcTransformMatrix());t(1,n[v.id]={x:_.x,y:_.y},n)})}function p(v,b=[1,0,0,1,0,0]){const S="_objects"in v;if(S){v._objects.forEach(I=>{p(I,v.calcTransformMatrix())});return}const x=new ve(v.left,v.top).transform(S?v.calcTransformMatrix():b);v.linksDeparting.forEach(I=>{a.get(I).set({x1:x.x,y1:x.y})}),v.linksArriving.forEach(I=>{a.get(I).set({x2:x.x,y2:x.y})})}uf(()=>{o=new d0(s,{fireRightClick:!0,stopContextMenu:!0}),AO(o),o.on({"object:moving":x=>p(x.target),"object:rotating":x=>p(x.target)}),i.forEachLink(x=>{const I=n[x.fromId||x.source],T=n[x.toId||x.target],O=[I.x,I.y,T.x,T.y],E=new fo(O,{fill:null,stroke:"#909090",strokeWidth:1,selectable:!1,evented:!1,objectCaching:!1});a.set(x.id,E),o.add(E)}),i.forEachNode(x=>{const I=[],T=[];x.links&&x.links.forEach(X=>{X.fromId===x.id?I.push(X.id):T.push(X.id)});const O=n[x.id],E="data"in x?x.data.component||null:x.component||null,w=new Ln({left:O.x,top:O.y,fill:x.color||x.data.color||"#000000",width:x.size||x.data.size||10,height:x.size||x.data.size||10,angle:90,hasControls:!1,originX:"center",originY:"center",objectCaching:!1,linksDeparting:I,linksArriving:T,isLCC:E===null});if(c.set(x.id,w),E===null){o.add(w);return}if(!l.has(E)){const X=new es([w],{originX:"center",originY:"center",objectCaching:!1});l.set(E,X),o.add(X);return}l.get(E).add(w)}),o.requestRenderAll();const v=$b(o),b=(v.minLeft+v.maxLeft)/2,S=(v.minTop+v.maxTop)/2;Math.min(v.maxLeft-v.minLeft,v.maxTop-v.minTop),Math.min(s.clientWidth,s.clientHeight);const _=new ve(-s.clientWidth/2+b,-s.clientHeight/2+S);o.absolutePan(_)}),sS(()=>{m(),o.dispose()});function g(v){en[v?"unshift":"push"](()=>{s=v,t(0,s)})}return r.$$set=v=>{"simulation"in v&&t(2,i=v.simulation),"nodePositions"in v&&t(1,n=v.nodePositions)},[s,n,i,u,f,m,g]}class PO extends cr{constructor(e){super(),lr(this,e,LO,IO,Oi,{simulation:2,nodePositions:1,packComponents:3,discardActiveSelection:4,persistNodePositions:5})}get packComponents(){return this.$$.ctx[3]}get discardActiveSelection(){return this.$$.ctx[4]}get persistNodePositions(){return this.$$.ctx[5]}}var Xi=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Sv(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function ET(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var n=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return r[i]}})}),t}var _d={random:AT,randomIterator:DO};function AT(r){var e=typeof r=="number"?r:+new Date,t=function(){return e=e+2127912214+(e<<12)&4294967295,e=(e^3345072700^e>>>19)&4294967295,e=e+374761393+(e<<5)&4294967295,e=(e+3550635116^e<<9)&4294967295,e=e+4251993797+(e<<3)&4294967295,e=(e^3042594569^e>>>16)&4294967295,(e&268435455)/268435456};return{next:function(i){return Math.floor(t()*i)},nextDouble:function(){return t()}}}function DO(r,e){var t=e||AT();if(typeof t.next!="function")throw new Error("customRandom does not match expected API: next() function is missing");return{forEach:function(i){var n,s,o;for(n=r.length-1;n>0;--n)s=t.next(n+1),o=r[s],r[s]=r[n],r[n]=o,i(o);r.length&&i(r[0])},shuffle:function(){var i,n,s;for(i=r.length-1;i>0;--i)n=t.next(i+1),s=r[n],r[n]=r[i],r[i]=s;return r}}}var fp,e1;function Hl(){if(e1)return fp;e1=1,fp=r;function r(e,t){var i;if(e||(e={}),t){for(i in t)if(t.hasOwnProperty(i)){var n=e.hasOwnProperty(i),s=typeof t[i],o=!n||typeof e[i]!==s;o?e[i]=t[i]:s==="object"&&(e[i]=r(e[i],t[i]))}}return e}return fp}var mp,t1;function va(){if(t1)return mp;t1=1,mp=function(t){e(t);var i=r(t);return t.on=i.on,t.off=i.off,t.fire=i.fire,t};function r(t){var i=Object.create(null);return{on:function(n,s,o){if(typeof s!="function")throw new Error("callback is expected to be a function");var a=i[n];return a||(a=i[n]=[]),a.push({callback:s,ctx:o}),t},off:function(n,s){var o=typeof n=="undefined";if(o)return i=Object.create(null),t;if(i[n]){var a=typeof s!="function";if(a)delete i[n];else for(var l=i[n],c=0;c1&&(o=Array.prototype.splice.call(arguments,1));for(var a=0;a=0&&He.links.splice(pe,1)),dt&&(pe=t(de,dt.links),pe>=0&&dt.links.splice(pe,1)),g(de,"remove"),S(),!0}function M(de,pe){var He=E(de),dt;if(!He||!He.links)return null;for(dt=0;dt0&&(_.fire("changed",p),p.length=0)}function je(){return Object.keys?At:It}function At(de){if(typeof de=="function"){for(var pe=Object.keys(l),He=0;He0?o[s]=(h-1)/f:o[s]=0}function d(u){for(e.forEachNode(f),n[u]=0,i.push(u);i.length;){var h=i.shift();e.forEachLinkedNode(h,m,t)}function f(p){var g=p.id;n[g]=-1}function m(p){var g=p.id;n[g]===-1&&(n[g]=n[h]+1,i.push(g))}}}return xp}var wp,c1;function jO(){if(c1)return wp;c1=1,wp=r;function r(e,t){var i=[],n=Object.create(null),s,o=Object.create(null);return e.forEachNode(a),e.forEachNode(l),o;function a(u){o[u.id]=0}function l(u){s=u.id,d(s),c()}function c(){var u=0;Object.keys(n).forEach(function(h){var f=n[h];u=0==b>=4||(d=l-o,h=s-a,m=a*o-s*l,p=d*e+h*t+m,g=d*i+h*n+m,p!==0&&g!==0&&p>=0==g>=0)||(S=c*h-d*u,S===0)?null:(_=S<0?-S/2:S/2,_=0,x=u*m-h*f,I.x=(x<0?x-_:x+_)/S,x=d*f-c*m,I.y=(x<0?x-_:x+_)/S,I)}return Cp}var kp,m1;function HO(){if(m1)return kp;m1=1;var r=OT();kp=e;function e(t,i,n,s,o,a,l,c){return r(t,i,t,s,o,a,l,c)||r(t,s,n,s,o,a,l,c)||r(n,s,n,i,o,a,l,c)||r(n,i,t,i,o,a,l,c)}return kp}var Ep,p1;function Sf(){if(p1)return Ep;p1=1,Ep=r;function r(i){return{createProgram:s,extendArray:o,copyArrayPart:e,swapArrayPart:t,getLocations:a,context:i};function n(l,c){var d=i.createShader(c);if(i.shaderSource(d,l),i.compileShader(d),!i.getShaderParameter(d,i.COMPILE_STATUS)){var u=i.getShaderInfoLog(d);throw window.alert(u),u}return d}function s(l,c){var d=i.createProgram(),u=n(l,i.VERTEX_SHADER),h=n(c,i.FRAGMENT_SHADER);if(i.attachShader(d,u),i.attachShader(d,h),i.linkProgram(d),!i.getProgramParameter(d,i.LINK_STATUS)){var f=i.getShaderInfoLog(d);throw window.alert(f),f}return d}function o(l,c,d){if((c+1)*d>l.length){var u=new Float32Array(l.length*d*2);return u.set(l),u}return l}function a(l,c){for(var d={},u=0;u=1||o===0);return a*Math.sqrt(-2*Math.log(o)/o)}function i(){var o=this.seed;return o=o+2127912214+(o<<12)&4294967295,o=(o^3345072700^o>>>19)&4294967295,o=o+374761393+(o<<5)&4294967295,o=(o+3550635116^o<<9)&4294967295,o=o+4251993797+(o<<3)&4294967295,o=(o^3042594569^o>>>16)&4294967295,this.seed=o,(o&268435455)/268435456}function n(o){return Math.floor(this.nextDouble()*o)}function s(o,a){var l=a||r();if(typeof l.next!="function")throw new Error("customRandom does not match expected API: next() function is missing");return{forEach:d,shuffle:c};function c(){var u,h,f;for(u=o.length-1;u>0;--u)h=l.next(u+1),f=o[h],o[h]=o[u],o[u]=f;return o}function d(u){var h,f,m;for(h=o.length-1;h>0;--h)f=l.next(h+1),m=o[f],o[f]=o[h],o[h]=m,u(m);o.length&&u(o[0])}}return gc.exports}var b1;function WO(){if(b1)return Xu.exports;b1=1;var r=Tv();Xu.exports=e(r),Xu.exports.factory=e;function e(t){return{ladder:i,complete:s,completeBipartite:o,balancedBinTree:d,path:a,circularLadder:n,grid:l,grid3:c,noLinks:u,wattsStrogatz:f,cliqueCircle:h};function i(m){if(!m||m<0)throw new Error("Invalid number of nodes");var p=t(),g;for(g=0;g0&&g.addLink(S,v-1+b*m),b>0&&g.addLink(S,v+(b-1)*m)}return g}function c(m,p,g){if(m<1||p<1||g<1)throw new Error("Invalid number of nodes in grid3 graph");var v=t(),b,S,_;if(m===1&&p===1&&g===1)return v.addNode(0),v;for(_=0;_0&&v.addLink(I,b-1+S*m+x),S>0&&v.addLink(I,b+(S-1)*m+x),_>0&&v.addLink(I,b+S*m+(_-1)*m*p)}return v}function d(m){if(m<0)throw new Error("Invalid number of nodes in balanced tree");var p=t(),g=Math.pow(2,m),v;for(m===0&&p.addNode(1),v=1;v= 0");var p=t(),g;for(g=0;g0&&g.addLink(v*p,v*p-1);return g.addLink(0,g.getNodesCount()-1),g;function b(S,_){for(var x=0;x=m)throw new Error("Choose smaller `k`. It cannot be larger than number of nodes `n`");var b=XO().random(v||42),S=t(),_,x;for(_=0;_p&&(J=1),l(D,J,{x:D.touches[0].clientX,y:D.touches[0].clientY}),p=L,b(D),S(D)}},H=function(D){m=!1,r.off("touchmove",X),r.off("touchend",H),r.off("touchcancel",H),f=null,a&&a(D)},Y=function(D,M){b(D),S(D),u=M.clientX,h=M.clientY,f=D.target||D.srcElement,s&&s(D,{x:u,y:h}),m||(m=!0,r.on("touchmove",X),r.on("touchend",H),r.on("touchcancel",H))},k=function(D){if(D.touches.length===1)return Y(D,D.touches[0]);D.touches.length===2&&(b(D),S(D),p=w(D.touches[0],D.touches[1]))};return n.addEventListener("mousedown",I),n.addEventListener("touchstart",k),{onStart:function(D){return s=D,this},onDrag:function(D){return o=D,this},onStop:function(D){return a=D,this},onScroll:function(D){return E(D),this},release:function(){n.removeEventListener("mousedown",I),n.removeEventListener("touchstart",k),r.off("mousemove",x),r.off("mouseup",T),r.off("touchmove",X),r.off("touchend",H),r.off("touchcancel",H),E(null)}}}return Dp}var Mp,T1;function kv(){if(T1)return Mp;T1=1,Mp=e;var r=Cv();function e(t,i){var n={};return{bindDragNDrop:s};function s(o,a){var l;if(a){var c=i.getNodeUI(o.id);l=r(c),typeof a.onStart=="function"&&l.onStart(a.onStart),typeof a.onDrag=="function"&&l.onDrag(a.onDrag),typeof a.onStop=="function"&&l.onStop(a.onStop),n[o.id]=l}else(l=n[o.id])&&(l.release(),delete n[o.id])}}return Mp}var Rp,C1;function RT(){if(C1)return Rp;C1=1,Rp=e;var r=PT();function e(t,i){var n=r(i),s=null,o={},a={x:0,y:0};return n.mouseDown(function(l,c){s=l,a.x=c.clientX,a.y=c.clientY,n.mouseCapture(s);var d=o[l.id];return d&&d.onStart&&d.onStart(c,a),!0}).mouseUp(function(l){n.releaseMouseCapture(s),s=null;var c=o[l.id];return c&&c.onStop&&c.onStop(),!0}).mouseMove(function(l,c){if(s){var d=o[s.id];return d&&d.onDrag&&d.onDrag(c,{x:c.clientX-a.x,y:c.clientY-a.y}),a.x=c.clientX,a.y=c.clientY,!0}}),{bindDragNDrop:function(l,c){o[l.id]=c,c||delete o[l.id]}}}return Rp}var Fp,k1;function FT(){if(k1)return Fp;k1=1,Fp=r();function r(){var t=0,i=["ms","moz","webkit","o"],n,s;for(typeof window!="undefined"?s=window:typeof Xi!="undefined"?s=Xi:s={setTimeout:e,clearTimeout:e},n=0;n0)return this.stack[--this.popIdx]},reset:function(){this.popIdx=0}};function e(t,i){this.node=t,this.body=i}return Vp}var Up,D1;function JO(){return D1||(D1=1,Up=function(e,t){var i=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);return i<1e-8&&n<1e-8}),Up}var Hp,M1;function QO(){if(M1)return Hp;M1=1,Hp=function(t){t=t||{},t.gravity=typeof t.gravity=="number"?t.gravity:-1,t.theta=typeof t.theta=="number"?t.theta:.8;var i=_d.random(1984),n=ZO(),s=KO(),o=JO(),a=t.gravity,l=[],c=new s,d=t.theta,u=[],h=0,f=m();return{insertBodies:g,getRoot:function(){return f},updateBodyForce:p,options:function(b){return b?(typeof b.gravity=="number"&&(a=b.gravity),typeof b.theta=="number"&&(d=b.theta),this):{gravity:a,theta:d}}};function m(){var b=u[h];return b?(b.quad0=null,b.quad1=null,b.quad2=null,b.quad3=null,b.body=null,b.mass=b.massX=b.massY=0,b.left=b.right=b.top=b.bottom=0):(b=new n,u[h]=b),++h,b}function p(b){var S=l,_,x,I,T,O=0,E=0,w=1,X=0,H=1;for(S[0]=f;w;){var Y=S[X],k=Y.body;w-=1,X+=1;var D=k!==b;k&&D?(x=k.pos.x-b.pos.x,I=k.pos.y-b.pos.y,T=Math.sqrt(x*x+I*I),T===0&&(x=(i.nextDouble()-.5)/50,I=(i.nextDouble()-.5)/50,T=Math.sqrt(x*x+I*I)),_=a*k.mass*b.mass/(T*T*T),O+=_*x,E+=_*I):D&&(x=Y.massX/Y.mass-b.pos.x,I=Y.massY/Y.mass-b.pos.y,T=Math.sqrt(x*x+I*I),T===0&&(x=(i.nextDouble()-.5)/50,I=(i.nextDouble()-.5)/50,T=Math.sqrt(x*x+I*I)),(Y.right-Y.left)/Tx&&(x=E),w<_&&(_=w),w>I&&(I=w)}var X=x-S,H=I-_;for(X>H?I=_+X:x=S+H,h=0,f=m(),f.left=S,f.right=x,f.top=_,f.bottom=I,T=O-1,T>=0&&(f.body=b[T]);T--;)v(b[T])}function v(b){for(c.reset(),c.push(f,b);!c.isEmpty();){var S=c.pop(),_=S.node,x=S.body;if(_.body){var k=_.body;if(_.body=null,o(k.pos,x.pos)){var D=3;do{var M=i.nextDouble(),L=(_.right-_.left)*M,J=(_.bottom-_.top)*M;k.pos.x=_.left+L,k.pos.y=_.top+J,D-=1}while(D>0&&o(k.pos,x.pos));if(D===0&&o(k.pos,x.pos))return}c.push(_,k),c.push(_,x)}else{var I=x.pos.x,T=x.pos.y;_.mass=_.mass+x.mass,_.massX=_.massX+x.mass*I,_.massY=_.massY+x.mass*T;var O=0,E=_.left,w=(_.right+E)/2,X=_.top,H=(_.bottom+X)/2;I>w&&(O=O+1,E=w,w=_.right),T>H&&(O=O+2,X=H,H=_.bottom);var Y=r(_,O);Y?c.push(Y,x):(Y=m(),Y.left=E,Y.top=X,Y.right=w,Y.bottom=H,Y.body=x,e(_,O,Y))}}}};function r(t,i){return i===0?t.quad0:i===1?t.quad1:i===2?t.quad2:i===3?t.quad3:null}function e(t,i,n){i===0?t.quad0=n:i===1?t.quad1=n:i===2?t.quad2=n:i===3&&(t.quad3=n)}return Hp}var Xp,R1;function $O(){return R1||(R1=1,Xp=function(r,e){var t=_d.random(42),i={x1:0,y1:0,x2:0,y2:0};return{box:i,update:n,reset:function(){i.x1=i.y1=0,i.x2=i.y2=0},getBestNewPosition:function(s){var o=i,a=0,l=0;if(s.length){for(var c=0;cl&&(l=d.pos.x),d.pos.yc&&(c=d.pos.y)}i.x1=o,i.x2=l,i.y1=a,i.y2=c}}}),Xp}var Wp,F1;function eI(){return F1||(F1=1,Wp=function(r){var e=Hl(),t=Ev();r=e(r,{dragCoeff:.02});var i={update:function(n){n.force.x-=r.dragCoeff*n.velocity.x,n.force.y-=r.dragCoeff*n.velocity.y}};return t(r,i,["dragCoeff"]),i}),Wp}var Yp,N1;function tI(){return N1||(N1=1,Yp=function(r){var e=Hl(),t=_d.random(42),i=Ev();r=e(r,{springCoeff:2e-4,springLength:80});var n={update:function(s){var o=s.from,a=s.to,l=s.length<0?r.springLength:s.length,c=a.pos.x-o.pos.x,d=a.pos.y-o.pos.y,u=Math.sqrt(c*c+d*d);u===0&&(c=(t.nextDouble()-.5)/50,d=(t.nextDouble()-.5)/50,u=Math.sqrt(c*c+d*d));var h=u-l,f=(!s.coeff||s.coeff<0?r.springCoeff:s.coeff)*h/u*s.weight;o.force.x+=f*c,o.force.y+=f*d,a.force.x-=f*c,a.force.y-=f*d}};return i(r,n,["springCoeff","springLength"]),n}),Yp}var qp,z1;function iI(){if(z1)return qp;z1=1,qp=r;function r(e,t){var i=0,n=0,s=0,o=0,a,l=e.length;if(l===0)return 0;for(a=0;a1&&(c.velocity.x=u/f,c.velocity.y=h/f),i=t*c.velocity.x,s=t*c.velocity.y,c.pos.x+=i,c.pos.y+=s,n+=Math.abs(i),o+=Math.abs(s)}return(n*n+o*o)/l}return qp}var Zp,B1;function rI(){if(B1)return Zp;B1=1,Zp={Body:r,Vector2d:e,Body3d:t,Vector3d:i};function r(n,s){this.pos=new e(n,s),this.prevPos=new e(n,s),this.force=new e,this.velocity=new e,this.mass=1}r.prototype.setPosition=function(n,s){this.prevPos.x=this.pos.x=n,this.prevPos.y=this.pos.y=s};function e(n,s){n&&typeof n!="number"?(this.x=typeof n.x=="number"?n.x:0,this.y=typeof n.y=="number"?n.y:0):(this.x=typeof n=="number"?n:0,this.y=typeof s=="number"?s:0)}e.prototype.reset=function(){this.x=this.y=0};function t(n,s,o){this.pos=new i(n,s,o),this.prevPos=new i(n,s,o),this.force=new i,this.velocity=new i,this.mass=1}t.prototype.setPosition=function(n,s,o){this.prevPos.x=this.pos.x=n,this.prevPos.y=this.pos.y=s,this.prevPos.z=this.pos.z=o};function i(n,s,o){n&&typeof n!="number"?(this.x=typeof n.x=="number"?n.x:0,this.y=typeof n.y=="number"?n.y:0,this.z=typeof n.z=="number"?n.z:0):(this.x=typeof n=="number"?n:0,this.y=typeof s=="number"?s:0,this.z=typeof o=="number"?o:0)}return i.prototype.reset=function(){this.x=this.y=this.z=0},Zp}var Kp,j1;function nI(){if(j1)return Kp;j1=1;var r=rI();return Kp=function(e){return new r.Body(e)},Kp}var Jp,G1;function V1(){if(G1)return Jp;G1=1,Jp=r;function r(e){var t=qO(),i=Ev(),n=Hl(),s=va();e=n(e,{springLength:30,springCoeff:8e-4,gravity:-1.2,theta:.8,dragCoeff:.02,timeStep:20});var o=e.createQuadTree||QO(),a=e.createBounds||$O(),l=e.createDragForce||eI(),c=e.createSpringForce||tI(),d=e.integrator||iI(),u=e.createBody||nI(),h=[],f=[],m=o(e),p=a(h,e),g=c(e),v=l(e),b=!0,S=0,_={bodies:h,quadTree:m,springs:f,settings:e,step:function(){x();var I=d(h,e.timeStep);return p.update(),I},addBody:function(I){if(!I)throw new Error("Body is required");return h.push(I),I},addBodyAt:function(I){if(!I)throw new Error("Body position is required");var T=u(I);return h.push(T),T},removeBody:function(I){if(I){var T=h.indexOf(I);if(!(T<0))return h.splice(T,1),h.length===0&&p.reset(),!0}},addSpring:function(I,T,O,E,w){if(!I||!T)throw new Error("Cannot add null spring to force simulator");typeof O!="number"&&(O=-1);var X=new t(I,T,O,w>=0?w:-1,E);return f.push(X),X},getTotalMovement:function(){return S},removeSpring:function(I){if(I){var T=f.indexOf(I);if(T>-1)return f.splice(T,1),!0}},getBestNewBodyPosition:function(I){return p.getBestNewPosition(I)},getBBox:function(){return b&&(p.update(),b=!1),p.box},invalidateBBox:function(){b=!0},gravity:function(I){return I!==void 0?(e.gravity=I,m.options({gravity:I}),this):e.gravity},theta:function(I){return I!==void 0?(e.theta=I,m.options({theta:I}),this):e.theta}};return i(e,_),s(_),_;function x(){var I,T=h.length;if(T)for(m.insertBodies(h);T--;)I=h[T],I.isPinned||(I.force.reset(),m.updateBodyForce(I),v.update(I));for(T=f.length;T--;)g.update(f[T])}}return Jp}var Qp,U1;function sI(){if(U1)return Qp;U1=1,Qp=function(t){e(t);var i=r(t);return t.on=i.on,t.off=i.off,t.fire=i.fire,t};function r(t){var i=Object.create(null);return{on:function(n,s,o){if(typeof s!="function")throw new Error("callback is expected to be a function");var a=i[n];return a||(a=i[n]=[]),a.push({callback:s,ctx:o}),t},off:function(n,s){var o=typeof n=="undefined";if(o)return i=Object.create(null),t;if(i[n]){var a=typeof s!="function";if(a)delete i[n];else for(var l=i[n],c=0;c1&&(o=Array.prototype.splice.call(arguments,1));for(var a=0;ab.x2&&(b.x2=v.x),v.yb.y2&&(b.y2=v.y)},u=typeof Object.create=="function"?Object.create(null):{},h=function(v){u[v.id]=c(v),d(u[v.id],a)},f=function(){n.getNodesCount()!==0&&(a.x1=Number.MAX_VALUE,a.y1=Number.MAX_VALUE,a.x2=Number.MIN_VALUE,a.y2=Number.MIN_VALUE,n.forEachNode(h))},m=function(v){l[v.id]=v},p=function(v){for(var b=0;b=d.length&&b();var Y=d[X.textureNumber];Y.ctx.drawImage(E,X.col*s,X.row*s,s,s),u[O]=E.src,a[E.src]=H,Y.isDirty=!0,w(H)}function _(O){var E=O/i<<0,w=O%i,X=w/n<<0,H=w%n;return{textureNumber:E,row:X,col:H}}function x(){h.isDirty=!0,c=0,l=null}function I(){l&&(window.clearTimeout(l),c+=1,l=null),c>10?x():l=window.setTimeout(x,400)}function T(O,E){var w=d[O.textureNumber].canvas,X=d[E.textureNumber].ctx,H=E.col*s,Y=E.row*s;X.drawImage(w,O.col*s,O.row*s,s,s,H,Y,s,s),d[O.textureNumber].isDirty=!0,d[E.textureNumber].isDirty=!0}}function t(i){return(i&i-1)===0}return ig}var rg,Z1;function aI(){if(Z1)return rg;Z1=1;var r=GT(),e=Sf();rg=t;function t(c){var o=18,a=i(),l=n(),c=c||1024,d,u,h,f,m,p,g=0,v=new Float32Array(64),b,S,_,x;return{load:O,position:E,createNode:w,removeNode:X,replaceProperties:H,updateTransform:Y,updateSize:k,render:D};function I(M,L){M.nativeObject&&h.deleteTexture(M.nativeObject);var J=h.createTexture();h.activeTexture(h["TEXTURE"+L]),h.bindTexture(h.TEXTURE_2D,J),h.texImage2D(h.TEXTURE_2D,0,h.RGBA,h.RGBA,h.UNSIGNED_BYTE,M.canvas),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,h.LINEAR),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,h.LINEAR_MIPMAP_NEAREST),h.generateMipmap(h.TEXTURE_2D),h.uniform1i(p["sampler"+L],L),M.nativeObject=J}function T(){if(d.isDirty){var M=d.getTextures(),L;for(L=0;L0&&(g-=1),M.id0&&(M.src&&d.remove(M.src),m.copyArrayPart(v,M.id*o,g*o,o))}function H(M,L){L._offset=M._offset}function Y(M){x=!0,_=M}function k(M,L){b=M,S=L,x=!0}function D(){h.useProgram(u),h.bindBuffer(h.ARRAY_BUFFER,f),h.bufferData(h.ARRAY_BUFFER,v,h.DYNAMIC_DRAW),x&&(x=!1,h.uniformMatrix4fv(p.transform,!1,_),h.uniform2f(p.screenSize,b,S)),h.vertexAttribPointer(p.vertexPos,2,h.FLOAT,!1,3*Float32Array.BYTES_PER_ELEMENT,0),h.vertexAttribPointer(p.customAttributes,1,h.FLOAT,!1,3*Float32Array.BYTES_PER_ELEMENT,2*4),T(),h.drawArrays(h.TRIANGLES,0,g*6)}}function i(){return["precision mediump float;","varying vec4 color;","varying vec3 vTextureCoord;","uniform sampler2D u_sampler0;","uniform sampler2D u_sampler1;","uniform sampler2D u_sampler2;","uniform sampler2D u_sampler3;","void main(void) {"," if (vTextureCoord.z == 0.) {"," gl_FragColor = texture2D(u_sampler0, vTextureCoord.xy);"," } else if (vTextureCoord.z == 1.) {"," gl_FragColor = texture2D(u_sampler1, vTextureCoord.xy);"," } else if (vTextureCoord.z == 2.) {"," gl_FragColor = texture2D(u_sampler2, vTextureCoord.xy);"," } else if (vTextureCoord.z == 3.) {"," gl_FragColor = texture2D(u_sampler3, vTextureCoord.xy);"," } else { gl_FragColor = vec4(0, 1, 0, 1); }","}"].join(` +`)}function n(){return["attribute vec2 a_vertexPos;","attribute float a_customAttributes;","uniform vec2 u_screenSize;","uniform mat4 u_transform;","uniform float u_tilesPerTexture;","varying vec3 vTextureCoord;","void main(void) {"," gl_Position = u_transform * vec4(a_vertexPos/u_screenSize, 0, 1);","float corner = mod(a_customAttributes, 4.);","float tileIndex = mod(floor(a_customAttributes / 4.), u_tilesPerTexture);","float tilesPerRow = sqrt(u_tilesPerTexture);","float tileSize = 1./tilesPerRow;","float tileColumn = mod(tileIndex, tilesPerRow);","float tileRow = floor(tileIndex/tilesPerRow);","if(corner == 0.0) {"," vTextureCoord.xy = vec2(0, 1);","} else if(corner == 1.0) {"," vTextureCoord.xy = vec2(1, 1);","} else if(corner == 2.0) {"," vTextureCoord.xy = vec2(0, 0);","} else {"," vTextureCoord.xy = vec2(1, 0);","}","vTextureCoord *= tileSize;","vTextureCoord.x += tileColumn * tileSize;","vTextureCoord.y += tileRow * tileSize;","vTextureCoord.z = floor(floor(a_customAttributes / 4.)/u_tilesPerTexture);","}"].join(` +`)}return rg}var ng,K1;function VT(){if(K1)return ng;K1=1;var r=Sf();ng=e;function e(){var t=6,i=2*(2*Float32Array.BYTES_PER_ELEMENT+Uint32Array.BYTES_PER_ELEMENT),n=["precision mediump float;","varying vec4 color;","void main(void) {"," gl_FragColor = color;","}"].join(` +`),s=["attribute vec2 a_vertexPos;","attribute vec4 a_color;","uniform vec2 u_screenSize;","uniform mat4 u_transform;","varying vec4 color;","void main(void) {"," gl_Position = u_transform * vec4(a_vertexPos/u_screenSize, 0.0, 1.0);"," color = a_color.abgr;","}"].join(` +`),o,a,l,c,d,u=0,h,f=new ArrayBuffer(16*i),m=new Float32Array(f),p=new Uint32Array(f),g,v,b,S,_=function(){if((u+1)*i>f.byteLength){var x=new ArrayBuffer(f.byteLength*2),I=new Float32Array(x),T=new Uint32Array(x);T.set(p),m=I,p=T,f=x}};return{load:function(x){a=x,c=r(x),o=c.createProgram(s,n),a.useProgram(o),d=c.getLocations(o,["a_vertexPos","a_color","u_screenSize","u_transform"]),a.enableVertexAttribArray(d.vertexPos),a.enableVertexAttribArray(d.color),l=a.createBuffer()},position:function(x,I,T){var O=x.id,E=O*t;m[E]=I.x,m[E+1]=I.y,p[E+2]=x.color,m[E+3]=T.x,m[E+4]=T.y,p[E+5]=x.color},createLink:function(x){_(),u+=1,h=x.id},removeLink:function(x){u>0&&(u-=1),x.id0&&c.copyArrayPart(p,x.id*t,u*t,t)},updateTransform:function(x){S=!0,b=x},updateSize:function(x,I){g=x,v=I,S=!0},render:function(){a.useProgram(o),a.bindBuffer(a.ARRAY_BUFFER,l),a.bufferData(a.ARRAY_BUFFER,f,a.DYNAMIC_DRAW),S&&(S=!1,a.uniformMatrix4fv(d.transform,!1,b),a.uniform2f(d.screenSize,g,v)),a.vertexAttribPointer(d.vertexPos,2,a.FLOAT,!1,3*Float32Array.BYTES_PER_ELEMENT,0),a.vertexAttribPointer(d.color,4,a.UNSIGNED_BYTE,!0,3*Float32Array.BYTES_PER_ELEMENT,2*4),a.drawArrays(a.LINES,0,u*2),h=u-1},bringToFront:function(x){h>x.id&&c.swapArrayPart(m,x.id*t,h*t,t),h>0&&(h-=1)},getFrontLinkId:function(){return h}}}return ng}var sg,J1;function UT(){if(J1)return sg;J1=1;var r=Sf();sg=e;function e(){var t=4,i=3*Float32Array.BYTES_PER_ELEMENT+Uint32Array.BYTES_PER_ELEMENT,n=["precision mediump float;","varying vec4 color;","void main(void) {"," gl_FragColor = color;","}"].join(` +`),s=["attribute vec3 a_vertexPos;","attribute vec4 a_color;","uniform vec2 u_screenSize;","uniform mat4 u_transform;","varying vec4 color;","void main(void) {"," gl_Position = u_transform * vec4(a_vertexPos.xy/u_screenSize, 0, 1);"," gl_PointSize = a_vertexPos.z * u_transform[0][0];"," color = a_color.abgr;","}"].join(` +`),o,a,l,c,d,u=new ArrayBuffer(16*i),h=new Float32Array(u),f=new Uint32Array(u),m=0,p,g,v,b;return{load:_,position:x,updateTransform:I,updateSize:T,removeNode:O,createNode:E,replaceProperties:w,render:X};function S(){if((m+1)*i>=u.byteLength){var H=new ArrayBuffer(u.byteLength*2),Y=new Float32Array(H),k=new Uint32Array(H);k.set(f),h=Y,f=k,u=H}}function _(H){a=H,d=r(H),o=d.createProgram(s,n),a.useProgram(o),c=d.getLocations(o,["a_vertexPos","a_color","u_screenSize","u_transform"]),a.enableVertexAttribArray(c.vertexPos),a.enableVertexAttribArray(c.color),l=a.createBuffer()}function x(H,Y){var k=H.id;h[k*t]=Y.x,h[k*t+1]=-Y.y,h[k*t+2]=H.size,f[k*t+3]=H.color}function I(H){b=!0,v=H}function T(H,Y){p=H,g=Y,b=!0}function O(H){m>0&&(m-=1),H.id0&&d.copyArrayPart(f,H.id*t,m*t,t)}function E(){S(),m+=1}function w(){}function X(){a.useProgram(o),a.bindBuffer(a.ARRAY_BUFFER,l),a.bufferData(a.ARRAY_BUFFER,u,a.DYNAMIC_DRAW),b&&(b=!1,a.uniformMatrix4fv(c.transform,!1,v),a.uniform2f(c.screenSize,p,g)),a.vertexAttribPointer(c.vertexPos,3,a.FLOAT,!1,t*Float32Array.BYTES_PER_ELEMENT,0),a.vertexAttribPointer(c.color,4,a.UNSIGNED_BYTE,!0,t*Float32Array.BYTES_PER_ELEMENT,3*4),a.drawArrays(a.POINTS,0,m)}}return sg}var og,Q1;function Av(){if(Q1)return og;Q1=1,og=r;function r(e){var t=10414335;if(typeof e=="string"&&e)if(e.length===4&&(e=e.replace(/([^#])/g,"$1$1")),e.length===9)t=parseInt(e.substr(1),16);else if(e.length===7)t=parseInt(e.substr(1),16)<<8|255;else throw'Color expected in hex format with preceding "#". E.g. #00ff00. Got value: '+e;else typeof e=="number"&&(t=e);return t}return og}var ag,$1;function HT(){if($1)return ag;$1=1;var r=Av();ag=e;function e(t){return{color:r(t)}}return ag}var lg,ex;function XT(){if(ex)return lg;ex=1;var r=Av();lg=e;function e(t,i){return{size:typeof t=="number"?t:10,color:r(i)}}return lg}var cg,tx;function lI(){if(tx)return cg;tx=1,cg=r;function r(e,t){return{_texture:0,_offset:0,size:typeof e=="number"?e:32,src:t}}return cg}var dg,ix;function cI(){if(ix)return dg;ix=1,dg=a;var r=RT(),e=VT(),t=UT(),i=XT(),n=HT(),s=va(),o=Hl();function a(l){l=o(l,{enableBlending:!0,preserveDrawingBuffer:!1,clearColor:!1,clearColorValue:{r:1,g:1,b:1,a:1}});var c,d,u,h,f,m=0,p=0,g=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],v,b,S=[],_=[],x,I={},T={},O=e(),E=t(),w=function(L){return i()},X=function(L){return n(3014898687)},H=function(){O.updateTransform(g),E.updateTransform(g)},Y=function(){g=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},k=function(){c&&d&&(h=d.width=Math.max(c.offsetWidth,1),f=d.height=Math.max(c.offsetHeight,1),u&&u.viewport(0,0,h,f),O&&O.updateSize(h/2,f/2),E&&E.updateSize(h/2,f/2))},D=function(L){L.fire("rescaled")};d=window.document.createElement("canvas");var M={getLinkUI:function(L){return T[L]},getNodeUI:function(L){return I[L]},node:function(L){if(typeof L=="function")return w=L,this},link:function(L){if(typeof L=="function")return X=L,this},placeNode:function(L){return v=L,this},placeLink:function(L){return b=L,this},inputManager:r,beginRender:function(){},endRender:function(){p>0&&O.render(),m>0&&E.render()},bringLinkToFront:function(L){var J=O.getFrontLinkId(),ce,te;O.bringToFront(L),J>L.id&&(ce=L.id,te=_[J],_[J]=_[ce],_[J].id=J,_[ce]=te,_[ce].id=ce)},graphCenterChanged:function(L,J){g[12]=2*L/h-1,g[13]=1-2*J/f,H()},addLink:function(L,J){var ce=p++,te=X(L);return te.id=ce,te.pos=J,O.createLink(te),_[ce]=te,T[L.id]=te,te},addNode:function(L,J){var ce=m++,te=w(L);return te.id=ce,te.position=J,te.node=L,E.createNode(te),S[ce]=te,I[L.id]=te,te},translateRel:function(L,J){g[12]+=2*g[0]*L/h/g[0],g[13]-=2*g[5]*J/f/g[5],H()},scale:function(L,J){var ce=2*J.x/h-1,te=1-2*J.y/f;return ce-=g[12],te-=g[13],g[12]+=ce*(1-L),g[13]+=te*(1-L),g[0]*=L,g[5]*=L,H(),D(this),g[0]},resetScale:function(){return Y(),u&&(k(),H()),this},updateSize:k,init:function(L){var J={};if(l.preserveDrawingBuffer&&(J.preserveDrawingBuffer=!0),c=L,k(),Y(),c.appendChild(d),u=d.getContext("experimental-webgl",J),!u){var ce="Could not initialize WebGL. Seems like the browser doesn't support it.";throw window.alert(ce),ce}if(l.enableBlending&&(u.blendFunc(u.SRC_ALPHA,u.ONE_MINUS_SRC_ALPHA),u.enable(u.BLEND)),l.clearColor){var te=l.clearColorValue;u.clearColor(te.r,te.g,te.b,te.a),this.beginRender=function(){u.clear(u.COLOR_BUFFER_BIT)}}O.load(u),O.updateSize(h/2,f/2),E.load(u),E.updateSize(h/2,f/2),H(),typeof x=="function"&&x(d)},release:function(L){d&&L&&L.removeChild(d)},isSupported:function(){var L=window.document.createElement("canvas"),J=L&&L.getContext&&L.getContext("experimental-webgl");return J},releaseLink:function(L){p>0&&(p-=1);var J=T[L.id];delete T[L.id],O.removeLink(J);var ce=J.id;if(ce0&&(m-=1);var J=I[L.id];delete I[L.id],E.removeNode(J);var ce=J.id;if(ce0?n.insertBefore(E,n.firstChild):n.appendChild(E),E},releaseLink:function(T){var O=u[T.id];O&&(n.removeChild(O),delete u[T.id])},addNode:function(T,O){var E=h(T);if(E)return E.position=O,E.node=T,d[T.id]=E,n.appendChild(E),E},releaseNode:function(T){var O=d[T.id];O&&(n.removeChild(O),delete d[T.id])},renderNodes:function(){for(var T in d)if(d.hasOwnProperty(T)){var O=d[T];v.x=O.position.x,v.y=O.position.y,f(O,v,O.node)}},renderLinks:function(){for(var T in u)if(u.hasOwnProperty(T)){var O=u[T];b.x=O.position.from.x,b.y=O.position.from.y,S.x=O.position.to.x,S.y=O.position.to.y,p(O,b,S,O.link)}},getGraphicsRoot:function(T){return typeof T=="function"&&(s?T(s):l=T),s},getSvgRoot:function(){return s}};return e(x),x;function I(){var T=r("svg");return n=r("g").attr("buffered-rendering","dynamic"),T.appendChild(n),T}}return gg}var vg,cx;function mI(){if(cx)return vg;cx=1;var r=IT();vg=e();function e(){return typeof window=="undefined"?r:{on:t,off:i}}function t(n,s){window.addEventListener(n,s)}function i(n,s){window.removeEventListener(n,s)}return vg}var _g,dx;function pI(){if(dx)return _g;dx=1,_g=l;var r=va(),e=zT(),t=WT(),i=mI(),n=kv(),s=FT(),o=NT(),a=Cv();function l(c,d){var u=30;d=d||{};var h=d.layout,f=d.graphics,m=d.container,p=d.interactive!==void 0?d.interactive:!0,g,v,b=!1,S=!0,_=!1,x=!1,I=!1,T={offsetX:0,offsetY:0,scale:1},O=r({}),E;return{run:function(rt){return b||(X(),M(),gt(),L(),Gt(),b=!0),k(rt),this},reset:function(){f.resetScale(),L(),T.scale=1},pause:function(){I=!0,v.stop()},resume:function(){I=!1,v.restart()},rerender:function(){return H(),this},zoomOut:function(){return Oe(!0)},zoomIn:function(){return Oe(!1)},getTransform:function(){return T},moveTo:function(rt,_t){f.graphCenterChanged(T.offsetX-rt*T.scale,T.offsetY-_t*T.scale),H()},getGraphics:function(){return f},getLayout:function(){return h},dispose:function(){ei()},on:function(rt,_t){return O.on(rt,_t),this},off:function(rt,_t){return O.off(rt,_t),this}};function w(rt){return typeof p=="string"?p.indexOf(rt)>=0:typeof p=="boolean"?p:!0}function X(){m=m||window.document.body,h=h||e(c,{springLength:80,springCoeff:2e-4}),f=f||t(c,{container:m}),d.hasOwnProperty("renderLinks")||(d.renderLinks=!0),d.prerender=d.prerender||0,g=(f.inputManager||n)(c,f)}function H(){f.beginRender(),d.renderLinks&&f.renderLinks(),f.renderNodes(),f.endRender()}function Y(){return _=h.step()&&!x,H(),!_}function k(rt){v||(rt!==void 0?v=s(function(){if(rt-=1,rt<0){var _t=!1;return _t}return Y()},u):v=s(Y,u))}function D(){I||(_=!1,v.restart())}function M(){if(typeof d.prerender=="number"&&d.prerender>0)for(var rt=0;rt=(u=(a+c)/2))?a=u:c=u,(g=t>=(h=(l+d)/2))?l=h:d=h,n=s,!(s=s[v=g<<1|p]))return n[v]=o,r;if(f=+r._x.call(null,s.data),m=+r._y.call(null,s.data),e===f&&t===m)return o.next=s,n?n[v]=o:r._root=o,r;do n=n?n[v]=new Array(4):r._root=new Array(4),(p=e>=(u=(a+c)/2))?a=u:c=u,(g=t>=(h=(l+d)/2))?l=h:d=h;while((v=g<<1|p)===(b=(m>=h)<<1|f>=u));return n[b]=s,n[v]=o,r}function bI(r){var e,t,i=r.length,n,s,o=new Array(i),a=new Array(i),l=1/0,c=1/0,d=-1/0,u=-1/0;for(t=0;td&&(d=n),su&&(u=s));if(l>d||c>u)return this;for(this.cover(l,c).cover(d,u),t=0;tr||r>=n||i>e||e>=s;)switch(c=(ed||(a=m.y0)>u||(l=m.x1)=v)<<1|r>=g)&&(m=h[h.length-1],h[h.length-1]=h[h.length-1-p],h[h.length-1-p]=m)}else{var b=r-+this._x.call(null,f.data),S=e-+this._y.call(null,f.data),_=b*b+S*S;if(_=(h=(o+l)/2))?o=h:l=h,(p=u>=(f=(a+c)/2))?a=f:c=f,e=t,!(t=t[g=p<<1|m]))return this;if(!t.length)break;(e[g+1&3]||e[g+2&3]||e[g+3&3])&&(i=e,v=g)}for(;t.data!==r;)if(n=t,!(t=t.next))return this;return(s=t.next)&&delete t.next,n?(s?n.next=s:delete n.next,this):e?(s?e[g]=s:delete e[g],(t=e[0]||e[1]||e[2]||e[3])&&t===(e[3]||e[2]||e[1]||e[0])&&!t.length&&(i?i[v]=t:this._root=t),this):(this._root=s,this)}function kI(r){for(var e=0,t=r.length;eh.index){var X=f-O.x-O.vx,H=m-O.y-O.vy,Y=X*X+H*H;Yf+w||Im+w||Tc.r&&(c.r=c[d].r)}function l(){if(e){var c,d=e.length,u;for(t=new Array(d),c=0;c[e(x,I,o),x])),_;for(g=0,a=new Array(v);g{}};function Tf(){for(var r=0,e=arguments.length,t={},i;r=0&&(i=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:i}})}ph.prototype=Tf.prototype={constructor:ph,on:function(r,e){var t=this._,i=GI(r+"",t),n,s=-1,o=i.length;if(arguments.length<2){for(;++s0)for(var t=new Array(n),i=0,n,s;i=0&&r._call.call(void 0,e),r=r._next;--Cl}function mx(){ca=(Gh=td.now())+Cf,Cl=Rc=0;try{HI()}finally{Cl=0,WI(),ca=0}}function XI(){var r=td.now(),e=r-Gh;e>ZT&&(Cf-=e,Gh=r)}function WI(){for(var r,e=jh,t,i=1/0;e;)e._call?(i>e._time&&(i=e._time),r=e,e=e._next):(t=e._next,e._next=null,e=r?r._next=t:jh=t);Fc=r,f0(i)}function f0(r){if(!Cl){Rc&&(Rc=clearTimeout(Rc));var e=r-ca;e>24?(r<1/0&&(Rc=setTimeout(mx,r-td.now()-Cf)),vc&&(vc=clearInterval(vc))):(vc||(Gh=td.now(),vc=setInterval(XI,ZT)),Cl=1,KT(mx))}}function px(r,e,t){var i=new Vh;return e=e==null?0:+e,i.restart(n=>{i.stop(),r(n+e)},e,t),i}const YI=1664525,qI=1013904223,gx=4294967296;function ZI(){let r=1;return()=>(r=(YI*r+qI)%gx)/gx}function KI(r){return r.x}function JI(r){return r.y}var QI=10,$I=Math.PI*(3-Math.sqrt(5));function eL(r){var e,t=1,i=.001,n=1-Math.pow(i,1/300),s=0,o=.6,a=new Map,l=Dv(u),c=Tf("tick","end"),d=ZI();r==null&&(r=[]);function u(){h(),c.call("tick",e),t1?(g==null?a.delete(p):a.set(p,m(g)),e):a.get(p)},find:function(p,g,v){var b=0,S=r.length,_,x,I,T,O;for(v==null?v=1/0:v*=v,b=0;b1?(c.on(p,g),e):c.on(p)}}}function tL(){var r,e,t,i,n=Vr(-30),s,o=1,a=1/0,l=.81;function c(f){var m,p=r.length,g=Iv(r,KI,JI).visitAfter(u);for(i=f,m=0;m=a)return;(f.data!==e||f.next)&&(v===0&&(v=go(t),_+=v*v),b===0&&(b=go(t),_+=b*b),_{const p={id:m.id},g=t.length;t.push(p),n.set(m.id,g)}),r.forEachLink(m=>{const p=n.get(m.fromId),g=n.get(m.toId),v=i.length,b={source:p,target:g,index:v};i.push(b),s.set(m.id,b)});const o=tL().strength(e.chargeStrength).theta(e.theta).distanceMin(e.distanceMin).distanceMax(e.distanceMax),a=BI(i).distance(e.linkDistance).iterations(e.linkIterations),l=_I().x(e.centerX).y(e.centerY).strength(e.centerStrength),c=NI().radius(e.collisionRadius).strength(e.collisionStrength),d=iL().x(e.x).strength(e.xStrength),u=rL().y(e.y).strength(e.yStrength),h=eL(t).alphaDecay(e.alphaDecay).velocityDecay(e.velocityDecay).force("charge",o).force("link",a).force("center",l).force("collide",c).force("x",d).force("y",u);return h.stop(),{simulator:h,step:function(){h.tick()},getNodePosition:f,getLinkPosition:function(m){var p=s.get(m);return{from:p.source,to:p.target}},getGraphRect:function(){var m=Number.POSITIVE_INFINITY,p=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,v=Number.NEGATIVE_INFINITY;return t.forEach(function(b){b.xg&&(g=b.x),b.yv&&(v=b.y)}),{x1:m,x2:g,y1:p,y2:v}},isNodePinned:function(){return!1},pinNode:function(){},dispose:function(){},setNodePosition:function(m,p,g){var v=f(m);v.x=p,v.y=g}};function f(m){var p=n.get(m);return t[p]}}const kf=[{value:"viva",name:"@anvaka/VivaGraphJS",spec:vI,settings:[{id:"springLength",name:"Spring length",type:"range",min:1,max:100,step:1,value:100,shown:!0},{id:"springCoeff",name:"Spring coefficient",type:"range",min:1e-4,max:.0025,step:1e-5,value:2e-4,shown:!0},{id:"dragCoeff",name:"Drag coefficient",type:"range",min:.01,max:1,step:.01,value:.01,shown:!0},{id:"gravity",name:"Gravity",type:"range",min:-2,max:-.1,step:.1,value:-.2,shown:!1},{id:"theta",name:"Theta",type:"range",min:0,max:1,step:.05,value:.8,shown:!1},{id:"timeStep",name:"Time step",type:"range",min:1,max:100,step:1,value:10,shown:!0}]},{value:"d3",name:"@d3/d3-force",spec:nL,settings:[{id:"alphaDecay",name:"Temperature decay",type:"range",min:0,max:1,step:.001,value:.0228,shown:!1},{id:"velocityDecay",name:"Velocity decay",type:"range",min:0,max:1,step:.01,value:.4,shown:!1},{id:"chargeStrength",name:"Node attraction",type:"range",min:-200,max:50,step:.1,value:-30},{id:"theta",name:"Barnes–Hut approximation criterion",type:"range",min:0,max:1,step:.1,value:.8,shown:!1},{id:"distanceMin",name:"distanceMin",type:"range",min:1,max:50,step:1,value:1,shown:!0},{id:"distanceMax",name:"distanceMax",type:"range",min:1,max:2e3,step:1,value:2e3,shown:!0},{id:"linkDistance",name:"Link distance",type:"range",min:0,max:100,step:1,value:30,shown:!0},{id:"linkStrength",name:"Link distance",type:"range",min:0,max:100,step:1,value:30,shown:!1},{id:"linkIterations",name:"Link rigidity",type:"range",min:1,max:10,step:1,value:1,shown:!0},{id:"centerX",name:"Center X",type:"range",min:-1e3,max:1e3,step:10,value:.5,shown:!1},{id:"centerY",name:"Center Y",type:"range",min:-1e3,max:1e3,step:10,value:.5,shown:!1},{id:"centerStrength",name:"Center strength",type:"range",min:-1e3,max:1e3,step:10,value:1,shown:!1},{id:"collisionRadius",name:"Collision Radius",type:"range",min:1,max:100,step:1,value:1,shown:!0},{id:"collisionStrength",name:"Collision Strength",type:"range",min:0,max:1,step:.01,value:.7,shown:!0},{id:"x",name:"Target X",type:"range",min:-1e3,max:1e3,step:10,value:.5,shown:!1},{id:"y",name:"Target Y",type:"range",min:-1e3,max:1e3,step:10,value:.5,shown:!1},{id:"xStrength",name:"Strength towards Target X",type:"range",min:0,max:1,step:.01,value:.1,shown:!1},{id:"yStrength",name:"Strength towards Target Y",type:"range",min:0,max:1,step:.01,value:.1,shown:!1}]},{value:"cosmo",name:"@cosmograph-org/cosmo",spec:null,settings:[{id:"simulationRepulsion",name:"Repulsion force coefficient",type:"range",min:0,max:2,step:.1,value:.1,shown:!0},{id:"simulationRepulsionTheta",name:"Barnes–Hut theta",type:"range",min:.3,max:2,step:.1,value:1.7,shown:!0},{id:"repulsionQuadtreeLevels",name:"Barnes–Hut approximation depth",type:"range",min:5,max:12,step:1,value:12,shown:!1},{id:"simulationLinkSpring",name:"Spring coefficient",type:"range",min:0,max:2,step:.01,value:1,shown:!0},{id:"simulationLinkDistance",name:"Minimum link distance",type:"range",min:1,max:20,step:1,value:2,shown:!0},{id:"simulationGravity",name:"Gravity coefficient",type:"range",min:0,max:1,step:.01,value:0,shown:!0},{id:"simulationCenter",name:"Centering force coefficient",type:"range",min:0,max:1,step:.01,value:0,shown:!0},{id:"simulationFriction",name:"Friction coefficient",type:"range",min:.8,max:1,step:.01,value:.85,shown:!0},{id:"simulationDecay",name:"Force simulation decay coefficient",type:"range",min:100,max:1e4,step:100,value:1e4,shown:!0},{id:"repulsionFromMouse",name:"Repulsion from the mouse pointer force coefficient",type:"range",min:0,max:5,step:.1,value:2,shown:!1}]}];function sL(r){const e=r-1;return e*e*e+1}function Uh(r,{delay:e=0,duration:t=400,easing:i=sL,x:n=0,y:s=0,opacity:o=0}={}){const a=getComputedStyle(r),l=+a.opacity,c=a.transform==="none"?"":a.transform,d=l*(1-o),[u,h]=mb(n),[f,m]=mb(s);return{delay:e,duration:t,easing:i,css:(p,g)=>` + transform: ${c} translate(${(1-p)*u}${h}, ${(1-p)*f}${m}); + opacity: ${l-d*g}`}}const Mv="-",oL=r=>{const e=lL(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:i}=r;return{getClassGroupId:o=>{const a=o.split(Mv);return a[0]===""&&a.length!==1&&a.shift(),JT(a,e)||aL(o)},getConflictingClassGroupIds:(o,a)=>{const l=t[o]||[];return a&&i[o]?[...l,...i[o]]:l}}},JT=(r,e)=>{var o;if(r.length===0)return e.classGroupId;const t=r[0],i=e.nextPart.get(t),n=i?JT(r.slice(1),i):void 0;if(n)return n;if(e.validators.length===0)return;const s=r.join(Mv);return(o=e.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},vx=/^\[(.+)\]$/,aL=r=>{if(vx.test(r)){const e=vx.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},lL=r=>{const{theme:e,prefix:t}=r,i={nextPart:new Map,validators:[]};return dL(Object.entries(r.classGroups),t).forEach(([s,o])=>{m0(o,i,s,e)}),i},m0=(r,e,t,i)=>{r.forEach(n=>{if(typeof n=="string"){const s=n===""?e:_x(e,n);s.classGroupId=t;return}if(typeof n=="function"){if(cL(n)){m0(n(i),e,t,i);return}e.validators.push({validator:n,classGroupId:t});return}Object.entries(n).forEach(([s,o])=>{m0(o,_x(e,s),t,i)})})},_x=(r,e)=>{let t=r;return e.split(Mv).forEach(i=>{t.nextPart.has(i)||t.nextPart.set(i,{nextPart:new Map,validators:[]}),t=t.nextPart.get(i)}),t},cL=r=>r.isThemeGetter,dL=(r,e)=>e?r.map(([t,i])=>{const n=i.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[e+o,a])):s);return[t,n]}):r,uL=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,i=new Map;const n=(s,o)=>{t.set(s,o),e++,e>r&&(e=0,i=t,t=new Map)};return{get(s){let o=t.get(s);if(o!==void 0)return o;if((o=i.get(s))!==void 0)return n(s,o),o},set(s,o){t.has(s)?t.set(s,o):n(s,o)}}},QT="!",hL=r=>{const{separator:e,experimentalParseClassName:t}=r,i=e.length===1,n=e[0],s=e.length,o=a=>{const l=[];let c=0,d=0,u;for(let g=0;gd?u-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:p}};return t?a=>t({className:a,parseClassName:o}):o},fL=r=>{if(r.length<=1)return r;const e=[];let t=[];return r.forEach(i=>{i[0]==="["?(e.push(...t.sort(),i),t=[]):t.push(i)}),e.push(...t.sort()),e},mL=r=>Ui({cache:uL(r.cacheSize),parseClassName:hL(r)},oL(r)),pL=/\s+/,gL=(r,e)=>{const{parseClassName:t,getClassGroupId:i,getConflictingClassGroupIds:n}=e,s=[],o=r.trim().split(pL);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:d,hasImportantModifier:u,baseClassName:h,maybePostfixModifierPosition:f}=t(c);let m=!!f,p=i(m?h.substring(0,f):h);if(!p){if(!m){a=c+(a.length>0?" "+a:a);continue}if(p=i(h),!p){a=c+(a.length>0?" "+a:a);continue}m=!1}const g=fL(d).join(":"),v=u?g+QT:g,b=v+p;if(s.includes(b))continue;s.push(b);const S=n(p,m);for(let _=0;_0?" "+a:a)}return a};function $T(){let r=0,e,t,i="";for(;r{if(typeof r=="string")return r;let e,t="";for(let i=0;iu(d),r());return t=mL(c),i=t.cache.get,n=t.cache.set,s=a,a(l)}function a(l){const c=i(l);if(c)return c;const d=gL(l,t);return n(l,d),d}return function(){return s($T.apply(null,arguments))}}const Pi=r=>{const e=t=>t[r]||[];return e.isThemeGetter=!0,e},tC=/^\[(?:([a-z-]+):)?(.+)\]$/i,_L=/^\d+\/\d+$/,yL=new Set(["px","full","screen"]),bL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xL=/\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$/,wL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,SL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,TL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_s=r=>ml(r)||yL.has(r)||_L.test(r),eo=r=>Xl(r,"length",PL),ml=r=>!!r&&!Number.isNaN(Number(r)),yg=r=>Xl(r,"number",ml),_c=r=>!!r&&Number.isInteger(Number(r)),CL=r=>r.endsWith("%")&&ml(r.slice(0,-1)),Vt=r=>tC.test(r),to=r=>bL.test(r),kL=new Set(["length","size","percentage"]),EL=r=>Xl(r,kL,iC),AL=r=>Xl(r,"position",iC),OL=new Set(["image","url"]),IL=r=>Xl(r,OL,ML),LL=r=>Xl(r,"",DL),yc=()=>!0,Xl=(r,e,t)=>{const i=tC.exec(r);return i?i[1]?typeof e=="string"?i[1]===e:e.has(i[1]):t(i[2]):!1},PL=r=>xL.test(r)&&!wL.test(r),iC=()=>!1,DL=r=>SL.test(r),ML=r=>TL.test(r),RL=()=>{const r=Pi("colors"),e=Pi("spacing"),t=Pi("blur"),i=Pi("brightness"),n=Pi("borderColor"),s=Pi("borderRadius"),o=Pi("borderSpacing"),a=Pi("borderWidth"),l=Pi("contrast"),c=Pi("grayscale"),d=Pi("hueRotate"),u=Pi("invert"),h=Pi("gap"),f=Pi("gradientColorStops"),m=Pi("gradientColorStopPositions"),p=Pi("inset"),g=Pi("margin"),v=Pi("opacity"),b=Pi("padding"),S=Pi("saturate"),_=Pi("scale"),x=Pi("sepia"),I=Pi("skew"),T=Pi("space"),O=Pi("translate"),E=()=>["auto","contain","none"],w=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",Vt,e],H=()=>[Vt,e],Y=()=>["",_s,eo],k=()=>["auto",ml,Vt],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>["start","end","center","between","around","evenly","stretch"],ce=()=>["","0",Vt],te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],et=()=>[ml,Vt];return{cacheSize:500,separator:":",theme:{colors:[yc],spacing:[_s,eo],blur:["none","",to,Vt],brightness:et(),borderColor:[r],borderRadius:["none","","full",to,Vt],borderSpacing:H(),borderWidth:Y(),contrast:et(),grayscale:ce(),hueRotate:et(),invert:ce(),gap:H(),gradientColorStops:[r],gradientColorStopPositions:[CL,eo],inset:X(),margin:X(),opacity:et(),padding:H(),saturate:et(),scale:et(),sepia:ce(),skew:et(),space:H(),translate:H()},classGroups:{aspect:[{aspect:["auto","square","video",Vt]}],container:["container"],columns:[{columns:[to]}],"break-after":[{"break-after":te()}],"break-before":[{"break-before":te()}],"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"],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:[...D(),Vt]}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",_c,Vt]}],basis:[{basis:X()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Vt]}],grow:[{grow:ce()}],shrink:[{shrink:ce()}],order:[{order:["first","last","none",_c,Vt]}],"grid-cols":[{"grid-cols":[yc]}],"col-start-end":[{col:["auto",{span:["full",_c,Vt]},Vt]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[yc]}],"row-start-end":[{row:["auto",{span:[_c,Vt]},Vt]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Vt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Vt]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...J()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...J(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...J(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Vt,e]}],"min-w":[{"min-w":[Vt,e,"min","max","fit"]}],"max-w":[{"max-w":[Vt,e,"none","full","min","max","fit","prose",{screen:[to]},to]}],h:[{h:[Vt,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Vt,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Vt,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Vt,e,"auto","min","max","fit"]}],"font-size":[{text:["base",to,eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",yg]}],"font-family":[{font:[yc]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Vt]}],"line-clamp":[{"line-clamp":["none",ml,yg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_s,Vt]}],"list-image":[{"list-image":["none",Vt]}],"list-style-type":[{list:["none","disc","decimal",Vt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_s,eo]}],"underline-offset":[{"underline-offset":["auto",_s,Vt]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Vt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Vt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),AL]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",EL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},IL]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...M(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:M()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...M()]}],"outline-offset":[{"outline-offset":[_s,Vt]}],"outline-w":[{outline:[_s,eo]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[_s,eo]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",to,LL]}],"shadow-color":[{shadow:[yc]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...L(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[i]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",to,Vt]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[S]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Vt]}],duration:[{duration:et()}],ease:[{ease:["linear","in","out","in-out",Vt]}],delay:[{delay:et()}],animate:[{animate:["none","spin","ping","pulse","bounce",Vt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[_c,Vt]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Vt]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],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",Vt]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"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",Vt]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[_s,eo,yg]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},jt=vL(RL);function FL(r){let e=r[1],t,i,n=r[1]&&bg(r);return{c(){n&&n.c(),t=Ht()},m(s,o){n&&n.m(s,o),Me(s,t,o),i=!0},p(s,o){s[1]?e?Oi(e,s[1])?(n.d(1),n=bg(s),e=s[1],n.c(),n.m(t.parentNode,t)):n.p(s,o):(n=bg(s),e=s[1],n.c(),n.m(t.parentNode,t)):e&&(n.d(1),n=null,e=s[1])},i(s){i||($e(n,s),i=!0)},o(s){st(n,s),i=!1},d(s){s&&Le(t),n&&n.d(s)}}}function NL(r){let e=r[1],t,i=!1,n,s=r[1]&&xg(r);return{c(){s&&s.c(),t=Ht()},m(o,a){s&&s.m(o,a),Me(o,t,a),n=!0},p(o,a){o[1]?e?Oi(e,o[1])?(s.d(1),s=xg(o),e=o[1],s.c(),i&&(i=!1,$e(s)),s.m(t.parentNode,t)):(i&&(i=!1,$e(s)),s.p(o,a)):(s=xg(o),e=o[1],s.c(),$e(s),s.m(t.parentNode,t)):e&&(i=!0,Dr(),st(s,1,1,()=>{s=null,e=o[1],i=!1}),Mr())},i(o){n||($e(s,o),n=!0)},o(o){st(s,o),n=!1},d(o){o&&Le(t),s&&s.d(o)}}}function bg(r){let e,t,i,n,s;const o=r[15].default,a=Cr(o,r,r[14],null);let l=[{role:r[4]},r[9],{class:r[8]}],c={};for(let d=0;d{n&&(i||(i=vb(e,r[5],r[6],!0)),i.run(1))}),n=!0)},o(u){st(l,u),u&&(i||(i=vb(e,r[5],r[6],!1)),i.run(0)),n=!1},d(u){u&&Le(e),l&&l.d(u),r[26](null),u&&i&&i.end(),s=!1,ar(o)}}}function zL(r){let e,t,i,n;const s=[NL,FL],o=[];function a(l,c){return l[5]&&l[7]?0:l[7]?1:-1}return~(e=a(r))&&(t=o[e]=s[e](r)),{c(){t&&t.c(),i=Ht()},m(l,c){~e&&o[e].m(l,c),Me(l,i,c),n=!0},p(l,c){let d=e;e=a(l),e===d?~e&&o[e].p(l,c):(t&&(Dr(),st(o[d],1,1,()=>{o[d]=null}),Mr()),~e?(t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),$e(t,1),t.m(i.parentNode,i)):t=null)},i(l){n||($e(t),n=!0)},o(l){st(t),n=!1},d(l){l&&Le(i),~e&&o[e].d(l)}}}const BL={gray:"bg-gray-50 dark:bg-gray-800",red:"bg-red-50 dark:bg-gray-800",yellow:"bg-yellow-50 dark:bg-gray-800 ",green:"bg-green-50 dark:bg-gray-800 ",indigo:"bg-indigo-50 dark:bg-gray-800 ",purple:"bg-purple-50 dark:bg-gray-800 ",pink:"bg-pink-50 dark:bg-gray-800 ",blue:"bg-blue-50 dark:bg-gray-800 ",light:"bg-gray-50 dark:bg-gray-700",dark:"bg-gray-50 dark:bg-gray-800",default:"bg-white dark:bg-gray-800",dropdown:"bg-white dark:bg-gray-700",navbar:"bg-white dark:bg-gray-900",navbarUl:"bg-gray-50 dark:bg-gray-800",form:"bg-gray-50 dark:bg-gray-700",primary:"bg-primary-50 dark:bg-gray-800 ",orange:"bg-orange-50 dark:bg-orange-800",none:""};function jL(r,e,t){const i=["tag","color","rounded","border","shadow","node","use","options","role","transition","params","open"];let n=si(e,i),{$$slots:s={},$$scope:o}=e;const a=()=>{};Wg("background",!0);let{tag:l=n.href?"a":"div"}=e,{color:c="default"}=e,{rounded:d=!1}=e,{border:u=!1}=e,{shadow:h=!1}=e,{node:f=void 0}=e,{use:m=a}=e,{options:p={}}=e,{role:g=void 0}=e,{transition:v=void 0}=e,{params:b={}}=e,{open:S=!0}=e;const _=oS(),x={gray:"text-gray-800 dark:text-gray-300",red:"text-red-800 dark:text-red-400",yellow:"text-yellow-800 dark:text-yellow-300",green:"text-green-800 dark:text-green-400",indigo:"text-indigo-800 dark:text-indigo-400",purple:"text-purple-800 dark:text-purple-400",pink:"text-pink-800 dark:text-pink-400",blue:"text-blue-800 dark:text-blue-400",light:"text-gray-700 dark:text-gray-300",dark:"text-gray-700 dark:text-gray-300",default:"text-gray-500 dark:text-gray-400",dropdown:"text-gray-700 dark:text-gray-200",navbar:"text-gray-700 dark:text-gray-200",navbarUl:"text-gray-700 dark:text-gray-400",form:"text-gray-900 dark:text-white",primary:"text-primary-800 dark:text-primary-400",orange:"text-orange-800 dark:text-orange-400",none:""},I={gray:"border-gray-300 dark:border-gray-800 divide-gray-300 dark:divide-gray-800",red:"border-red-300 dark:border-red-800 divide-red-300 dark:divide-red-800",yellow:"border-yellow-300 dark:border-yellow-800 divide-yellow-300 dark:divide-yellow-800",green:"border-green-300 dark:border-green-800 divide-green-300 dark:divide-green-800",indigo:"border-indigo-300 dark:border-indigo-800 divide-indigo-300 dark:divide-indigo-800",purple:"border-purple-300 dark:border-purple-800 divide-purple-300 dark:divide-purple-800",pink:"border-pink-300 dark:border-pink-800 divide-pink-300 dark:divide-pink-800",blue:"border-blue-300 dark:border-blue-800 divide-blue-300 dark:divide-blue-800",light:"border-gray-500 divide-gray-500",dark:"border-gray-500 divide-gray-500",default:"border-gray-200 dark:border-gray-700 divide-gray-200 dark:divide-gray-700",dropdown:"border-gray-100 dark:border-gray-600 divide-gray-100 dark:divide-gray-600",navbar:"border-gray-100 dark:border-gray-700 divide-gray-100 dark:divide-gray-700",navbarUl:"border-gray-100 dark:border-gray-700 divide-gray-100 dark:divide-gray-700",form:"border-gray-300 dark:border-gray-700 divide-gray-300 dark:divide-gray-700",primary:"border-primary-500 dark:border-primary-200 divide-primary-500 dark:divide-primary-200 ",orange:"border-orange-300 dark:border-orange-800 divide-orange-300 dark:divide-orange-800",none:""};let T;function O(te){ke.call(this,r,te)}function E(te){ke.call(this,r,te)}function w(te){ke.call(this,r,te)}function X(te){ke.call(this,r,te)}function H(te){ke.call(this,r,te)}function Y(te){ke.call(this,r,te)}function k(te){ke.call(this,r,te)}function D(te){ke.call(this,r,te)}function M(te){ke.call(this,r,te)}function L(te){ke.call(this,r,te)}function J(te){en[te?"unshift":"push"](()=>{f=te,t(0,f)})}function ce(te){en[te?"unshift":"push"](()=>{f=te,t(0,f)})}return r.$$set=te=>{t(32,e=vt(vt({},e),ni(te))),t(9,n=si(e,i)),"tag"in te&&t(1,l=te.tag),"color"in te&&t(10,c=te.color),"rounded"in te&&t(11,d=te.rounded),"border"in te&&t(12,u=te.border),"shadow"in te&&t(13,h=te.shadow),"node"in te&&t(0,f=te.node),"use"in te&&t(2,m=te.use),"options"in te&&t(3,p=te.options),"role"in te&&t(4,g=te.role),"transition"in te&&t(5,v=te.transition),"params"in te&&t(6,b=te.params),"open"in te&&t(7,S=te.open),"$$scope"in te&&t(14,o=te.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&128&&_(S?"open":"close"),r.$$.dirty[0]&128&&_("show",S),r.$$.dirty[0]&1024&&t(10,c=c!=null?c:"default"),r.$$.dirty[0]&1024&&Wg("color",c),t(8,T=jt(BL[c],x[c],d&&"rounded-lg",u&&"border",I[c],h&&"shadow-md",e.class))},e=ni(e),[f,l,m,p,g,v,b,S,T,n,c,d,u,h,o,s,O,E,w,X,H,Y,k,D,M,L,J,ce]}class GL extends cr{constructor(e){super(),lr(this,e,jL,zL,Oi,{tag:1,color:10,rounded:11,border:12,shadow:13,node:0,use:2,options:3,role:4,transition:5,params:6,open:7},null,[-1,-1])}}function VL(r){let e=r[2],t,i,n=r[2]&&wg(r);return{c(){n&&n.c(),t=Ht()},m(s,o){n&&n.m(s,o),Me(s,t,o),i=!0},p(s,o){s[2]?e?Oi(e,s[2])?(n.d(1),n=wg(s),e=s[2],n.c(),n.m(t.parentNode,t)):n.p(s,o):(n=wg(s),e=s[2],n.c(),n.m(t.parentNode,t)):e&&(n.d(1),n=null,e=s[2])},i(s){i||($e(n,s),i=!0)},o(s){st(n,s),i=!1},d(s){s&&Le(t),n&&n.d(s)}}}function UL(r){let e,t,i,n;const s=r[13].default,o=Cr(s,r,r[12],null);let a=[{type:r[1]},r[5],{disabled:r[3]},{class:r[4]}],l={};for(let c=0;c{o[d]=null}),Mr(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),$e(t,1),t.m(i.parentNode,i))},i(l){n||($e(t),n=!0)},o(l){st(t),n=!1},d(l){l&&Le(i),o[e].d(l)}}}function WL(r,e,t){const i=["pill","outline","size","href","type","color","shadow","tag","checked","disabled"];let n=si(e,i),{$$slots:s={},$$scope:o}=e;const a=Gn("group");let{pill:l=!1}=e,{outline:c=!1}=e,{size:d=a?"sm":"md"}=e,{href:u=void 0}=e,{type:h="button"}=e,{color:f=a?c?"dark":"alternative":"primary"}=e,{shadow:m=!1}=e,{tag:p="button"}=e,{checked:g=void 0}=e,{disabled:v=!1}=e;const b={alternative:"text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-400 hover:text-primary-700 focus-within:text-primary-700 dark:focus-within:text-white dark:hover:text-white dark:hover:bg-gray-700",blue:"text-white bg-blue-700 hover:bg-blue-800 dark:bg-blue-600 dark:hover:bg-blue-700",dark:"text-white bg-gray-800 hover:bg-gray-900 dark:bg-gray-800 dark:hover:bg-gray-700",green:"text-white bg-green-700 hover:bg-green-800 dark:bg-green-600 dark:hover:bg-green-700",light:"text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600",primary:"text-white bg-primary-700 hover:bg-primary-800 dark:bg-primary-600 dark:hover:bg-primary-700",purple:"text-white bg-purple-700 hover:bg-purple-800 dark:bg-purple-600 dark:hover:bg-purple-700",red:"text-white bg-red-700 hover:bg-red-800 dark:bg-red-600 dark:hover:bg-red-700",yellow:"text-white bg-yellow-400 hover:bg-yellow-500 ",none:""},S={alternative:"text-primary-700 border dark:text-primary-500 bg-gray-100 dark:bg-gray-700 border-gray-300 shadow-gray-300 dark:shadow-gray-800 shadow-inner",blue:"text-blue-900 bg-blue-400 dark:bg-blue-500 shadow-blue-700 dark:shadow-blue-800 shadow-inner",dark:"text-white bg-gray-500 dark:bg-gray-600 shadow-gray-800 dark:shadow-gray-900 shadow-inner",green:"text-green-900 bg-green-400 dark:bg-green-500 shadow-green-700 dark:shadow-green-800 shadow-inner",light:"text-gray-900 bg-gray-100 border border-gray-300 dark:bg-gray-500 dark:text-gray-900 dark:border-gray-700 shadow-gray-300 dark:shadow-gray-700 shadow-inner",primary:"text-primary-900 bg-primary-400 dark:bg-primary-500 shadow-primary-700 dark:shadow-primary-800 shadow-inner",purple:"text-purple-900 bg-purple-400 dark:bg-purple-500 shadow-purple-700 dark:shadow-purple-800 shadow-inner",red:"text-red-900 bg-red-400 dark:bg-red-500 shadow-red-700 dark:shadow-red-800 shadow-inner",yellow:"text-yellow-900 bg-yellow-300 dark:bg-yellow-400 shadow-yellow-500 dark:shadow-yellow-700 shadow-inner",none:""},_={alternative:"focus-within:ring-gray-200 dark:focus-within:ring-gray-700",blue:"focus-within:ring-blue-300 dark:focus-within:ring-blue-800",dark:"focus-within:ring-gray-300 dark:focus-within:ring-gray-700",green:"focus-within:ring-green-300 dark:focus-within:ring-green-800",light:"focus-within:ring-gray-200 dark:focus-within:ring-gray-700",primary:"focus-within:ring-primary-300 dark:focus-within:ring-primary-800",purple:"focus-within:ring-purple-300 dark:focus-within:ring-purple-900",red:"focus-within:ring-red-300 dark:focus-within:ring-red-900",yellow:"focus-within:ring-yellow-300 dark:focus-within:ring-yellow-900",none:""},x={alternative:"shadow-gray-500/50 dark:shadow-gray-800/80",blue:"shadow-blue-500/50 dark:shadow-blue-800/80",dark:"shadow-gray-500/50 dark:shadow-gray-800/80",green:"shadow-green-500/50 dark:shadow-green-800/80",light:"shadow-gray-500/50 dark:shadow-gray-800/80",primary:"shadow-primary-500/50 dark:shadow-primary-800/80",purple:"shadow-purple-500/50 dark:shadow-purple-800/80",red:"shadow-red-500/50 dark:shadow-red-800/80 ",yellow:"shadow-yellow-500/50 dark:shadow-yellow-800/80 ",none:""},I={alternative:"text-gray-900 dark:text-gray-400 hover:text-white border border-gray-800 hover:bg-gray-900 focus-within:bg-gray-900 focus-within:text-white focus-within:ring-gray-300 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-600 dark:focus-within:ring-gray-800",blue:"text-blue-700 hover:text-white border border-blue-700 hover:bg-blue-800 dark:border-blue-500 dark:text-blue-500 dark:hover:text-white dark:hover:bg-blue-600",dark:"text-gray-900 hover:text-white border border-gray-800 hover:bg-gray-900 focus-within:bg-gray-900 focus-within:text-white dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-600",green:"text-green-700 hover:text-white border border-green-700 hover:bg-green-800 dark:border-green-500 dark:text-green-500 dark:hover:text-white dark:hover:bg-green-600",light:"text-gray-500 hover:text-gray-900 bg-white border border-gray-200 dark:border-gray-600 dark:hover:text-white dark:text-gray-400 hover:bg-gray-50 dark:bg-gray-700 dark:hover:bg-gray-600",primary:"text-primary-700 hover:text-white border border-primary-700 hover:bg-primary-700 dark:border-primary-500 dark:text-primary-500 dark:hover:text-white dark:hover:bg-primary-600",purple:"text-purple-700 hover:text-white border border-purple-700 hover:bg-purple-800 dark:border-purple-400 dark:text-purple-400 dark:hover:text-white dark:hover:bg-purple-500",red:"text-red-700 hover:text-white border border-red-700 hover:bg-red-800 dark:border-red-500 dark:text-red-500 dark:hover:text-white dark:hover:bg-red-600",yellow:"text-yellow-400 hover:text-white border border-yellow-400 hover:bg-yellow-500 dark:border-yellow-300 dark:text-yellow-300 dark:hover:text-white dark:hover:bg-yellow-400",none:""},T={xs:"px-3 py-2 text-xs",sm:"px-4 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},O=()=>c||f==="alternative"||f==="light";let E;function w(de){ke.call(this,r,de)}function X(de){ke.call(this,r,de)}function H(de){ke.call(this,r,de)}function Y(de){ke.call(this,r,de)}function k(de){ke.call(this,r,de)}function D(de){ke.call(this,r,de)}function M(de){ke.call(this,r,de)}function L(de){ke.call(this,r,de)}function J(de){ke.call(this,r,de)}function ce(de){ke.call(this,r,de)}function te(de){ke.call(this,r,de)}function et(de){ke.call(this,r,de)}function ot(de){ke.call(this,r,de)}function Ot(de){ke.call(this,r,de)}function gt(de){ke.call(this,r,de)}function je(de){ke.call(this,r,de)}function At(de){ke.call(this,r,de)}function It(de){ke.call(this,r,de)}return r.$$set=de=>{t(40,e=vt(vt({},e),ni(de))),t(5,n=si(e,i)),"pill"in de&&t(6,l=de.pill),"outline"in de&&t(7,c=de.outline),"size"in de&&t(8,d=de.size),"href"in de&&t(0,u=de.href),"type"in de&&t(1,h=de.type),"color"in de&&t(9,f=de.color),"shadow"in de&&t(10,m=de.shadow),"tag"in de&&t(2,p=de.tag),"checked"in de&&t(11,g=de.checked),"disabled"in de&&t(3,v=de.disabled),"$$scope"in de&&t(12,o=de.$$scope)},r.$$.update=()=>{t(4,E=jt("text-center font-medium",a?"focus-within:ring-2":"focus-within:ring-4",a&&"focus-within:z-10",a||"focus-within:outline-none","inline-flex items-center justify-center "+T[d],c&&g&&"border dark:border-gray-900",c&&g&&S[f],c&&!g&&I[f],!c&&g&&S[f],!c&&!g&&b[f],f==="alternative"&&(a&&!g?"dark:bg-gray-700 dark:text-white dark:border-gray-700 dark:hover:border-gray-600 dark:hover:bg-gray-600":"dark:bg-transparent dark:border-gray-600 dark:hover:border-gray-600"),c&&f==="dark"&&(a?g?"bg-gray-900 border-gray-800 dark:border-white dark:bg-gray-600":"dark:text-white border-gray-800 dark:border-white":"dark:text-gray-400 dark:border-gray-700"),_[f],O()&&a&&"[&:not(:first-child)]:-ms-px",a?l&&"first:rounded-s-full last:rounded-e-full"||"first:rounded-s-lg last:rounded-e-lg":l&&"rounded-full"||"rounded-lg",m&&"shadow-lg",m&&x[f],v&&"cursor-not-allowed opacity-50",e.class))},e=ni(e),[u,h,p,v,E,n,l,c,d,f,m,g,o,s,w,X,H,Y,k,D,M,L,J,ce,te,et,ot,Ot,gt,je,At,It]}class Ef extends cr{constructor(e){super(),lr(this,e,WL,XL,Oi,{pill:6,outline:7,size:8,href:0,type:1,color:9,shadow:10,tag:2,checked:11,disabled:3},null,[-1,-1])}}function YL(r){let e,t;const i=[r[3],{color:"none"},{class:r[1]}];let n={$$slots:{default:[ZL]},$$scope:{ctx:r}};for(let s=0;s{o[d]=null}),Mr(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),$e(t,1),t.m(i.parentNode,i))},i(l){n||($e(t),n=!0)},o(l){st(t),n=!1},d(l){l&&Le(i),o[e].d(l)}}}function QL(r,e,t){const i=["color","shadow"];let n=si(e,i),{$$slots:s={},$$scope:o}=e;const a=Gn("group");let{color:l="blue"}=e,{shadow:c=!1}=e;const d={blue:"text-white bg-gradient-to-r from-blue-500 via-blue-600 to-blue-700 hover:bg-gradient-to-br focus:ring-blue-300 dark:focus:ring-blue-800 ",green:"text-white bg-gradient-to-r from-green-400 via-green-500 to-green-600 hover:bg-gradient-to-br focus:ring-green-300 dark:focus:ring-green-800",cyan:"text-white bg-gradient-to-r from-cyan-400 via-cyan-500 to-cyan-600 hover:bg-gradient-to-br focus:ring-cyan-300 dark:focus:ring-cyan-800",teal:"text-white bg-gradient-to-r from-teal-400 via-teal-500 to-teal-600 hover:bg-gradient-to-br focus:ring-teal-300 dark:focus:ring-teal-800",lime:"text-gray-900 bg-gradient-to-r from-lime-200 via-lime-400 to-lime-500 hover:bg-gradient-to-br focus:ring-lime-300 dark:focus:ring-lime-800",red:"text-white bg-gradient-to-r from-red-400 via-red-500 to-red-600 hover:bg-gradient-to-br focus:ring-red-300 dark:focus:ring-red-800",pink:"text-white bg-gradient-to-r from-pink-400 via-pink-500 to-pink-600 hover:bg-gradient-to-br focus:ring-pink-300 dark:focus:ring-pink-800",purple:"text-white bg-gradient-to-r from-purple-500 via-purple-600 to-purple-700 hover:bg-gradient-to-br focus:ring-purple-300 dark:focus:ring-purple-800",purpleToBlue:"text-white bg-gradient-to-br from-purple-600 to-blue-500 hover:bg-gradient-to-bl focus:ring-blue-300 dark:focus:ring-blue-800",cyanToBlue:"text-white bg-gradient-to-r from-cyan-500 to-blue-500 hover:bg-gradient-to-bl focus:ring-cyan-300 dark:focus:ring-cyan-800",greenToBlue:"text-white bg-gradient-to-br from-green-400 to-blue-600 hover:bg-gradient-to-bl focus:ring-green-200 dark:focus:ring-green-800",purpleToPink:"text-white bg-gradient-to-r from-purple-500 to-pink-500 hover:bg-gradient-to-l focus:ring-purple-200 dark:focus:ring-purple-800",pinkToOrange:"text-white bg-gradient-to-br from-pink-500 to-orange-400 hover:bg-gradient-to-bl focus:ring-pink-200 dark:focus:ring-pink-800",tealToLime:"text-gray-900 bg-gradient-to-r from-teal-200 to-lime-200 hover:bg-gradient-to-l focus:ring-lime-200 dark:focus:ring-teal-700",redToYellow:"text-gray-900 bg-gradient-to-r from-red-200 via-red-300 to-yellow-200 hover:bg-gradient-to-bl focus:ring-red-100 dark:focus:ring-red-400"},u={blue:"shadow-blue-500/50 dark:shadow-blue-800/80",green:"shadow-green-500/50 dark:shadow-green-800/80",cyan:"shadow-cyan-500/50 dark:shadow-cyan-800/80",teal:"shadow-teal-500/50 dark:shadow-teal-800/80 ",lime:"shadow-lime-500/50 dark:shadow-lime-800/80",red:"shadow-red-500/50 dark:shadow-red-800/80 ",pink:"shadow-pink-500/50 dark:shadow-pink-800/80",purple:"shadow-purple-500/50 dark:shadow-purple-800/80",purpleToBlue:"shadow-blue-500/50 dark:shadow-blue-800/80",cyanToBlue:"shadow-cyan-500/50 dark:shadow-cyan-800/80",greenToBlue:"shadow-green-500/50 dark:shadow-green-800/80",purpleToPink:"shadow-purple-500/50 dark:shadow-purple-800/80",pinkToOrange:"shadow-pink-500/50 dark:shadow-pink-800/80",tealToLime:"shadow-lime-500/50 dark:shadow-teal-800/80",redToYellow:"shadow-red-500/50 dark:shadow-red-800/80"};let h,f;function m(Y){ke.call(this,r,Y)}function p(Y){ke.call(this,r,Y)}function g(Y){ke.call(this,r,Y)}function v(Y){ke.call(this,r,Y)}function b(Y){ke.call(this,r,Y)}function S(Y){ke.call(this,r,Y)}function _(Y){ke.call(this,r,Y)}function x(Y){ke.call(this,r,Y)}function I(Y){ke.call(this,r,Y)}function T(Y){ke.call(this,r,Y)}function O(Y){ke.call(this,r,Y)}function E(Y){ke.call(this,r,Y)}function w(Y){ke.call(this,r,Y)}function X(Y){ke.call(this,r,Y)}function H(Y){ke.call(this,r,Y)}return r.$$set=Y=>{t(2,e=vt(vt({},e),ni(Y))),t(3,n=si(e,i)),"color"in Y&&t(4,l=Y.color),"shadow"in Y&&t(5,c=Y.shadow),"$$scope"in Y&&t(22,o=Y.$$scope)},r.$$.update=()=>{t(0,h=jt("inline-flex items-center justify-center w-full !border-0",e.pill||"!rounded-md","bg-white !text-gray-900 dark:bg-gray-900 dark:!text-white","hover:bg-transparent hover:!text-inherit","transition-all duration-75 ease-in group-hover:!bg-opacity-0 group-hover:!text-inherit")),t(1,f=jt(e.outline&&"p-0.5",d[l],c&&"shadow-lg",c&&u[l],a?e.pill&&"first:rounded-s-full last:rounded-e-full"||"first:rounded-s-lg last:rounded-e-lg":e.pill&&"rounded-full"||"rounded-lg",e.class))},e=ni(e),[h,f,e,n,l,c,s,m,p,g,v,b,S,_,x,I,T,O,E,w,X,H,o]}class $L extends cr{constructor(e){super(),lr(this,e,QL,JL,Oi,{color:4,shadow:5})}}const eP="modulepreload",tP=function(r){return"/www/"+r},yx={},kl=function(e,t,i){let n=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));n=Promise.allSettled(t.map(l=>{if(l=tP(l),l in yx)return;yx[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":eP,c||(u.as="script"),u.crossOrigin="",u.href=l,a&&u.setAttribute("nonce",a),document.head.appendChild(u),c)return new Promise((h,f)=>{u.addEventListener("load",h),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return n.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})},El=Math.min,na=Math.max,Hh=Math.round,qu=Math.floor,bo=r=>({x:r,y:r}),iP={left:"right",right:"left",bottom:"top",top:"bottom"},rP={start:"end",end:"start"};function p0(r,e,t){return na(r,El(e,t))}function yd(r,e){return typeof r=="function"?r(e):r}function da(r){return r.split("-")[0]}function bd(r){return r.split("-")[1]}function rC(r){return r==="x"?"y":"x"}function Rv(r){return r==="y"?"height":"width"}function Al(r){return["top","bottom"].includes(da(r))?"y":"x"}function Fv(r){return rC(Al(r))}function nP(r,e,t){t===void 0&&(t=!1);const i=bd(r),n=Fv(r),s=Rv(n);let o=n==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Xh(o)),[o,Xh(o)]}function sP(r){const e=Xh(r);return[g0(r),e,g0(e)]}function g0(r){return r.replace(/start|end/g,e=>rP[e])}function oP(r,e,t){const i=["left","right"],n=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(r){case"top":case"bottom":return t?e?n:i:e?i:n;case"left":case"right":return e?s:o;default:return[]}}function aP(r,e,t,i){const n=bd(r);let s=oP(da(r),t==="start",i);return n&&(s=s.map(o=>o+"-"+n),e&&(s=s.concat(s.map(g0)))),s}function Xh(r){return r.replace(/left|right|bottom|top/g,e=>iP[e])}function lP(r){return Ui({top:0,right:0,bottom:0,left:0},r)}function nC(r){return typeof r!="number"?lP(r):{top:r,right:r,bottom:r,left:r}}function Wh(r){const{x:e,y:t,width:i,height:n}=r;return{width:i,height:n,top:t,left:e,right:e+i,bottom:t+n,x:e,y:t}}function bx(r,e,t){let{reference:i,floating:n}=r;const s=Al(e),o=Fv(e),a=Rv(o),l=da(e),c=s==="y",d=i.x+i.width/2-n.width/2,u=i.y+i.height/2-n.height/2,h=i[a]/2-n[a]/2;let f;switch(l){case"top":f={x:d,y:i.y-n.height};break;case"bottom":f={x:d,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:u};break;case"left":f={x:i.x-n.width,y:u};break;default:f={x:i.x,y:i.y}}switch(bd(e)){case"start":f[o]-=h*(t&&c?-1:1);break;case"end":f[o]+=h*(t&&c?-1:1);break}return f}const cP=(r,e,t)=>le(void 0,null,function*(){const{placement:i="bottom",strategy:n="absolute",middleware:s=[],platform:o}=t,a=s.filter(Boolean),l=yield o.isRTL==null?void 0:o.isRTL(e);let c=yield o.getElementRects({reference:r,floating:e,strategy:n}),{x:d,y:u}=bx(c,i,l),h=i,f={},m=0;for(let p=0;p({name:"arrow",options:r,fn(t){return le(this,null,function*(){const{x:i,y:n,placement:s,rects:o,platform:a,elements:l,middlewareData:c}=t,{element:d,padding:u=0}=yd(r,t)||{};if(d==null)return{};const h=nC(u),f={x:i,y:n},m=Fv(s),p=Rv(m),g=yield a.getDimensions(d),v=m==="y",b=v?"top":"left",S=v?"bottom":"right",_=v?"clientHeight":"clientWidth",x=o.reference[p]+o.reference[m]-f[m]-o.floating[p],I=f[m]-o.reference[m],T=yield a.getOffsetParent==null?void 0:a.getOffsetParent(d);let O=T?T[_]:0;(!O||!(yield a.isElement==null?void 0:a.isElement(T)))&&(O=l.floating[_]||o.floating[p]);const E=x/2-I/2,w=O/2-g[p]/2-1,X=El(h[b],w),H=El(h[S],w),Y=X,k=O-g[p]-H,D=O/2-g[p]/2+E,M=p0(Y,D,k),L=!c.arrow&&bd(s)!=null&&D!==M&&o.reference[p]/2-(DM<=0)){var H,Y;const M=(((H=o.flip)==null?void 0:H.index)||0)+1,L=O[M];if(L)return{data:{index:M,overflows:X},reset:{placement:L}};let J=(Y=X.filter(ce=>ce.overflows[0]<=0).sort((ce,te)=>ce.overflows[1]-te.overflows[1])[0])==null?void 0:Y.placement;if(!J)switch(m){case"bestFit":{var k;const ce=(k=X.filter(te=>{if(T){const et=Al(te.placement);return et===S||et==="y"}return!0}).map(te=>[te.placement,te.overflows.filter(et=>et>0).reduce((et,ot)=>et+ot,0)]).sort((te,et)=>te[1]-et[1])[0])==null?void 0:k[0];ce&&(J=ce);break}case"initialPlacement":J=l;break}if(s!==J)return{reset:{placement:J}}}return{}})}}};function hP(r,e){return le(this,null,function*(){const{placement:t,platform:i,elements:n}=r,s=yield i.isRTL==null?void 0:i.isRTL(n.floating),o=da(t),a=bd(t),l=Al(t)==="y",c=["left","top"].includes(o)?-1:1,d=s&&l?-1:1,u=yd(e,r);let{mainAxis:h,crossAxis:f,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof m=="number"&&(f=a==="end"?m*-1:m),l?{x:f*d,y:h*c}:{x:h*c,y:f*d}})}const fP=function(r){return r===void 0&&(r=0),{name:"offset",options:r,fn(t){return le(this,null,function*(){var i,n;const{x:s,y:o,placement:a,middlewareData:l}=t,c=yield hP(t,r);return a===((i=l.offset)==null?void 0:i.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:fn(Ui({},c),{placement:a})}})}}},mP=function(r){return r===void 0&&(r={}),{name:"shift",options:r,fn(t){return le(this,null,function*(){const{x:i,y:n,placement:s}=t,v=yd(r,t),{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:S,y:_}=b;return{x:S,y:_}}}}=v,c=Km(v,["mainAxis","crossAxis","limiter"]),d={x:i,y:n},u=yield sC(t,c),h=Al(da(s)),f=rC(h);let m=d[f],p=d[h];if(o){const b=f==="y"?"top":"left",S=f==="y"?"bottom":"right",_=m+u[b],x=m-u[S];m=p0(_,m,x)}if(a){const b=h==="y"?"top":"left",S=h==="y"?"bottom":"right",_=p+u[b],x=p-u[S];p=p0(_,p,x)}const g=l.fn(fn(Ui({},t),{[f]:m,[h]:p}));return fn(Ui({},g),{data:{x:g.x-i,y:g.y-n,enabled:{[f]:o,[h]:a}}})})}}};function Af(){return typeof window!="undefined"}function Wl(r){return oC(r)?(r.nodeName||"").toLowerCase():"#document"}function ln(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function os(r){var e;return(e=(oC(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function oC(r){return Af()?r instanceof Node||r instanceof ln(r).Node:!1}function zn(r){return Af()?r instanceof Element||r instanceof ln(r).Element:!1}function ns(r){return Af()?r instanceof HTMLElement||r instanceof ln(r).HTMLElement:!1}function xx(r){return!Af()||typeof ShadowRoot=="undefined"?!1:r instanceof ShadowRoot||r instanceof ln(r).ShadowRoot}function xd(r){const{overflow:e,overflowX:t,overflowY:i,display:n}=Bn(r);return/auto|scroll|overlay|hidden|clip/.test(e+i+t)&&!["inline","contents"].includes(n)}function pP(r){return["table","td","th"].includes(Wl(r))}function Of(r){return[":popover-open",":modal"].some(e=>{try{return r.matches(e)}catch(t){return!1}})}function Nv(r){const e=zv(),t=zn(r)?Bn(r):r;return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(t.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(t.contain||"").includes(i))}function gP(r){let e=xo(r);for(;ns(e)&&!Ol(e);){if(Nv(e))return e;if(Of(e))return null;e=xo(e)}return null}function zv(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ol(r){return["html","body","#document"].includes(Wl(r))}function Bn(r){return ln(r).getComputedStyle(r)}function If(r){return zn(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function xo(r){if(Wl(r)==="html")return r;const e=r.assignedSlot||r.parentNode||xx(r)&&r.host||os(r);return xx(e)?e.host:e}function aC(r){const e=xo(r);return Ol(e)?r.ownerDocument?r.ownerDocument.body:r.body:ns(e)&&xd(e)?e:aC(e)}function id(r,e,t){var i;e===void 0&&(e=[]),t===void 0&&(t=!0);const n=aC(r),s=n===((i=r.ownerDocument)==null?void 0:i.body),o=ln(n);if(s){const a=v0(o);return e.concat(o,o.visualViewport||[],xd(n)?n:[],a&&t?id(a):[])}return e.concat(n,id(n,[],t))}function v0(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function lC(r){const e=Bn(r);let t=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const n=ns(r),s=n?r.offsetWidth:t,o=n?r.offsetHeight:i,a=Hh(t)!==s||Hh(i)!==o;return a&&(t=s,i=o),{width:t,height:i,$:a}}function Bv(r){return zn(r)?r:r.contextElement}function pl(r){const e=Bv(r);if(!ns(e))return bo(1);const t=e.getBoundingClientRect(),{width:i,height:n,$:s}=lC(e);let o=(s?Hh(t.width):t.width)/i,a=(s?Hh(t.height):t.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const vP=bo(0);function cC(r){const e=ln(r);return!zv()||!e.visualViewport?vP:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _P(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==ln(r)?!1:e}function ua(r,e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);const n=r.getBoundingClientRect(),s=Bv(r);let o=bo(1);e&&(i?zn(i)&&(o=pl(i)):o=pl(r));const a=_P(s,t,i)?cC(s):bo(0);let l=(n.left+a.x)/o.x,c=(n.top+a.y)/o.y,d=n.width/o.x,u=n.height/o.y;if(s){const h=ln(s),f=i&&zn(i)?ln(i):i;let m=h,p=v0(m);for(;p&&i&&f!==m;){const g=pl(p),v=p.getBoundingClientRect(),b=Bn(p),S=v.left+(p.clientLeft+parseFloat(b.paddingLeft))*g.x,_=v.top+(p.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,d*=g.x,u*=g.y,l+=S,c+=_,m=ln(p),p=v0(m)}}return Wh({width:d,height:u,x:l,y:c})}function yP(r){let{elements:e,rect:t,offsetParent:i,strategy:n}=r;const s=n==="fixed",o=os(i),a=e?Of(e.floating):!1;if(i===o||a&&s)return t;let l={scrollLeft:0,scrollTop:0},c=bo(1);const d=bo(0),u=ns(i);if((u||!u&&!s)&&((Wl(i)!=="body"||xd(o))&&(l=If(i)),ns(i))){const h=ua(i);c=pl(i),d.x=h.x+i.clientLeft,d.y=h.y+i.clientTop}return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-l.scrollLeft*c.x+d.x,y:t.y*c.y-l.scrollTop*c.y+d.y}}function bP(r){return Array.from(r.getClientRects())}function _0(r,e){const t=If(r).scrollLeft;return e?e.left+t:ua(os(r)).left+t}function xP(r){const e=os(r),t=If(r),i=r.ownerDocument.body,n=na(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=na(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-t.scrollLeft+_0(r);const a=-t.scrollTop;return Bn(i).direction==="rtl"&&(o+=na(e.clientWidth,i.clientWidth)-n),{width:n,height:s,x:o,y:a}}function wP(r,e){const t=ln(r),i=os(r),n=t.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(n){s=n.width,o=n.height;const c=zv();(!c||c&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:s,height:o,x:a,y:l}}function SP(r,e){const t=ua(r,!0,e==="fixed"),i=t.top+r.clientTop,n=t.left+r.clientLeft,s=ns(r)?pl(r):bo(1),o=r.clientWidth*s.x,a=r.clientHeight*s.y,l=n*s.x,c=i*s.y;return{width:o,height:a,x:l,y:c}}function wx(r,e,t){let i;if(e==="viewport")i=wP(r,t);else if(e==="document")i=xP(os(r));else if(zn(e))i=SP(e,t);else{const n=cC(r);i=fn(Ui({},e),{x:e.x-n.x,y:e.y-n.y})}return Wh(i)}function dC(r,e){const t=xo(r);return t===e||!zn(t)||Ol(t)?!1:Bn(t).position==="fixed"||dC(t,e)}function TP(r,e){const t=e.get(r);if(t)return t;let i=id(r,[],!1).filter(a=>zn(a)&&Wl(a)!=="body"),n=null;const s=Bn(r).position==="fixed";let o=s?xo(r):r;for(;zn(o)&&!Ol(o);){const a=Bn(o),l=Nv(o);!l&&a.position==="fixed"&&(n=null),(s?!l&&!n:!l&&a.position==="static"&&!!n&&["absolute","fixed"].includes(n.position)||xd(o)&&!l&&dC(r,o))?i=i.filter(d=>d!==o):n=a,o=xo(o)}return e.set(r,i),i}function CP(r){let{element:e,boundary:t,rootBoundary:i,strategy:n}=r;const o=[...t==="clippingAncestors"?Of(e)?[]:TP(e,this._c):[].concat(t),i],a=o[0],l=o.reduce((c,d)=>{const u=wx(e,d,n);return c.top=na(u.top,c.top),c.right=El(u.right,c.right),c.bottom=El(u.bottom,c.bottom),c.left=na(u.left,c.left),c},wx(e,a,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function kP(r){const{width:e,height:t}=lC(r);return{width:e,height:t}}function EP(r,e,t){const i=ns(e),n=os(e),s=t==="fixed",o=ua(r,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=bo(0);if(i||!i&&!s)if((Wl(e)!=="body"||xd(n))&&(a=If(e)),i){const f=ua(e,!0,s,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else n&&(l.x=_0(n));let c=0,d=0;if(n&&!i&&!s){const f=n.getBoundingClientRect();d=f.top+a.scrollTop,c=f.left+a.scrollLeft-_0(n,f)}const u=o.left+a.scrollLeft-l.x-c,h=o.top+a.scrollTop-l.y-d;return{x:u,y:h,width:o.width,height:o.height}}function Sg(r){return Bn(r).position==="static"}function Sx(r,e){if(!ns(r)||Bn(r).position==="fixed")return null;if(e)return e(r);let t=r.offsetParent;return os(r)===t&&(t=t.ownerDocument.body),t}function uC(r,e){const t=ln(r);if(Of(r))return t;if(!ns(r)){let n=xo(r);for(;n&&!Ol(n);){if(zn(n)&&!Sg(n))return n;n=xo(n)}return t}let i=Sx(r,e);for(;i&&pP(i)&&Sg(i);)i=Sx(i,e);return i&&Ol(i)&&Sg(i)&&!Nv(i)?t:i||gP(r)||t}const AP=function(r){return le(this,null,function*(){const e=this.getOffsetParent||uC,t=this.getDimensions,i=yield t(r.floating);return{reference:EP(r.reference,yield e(r.floating),r.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}})};function OP(r){return Bn(r).direction==="rtl"}const IP={convertOffsetParentRelativeRectToViewportRelativeRect:yP,getDocumentElement:os,getClippingRect:CP,getOffsetParent:uC,getElementRects:AP,getClientRects:bP,getDimensions:kP,getScale:pl,isElement:zn,isRTL:OP};function LP(r,e){let t=null,i;const n=os(r);function s(){var a;clearTimeout(i),(a=t)==null||a.disconnect(),t=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:d,width:u,height:h}=r.getBoundingClientRect();if(a||e(),!u||!h)return;const f=qu(d),m=qu(n.clientWidth-(c+u)),p=qu(n.clientHeight-(d+h)),g=qu(c),b={rootMargin:-f+"px "+-m+"px "+-p+"px "+-g+"px",threshold:na(0,El(1,l))||1};let S=!0;function _(x){const I=x[0].intersectionRatio;if(I!==l){if(!S)return o();I?o(!1,I):i=setTimeout(()=>{o(!1,1e-7)},1e3)}S=!1}try{t=new IntersectionObserver(_,fn(Ui({},b),{root:n.ownerDocument}))}catch(x){t=new IntersectionObserver(_,b)}t.observe(r)}return o(!0),s}function Tx(r,e,t,i){i===void 0&&(i={});const{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=Bv(r),d=n||s?[...c?id(c):[],...id(e)]:[];d.forEach(v=>{n&&v.addEventListener("scroll",t,{passive:!0}),s&&v.addEventListener("resize",t)});const u=c&&a?LP(c,t):null;let h=-1,f=null;o&&(f=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=f)==null||S.observe(e)})),t()}),c&&!l&&f.observe(c),f.observe(e));let m,p=l?ua(r):null;l&&g();function g(){const v=ua(r);p&&(v.x!==p.x||v.y!==p.y||v.width!==p.width||v.height!==p.height)&&t(),p=v,m=requestAnimationFrame(g)}return t(),()=>{var v;d.forEach(b=>{n&&b.removeEventListener("scroll",t),s&&b.removeEventListener("resize",t)}),u==null||u(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const PP=fP,DP=mP,MP=uP,RP=dP,FP=(r,e,t)=>{const i=new Map,n=Ui({platform:IP},t),s=fn(Ui({},n.platform),{_c:i});return cP(r,e,fn(Ui({},n),{platform:s}))};function Cx(r){let e;return{c(){e=ai("div")},m(t,i){Me(t,e,i),r[24](e)},p:Pt,d(t){t&&Le(e),r[24](null)}}}function kx(r){let e,t,i;const n=[{use:r[10]},{options:r[3]},{role:"tooltip"},{tabindex:r[1]?-1:void 0},r[12]];function s(a){r[25](a)}let o={$$slots:{default:[NP]},$$scope:{ctx:r}};for(let a=0;afd(e,"open",s)),e.$on("focusin",function(){Zr(io(r[1]&&r[4],r[8]))&&io(r[1]&&r[4],r[8]).apply(this,arguments)}),e.$on("focusout",function(){Zr(io(r[1]&&r[4],r[9]))&&io(r[1]&&r[4],r[9]).apply(this,arguments)}),e.$on("mouseenter",function(){Zr(io(r[1]&&r[5],r[8]))&&io(r[1]&&r[5],r[8]).apply(this,arguments)}),e.$on("mouseleave",function(){Zr(io(r[1]&&r[5],r[9]))&&io(r[1]&&r[5],r[9]).apply(this,arguments)}),{c(){wi(e.$$.fragment)},m(a,l){pi(e,a,l),i=!0},p(a,l){r=a;const c=l[0]&5130?fi(n,[l[0]&1024&&{use:r[10]},l[0]&8&&{options:r[3]},n[2],l[0]&2&&{tabindex:r[1]?-1:void 0},l[0]&4096&&ma(r[12])]):{};l[0]&67108996&&(c.$$scope={dirty:l,ctx:r}),!t&&l[0]&1&&(t=!0,c.open=r[0],hd(()=>t=!1)),e.$set(c)},i(a){i||($e(e.$$.fragment,a),i=!0)},o(a){st(e.$$.fragment,a),i=!1},d(a){gi(e,a)}}}function Ex(r){let e,t,i;return{c(){e=ai("div"),ae(e,"class",r[7])},m(n,s){Me(n,e,s),t||(i=Z0(r[11].call(null,e)),t=!0)},p(n,s){s[0]&128&&ae(e,"class",n[7])},d(n){n&&Le(e),t=!1,i()}}}function NP(r){let e,t,i;const n=r[23].default,s=Cr(n,r,r[26],null);let o=r[2]&&Ex(r);return{c(){s&&s.c(),e=Tr(),o&&o.c(),t=Ht()},m(a,l){s&&s.m(a,l),Me(a,e,l),o&&o.m(a,l),Me(a,t,l),i=!0},p(a,l){s&&s.p&&(!i||l[0]&67108864)&&Er(s,n,a,a[26],i?kr(n,a[26],l,null):Ar(a[26]),null),a[2]?o?o.p(a,l):(o=Ex(a),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},i(a){i||($e(s,a),i=!0)},o(a){st(s,a),i=!1},d(a){a&&(Le(e),Le(t)),s&&s.d(a),o&&o.d(a)}}}function zP(r){let e,t,i,n=!r[3]&&Cx(r),s=r[3]&&kx(r);return{c(){n&&n.c(),e=Tr(),s&&s.c(),t=Ht()},m(o,a){n&&n.m(o,a),Me(o,e,a),s&&s.m(o,a),Me(o,t,a),i=!0},p(o,a){o[3]?n&&(n.d(1),n=null):n?n.p(o,a):(n=Cx(o),n.c(),n.m(e.parentNode,e)),o[3]?s?(s.p(o,a),a[0]&8&&$e(s,1)):(s=kx(o),s.c(),$e(s,1),s.m(t.parentNode,t)):s&&(Dr(),st(s,1,1,()=>{s=null}),Mr())},i(o){i||($e(s),i=!0)},o(o){st(s),i=!1},d(o){o&&(Le(e),Le(t)),n&&n.d(o),s&&s.d(o)}}}function io(r,e){return r?e:()=>{}}function BP(r,e,t){let i;const n=["activeContent","arrow","offset","placement","trigger","triggeredBy","reference","strategy","open","yOnly","middlewares"];let s=si(e,n),{$$slots:o={},$$scope:a}=e,{activeContent:l=!1}=e,{arrow:c=!0}=e,{offset:d=8}=e,{placement:u="top"}=e,{trigger:h="hover"}=e,{triggeredBy:f=void 0}=e,{reference:m=void 0}=e,{strategy:p="absolute"}=e,{open:g=!1}=e,{yOnly:v=!1}=e,{middlewares:b=[MP(),DP()]}=e;const S=oS();let _,x,I,T,O,E,w,X=[];const H=je=>{T===void 0&&console.error("trigger undefined"),!(!m&&X.includes(je.target)&&T!==je.target&&(t(3,T=je.target),g))&&t(0,g=je.type==="click"?!g:!0)},Y=je=>je.matches(":hover"),k=je=>je?`${je}px`:"",D=je=>{if(l&&I){const At=[T,O,...X].filter(Boolean);setTimeout(()=>{je.type==="mouseleave"&&!At.some(Y)&&t(0,g=!1)},100)}else t(0,g=!1)};let M;const L={left:"right",right:"left",bottom:"top",top:"bottom"};function J(){FP(T,O,{placement:u,strategy:p,middleware:i}).then(({x:je,y:At,middlewareData:It,placement:de,strategy:pe})=>{O.style.position=pe,O.style.left=v?"0":k(je),O.style.top=k(At),It.arrow&&E instanceof HTMLDivElement&&(t(21,E.style.left=k(It.arrow.x),E),t(21,E.style.top=k(It.arrow.y),E),t(22,M=L[de.split("-")[0]]),t(21,E.style[M]=k(-E.offsetWidth/2-(e.border?1:0)),E))})}function ce(je,At){O=je;let It=Tx(At,O,J);return{update(de){It(),It=Tx(de,O,J)},destroy(){It()}}}uf(()=>{var At;const je=[["focusin",H,_],["focusout",D,_],["click",H,x],["mouseenter",H,I],["mouseleave",D,I]];return f?X=[...document.querySelectorAll(f)]:X=w.previousElementSibling?[w.previousElementSibling]:[],X.length||console.error("No triggers found."),X.forEach(It=>{It.tabIndex<0&&(It.tabIndex=0);for(const[de,pe,He]of je)He&&It.addEventListener(de,pe)}),m?(t(3,T=(At=document.querySelector(m))!=null?At:document.body),T===document.body?console.error(`Popup reference not found: '${m}'`):(_&&T.addEventListener("focusout",D),I&&T.addEventListener("mouseleave",D))):t(3,T=X[0]),x&&document.addEventListener("click",te),()=>{X.forEach(It=>{if(It)for(const[de,pe]of je)It.removeEventListener(de,pe)}),T&&(T.removeEventListener("focusout",D),T.removeEventListener("mouseleave",D)),document.removeEventListener("click",te)}});function te(je){g&&!je.composedPath().includes(O)&&!X.some(At=>je.composedPath().includes(At))&&D(je)}let et;function ot(je){return t(21,E=je),{destroy(){t(21,E=null)}}}function Ot(je){en[je?"unshift":"push"](()=>{w=je,t(6,w)})}function gt(je){g=je,t(0,g)}return r.$$set=je=>{t(38,e=vt(vt({},e),ni(je))),t(12,s=si(e,n)),"activeContent"in je&&t(1,l=je.activeContent),"arrow"in je&&t(2,c=je.arrow),"offset"in je&&t(13,d=je.offset),"placement"in je&&t(14,u=je.placement),"trigger"in je&&t(15,h=je.trigger),"triggeredBy"in je&&t(16,f=je.triggeredBy),"reference"in je&&t(17,m=je.reference),"strategy"in je&&t(18,p=je.strategy),"open"in je&&t(0,g=je.open),"yOnly"in je&&t(19,v=je.yOnly),"middlewares"in je&&t(20,b=je.middlewares),"$$scope"in je&&t(26,a=je.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&32768&&t(4,_=h==="focus"),r.$$.dirty[0]&32768&&(x=h==="click"),r.$$.dirty[0]&32768&&t(5,I=h==="hover"),r.$$.dirty[0]&1&&S("show",g),r.$$.dirty[0]&16392&&u&&(t(3,T),t(14,u)),r.$$.dirty[0]&3153920&&(i=[...b,PP(+d),E&&RP({element:E,padding:10})]),t(7,et=$T("absolute pointer-events-none block w-[10px] h-[10px] rotate-45 bg-inherit border-inherit",e.border&&M==="bottom"&&"border-b border-e",e.border&&M==="top"&&"border-t border-s ",e.border&&M==="right"&&"border-t border-e ",e.border&&M==="left"&&"border-b border-s "))},e=ni(e),[g,l,c,T,_,I,w,et,H,D,ce,ot,s,d,u,h,f,m,p,v,b,E,M,o,Ot,gt,a]}class hC extends cr{constructor(e){super(),lr(this,e,BP,zP,Oi,{activeContent:1,arrow:2,offset:13,placement:14,trigger:15,triggeredBy:16,reference:17,strategy:18,open:0,yOnly:19,middlewares:20},null,[-1,-1])}}function jP(r){let e;const t=r[7].default,i=Cr(t,r,r[6],null);return{c(){i&&i.c()},m(n,s){i&&i.m(n,s),e=!0},p(n,s){i&&i.p&&(!e||s&64)&&Er(i,t,n,n[6],e?kr(t,n[6],s,null):Ar(n[6]),null)},i(n){e||($e(i,n),e=!0)},o(n){st(i,n),e=!1},d(n){i&&i.d(n)}}}function GP(r){let e,t;const i=r[7].default,n=Cr(i,r,r[6],null);let s=[r[3],{class:r[2]}],o={};for(let a=0;a{o[d]=null}),Mr(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),$e(t,1),t.m(i.parentNode,i))},i(l){n||($e(t),n=!0)},o(l){st(t),n=!1},d(l){l&&Le(i),o[e].d(l)}}}function UP(r,e,t){let i;const n=["color","defaultClass","show"];let s=si(e,n),{$$slots:o={},$$scope:a}=e,{color:l="gray"}=e,{defaultClass:c="text-sm rtl:text-right font-medium block"}=e,{show:d=!0}=e,u;const h={gray:"text-gray-900 dark:text-gray-300",green:"text-green-700 dark:text-green-500",red:"text-red-700 dark:text-red-500",disabled:"text-gray-400 dark:text-gray-500 grayscale contrast-50"};function f(m){en[m?"unshift":"push"](()=>{u=m,t(1,u)})}return r.$$set=m=>{t(10,e=vt(vt({},e),ni(m))),t(3,s=si(e,n)),"color"in m&&t(4,l=m.color),"defaultClass"in m&&t(5,c=m.defaultClass),"show"in m&&t(0,d=m.show),"$$scope"in m&&t(6,a=m.$$scope)},r.$$.update=()=>{if(r.$$.dirty&18){const m=u==null?void 0:u.control;t(4,l=m!=null&&m.disabled?"disabled":l)}t(2,i=jt(c,h[l],e.class))},e=ni(e),[d,u,i,s,l,c,a,o,f]}class HP extends cr{constructor(e){super(),lr(this,e,UP,VP,Oi,{color:4,defaultClass:5,show:0})}}let XP=Date.now();function WP(){return(++XP).toString(36)}function Ax(r,e,t){const i=r.slice();return i[17]=e[t].value,i[18]=e[t].name,i[19]=e[t].disabled,i}function Ox(r){let e,t,i;return{c(){e=ai("option"),t=Bt(r[2]),e.disabled=!0,e.selected=i=r[0]===void 0?!0:void 0,e.__value="",Xg(e,e.__value)},m(n,s){Me(n,e,s),Ze(e,t)},p(n,s){s&4&&Xt(t,n[2]),s&3&&i!==(i=n[0]===void 0?!0:void 0)&&(e.selected=i)},d(n){n&&Le(e)}}}function YP(r){let e;const t=r[10].default,i=Cr(t,r,r[9],null);return{c(){i&&i.c()},m(n,s){i&&i.m(n,s),e=!0},p(n,s){i&&i.p&&(!e||s&512)&&Er(i,t,n,n[9],e?kr(t,n[9],s,null):Ar(n[9]),null)},i(n){e||($e(i,n),e=!0)},o(n){st(i,n),e=!1},d(n){i&&i.d(n)}}}function qP(r){let e,t=Eh(r[1]),i=[];for(let n=0;n0?0:1}i=u(r),n=d[i]=c[i](r);let h=[r[4],{class:r[3]}],f={};for(let m=0;mr[14].call(e))},m(m,p){Me(m,e,p),l&&l.m(e,null),Ze(e,t),d[i].m(e,null),"value"in f&&(f.multiple?gb:bu)(e,f.value),e.autofocus&&e.focus(),bu(e,r[0],!0),s=!0,o||(a=[ze(e,"change",r[14]),ze(e,"change",r[11]),ze(e,"contextmenu",r[12]),ze(e,"input",r[13])],o=!0)},p(m,[p]){m[2]?l?l.p(m,p):(l=Ox(m),l.c(),l.m(e,t)):l&&(l.d(1),l=null);let g=i;i=u(m),i===g?d[i].p(m,p):(Dr(),st(d[g],1,1,()=>{d[g]=null}),Mr(),n=d[i],n?n.p(m,p):(n=d[i]=c[i](m),n.c()),$e(n,1),n.m(e,null)),Os(e,f=fi(h,[p&16&&m[4],(!s||p&8)&&{class:m[3]}])),p&24&&"value"in f&&(f.multiple?gb:bu)(e,f.value),p&3&&bu(e,m[0])},i(m){s||($e(n),s=!0)},o(m){st(n),s=!1},d(m){m&&Le(e),l&&l.d(),d[i].d(),o=!1,ar(a)}}}const KP="block w-full";function JP(r,e,t){const i=["items","value","placeholder","underline","size","defaultClass","underlineClass"];let n=si(e,i),{$$slots:s={},$$scope:o}=e,{items:a=[]}=e,{value:l=""}=e,{placeholder:c="Choose option ..."}=e,{underline:d=!1}=e,{size:u="md"}=e,{defaultClass:h="text-gray-900 disabled:text-gray-400 bg-gray-50 border border-gray-300 rounded-lg focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:disabled:text-gray-500 dark:focus:ring-primary-500 dark:focus:border-primary-500"}=e,{underlineClass:f="text-gray-500 disabled:text-gray-400 bg-transparent border-0 border-b-2 border-gray-200 appearance-none dark:text-gray-400 dark:disabled:text-gray-500 dark:border-gray-700 focus:outline-none focus:ring-0 focus:border-gray-200 peer"}=e;const m={sm:"text-sm p-2",md:"text-sm p-2.5",lg:"text-base py-3 px-4"};let p;function g(_){ke.call(this,r,_)}function v(_){ke.call(this,r,_)}function b(_){ke.call(this,r,_)}function S(){l=FA(this),t(0,l),t(1,a)}return r.$$set=_=>{t(16,e=vt(vt({},e),ni(_))),t(4,n=si(e,i)),"items"in _&&t(1,a=_.items),"value"in _&&t(0,l=_.value),"placeholder"in _&&t(2,c=_.placeholder),"underline"in _&&t(5,d=_.underline),"size"in _&&t(6,u=_.size),"defaultClass"in _&&t(7,h=_.defaultClass),"underlineClass"in _&&t(8,f=_.underlineClass),"$$scope"in _&&t(9,o=_.$$scope)},r.$$.update=()=>{t(3,p=jt(KP,d?f:h,m[u],d&&"!px-0",e.class))},e=ni(e),[l,a,c,p,n,d,u,h,f,o,s,g,v,b,S]}class QP extends cr{constructor(e){super(),lr(this,e,JP,ZP,Oi,{items:1,value:0,placeholder:2,underline:5,size:6,defaultClass:7,underlineClass:8})}}const $P=r=>({}),Lx=r=>({}),eD=r=>({}),Px=r=>({}),tD=r=>({}),Dx=r=>({});function iD(r){let e,t;const i=[{pill:r[2]},{name:r[5]},{"aria-controls":r[4]},{"aria-expanded":r[0]},r[9],{class:"!p-3"}];let n={$$slots:{default:[sD]},$$scope:{ctx:r}};for(let s=0;s{o[d]=null}),Mr(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),$e(t,1),t.m(i.parentNode,i))},i(l){n||($e(t),n=!0)},o(l){st(t),n=!1},d(l){l&&Le(i),o[e].d(l)}}}function cD(r){let e;const t=r[14].default,i=Cr(t,r,r[16],null);return{c(){i&&i.c()},m(n,s){i&&i.m(n,s),e=!0},p(n,s){i&&i.p&&(!e||s&65536)&&Er(i,t,n,n[16],e?kr(t,n[16],s,null):Ar(n[16]),null)},i(n){e||($e(i,n),e=!0)},o(n){st(i,n),e=!1},d(n){i&&i.d(n)}}}function dD(r){let e,t,i,n,s;const o=r[14].button,a=Cr(o,r,r[16],Dx),l=a||lD(r);function c(u){r[15](u)}let d={id:r[4],trigger:r[3],arrow:!1,color:"none",activeContent:!0,placement:r[1],class:r[8],$$slots:{default:[cD]},$$scope:{ctx:r}};return r[0]!==void 0&&(d.open=r[0]),i=new hC({props:d}),en.push(()=>fd(i,"open",c)),{c(){e=ai("div"),l&&l.c(),t=Tr(),wi(i.$$.fragment),ae(e,"class",r[7])},m(u,h){Me(u,e,h),l&&l.m(e,null),Ze(e,t),pi(i,e,null),s=!0},p(u,[h]){a?a.p&&(!s||h&65536)&&Er(a,o,u,u[16],s?kr(o,u[16],h,tD):Ar(u[16]),Dx):l&&l.p&&(!s||h&66165)&&l.p(u,s?h:-1);const f={};h&16&&(f.id=u[4]),h&8&&(f.trigger=u[3]),h&2&&(f.placement=u[1]),h&256&&(f.class=u[8]),h&65536&&(f.$$scope={dirty:h,ctx:u}),!n&&h&1&&(n=!0,f.open=u[0],hd(()=>n=!1)),i.$set(f),(!s||h&128)&&ae(e,"class",u[7])},i(u){s||($e(l,u),$e(i.$$.fragment,u),s=!0)},o(u){st(l,u),st(i.$$.fragment,u),s=!1},d(u){u&&Le(e),l&&l.d(u),gi(i)}}}function uD(r,e,t){const i=["defaultClass","popperDefaultClass","placement","pill","tooltip","trigger","textOutside","id","name","gradient","open"];let n=si(e,i),{$$slots:s={},$$scope:o}=e,{defaultClass:a="fixed end-6 bottom-6"}=e,{popperDefaultClass:l="flex items-center mb-4 gap-2"}=e,{placement:c="top"}=e,{pill:d=!0}=e,{tooltip:u="left"}=e,{trigger:h="hover"}=e,{textOutside:f=!1}=e,{id:m=WP()}=e,{name:p="Open actions menu"}=e,{gradient:g=!1}=e,{open:v=!1}=e;Wg("speed-dial",{pill:d,tooltip:u,textOutside:f});let b,S;function _(x){v=x,t(0,v)}return r.$$set=x=>{t(17,e=vt(vt({},e),ni(x))),t(9,n=si(e,i)),"defaultClass"in x&&t(10,a=x.defaultClass),"popperDefaultClass"in x&&t(11,l=x.popperDefaultClass),"placement"in x&&t(1,c=x.placement),"pill"in x&&t(2,d=x.pill),"tooltip"in x&&t(12,u=x.tooltip),"trigger"in x&&t(3,h=x.trigger),"textOutside"in x&&t(13,f=x.textOutside),"id"in x&&t(4,m=x.id),"name"in x&&t(5,p=x.name),"gradient"in x&&t(6,g=x.gradient),"open"in x&&t(0,v=x.open),"$$scope"in x&&t(16,o=x.$$scope)},r.$$.update=()=>{t(7,b=jt(a,"group",e.class)),r.$$.dirty&2050&&t(8,S=jt(l,["top","bottom"].includes(c.split("-")[0])&&"flex-col")),console.log(typeof n,Object.keys(n))},e=ni(e),[v,c,d,h,m,p,g,b,S,n,a,l,u,f,s,_,o]}class hD extends cr{constructor(e){super(),lr(this,e,uD,dD,Oi,{defaultClass:10,popperDefaultClass:11,placement:1,pill:2,tooltip:12,trigger:3,textOutside:13,id:4,name:5,gradient:6,open:0})}}function fD(r){let e;const t=r[4].default,i=Cr(t,r,r[6],null);return{c(){i&&i.c()},m(n,s){i&&i.m(n,s),e=!0},p(n,s){i&&i.p&&(!e||s&64)&&Er(i,t,n,n[6],e?kr(t,n[6],s,null):Ar(n[6]),null)},i(n){e||($e(i,n),e=!0)},o(n){st(i,n),e=!1},d(n){i&&i.d(n)}}}function mD(r){let e,t;const i=[{rounded:!0},{shadow:!0},r[1],{class:r[0]}];let n={$$slots:{default:[fD]},$$scope:{ctx:r}};for(let s=0;s{t(8,e=vt(vt({},e),ni(h))),t(1,n=si(e,i)),"type"in h&&t(2,a=h.type),"defaultClass"in h&&t(3,l=h.defaultClass),"$$scope"in h&&t(6,o=h.$$scope)},r.$$.update=()=>{n.color?t(2,a="custom"):t(1,n.color="none",n),["light","auto"].includes(a)&&t(1,n.border=!0,n),t(0,d=jt("tooltip",l,c[a],e.class))},e=ni(e),[d,n,a,l,s,u,o]}class gD extends cr{constructor(e){super(),lr(this,e,pD,mD,Oi,{type:2,defaultClass:3})}}function vD(r){let e,t;return{c(){e=ai("span"),t=Bt(r[0]),ae(e,"class",r[5])},m(i,n){Me(i,e,n),Ze(e,t)},p(i,n){n&1&&Xt(t,i[0]),n&32&&ae(e,"class",i[5])},d(i){i&&Le(e)}}}function _D(r){let e,t;return{c(){e=ai("span"),t=Bt(r[0]),ae(e,"class",r[4])},m(i,n){Me(i,e,n),Ze(e,t)},p(i,n){n&1&&Xt(t,i[0]),n&16&&ae(e,"class",i[4])},d(i){i&&Le(e)}}}function yD(r){let e,t;return{c(){e=ai("span"),t=Bt(r[0]),ae(e,"class","sr-only")},m(i,n){Me(i,e,n),Ze(e,t)},p(i,n){n&1&&Xt(t,i[0])},d(i){i&&Le(e)}}}function bD(r){let e,t,i;const n=r[9].default,s=Cr(n,r,r[11],null);function o(c,d){return c[1]!=="none"?yD:c[3]?_D:vD}let a=o(r),l=a(r);return{c(){s&&s.c(),e=Tr(),l.c(),t=Ht()},m(c,d){s&&s.m(c,d),Me(c,e,d),l.m(c,d),Me(c,t,d),i=!0},p(c,d){s&&s.p&&(!i||d&2048)&&Er(s,n,c,c[11],i?kr(n,c[11],d,null):Ar(c[11]),null),a===(a=o(c))&&l?l.p(c,d):(l.d(1),l=a(c),l&&(l.c(),l.m(t.parentNode,t)))},i(c){i||($e(s,c),i=!0)},o(c){st(s,c),i=!1},d(c){c&&(Le(e),Le(t)),s&&s.d(c),l.d(c)}}}function Mx(r){let e,t;return e=new gD({props:{placement:r[1],style:"dark",$$slots:{default:[xD]},$$scope:{ctx:r}}}),{c(){wi(e.$$.fragment)},m(i,n){pi(e,i,n),t=!0},p(i,n){const s={};n&2&&(s.placement=i[1]),n&2049&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||($e(e.$$.fragment,i),t=!0)},o(i){st(e.$$.fragment,i),t=!1},d(i){gi(e,i)}}}function xD(r){let e;return{c(){e=Bt(r[0])},m(t,i){Me(t,e,i)},p(t,i){i&1&&Xt(e,t[0])},d(t){t&&Le(e)}}}function wD(r){let e,t,i,n;const s=[{pill:r[2]},{outline:!0},{color:"light"},r[7],{class:r[6]}];let o={$$slots:{default:[bD]},$$scope:{ctx:r}};for(let l=0;l{a=null}),Mr())},i(l){n||($e(e.$$.fragment,l),$e(a),n=!0)},o(l){st(e.$$.fragment,l),st(a),n=!1},d(l){l&&(Le(t),Le(i)),gi(e,l),a&&a.d(l)}}}function SD(r,e,t){const i=["btnDefaultClass","name","tooltip","pill","textOutside","textOutsideClass","textDefaultClass"];let n=si(e,i),{$$slots:s={},$$scope:o}=e;const a=Gn("speed-dial");let{btnDefaultClass:l="w-[52px] h-[52px] shadow-sm !p-2"}=e,{name:c=""}=e,{tooltip:d=a.tooltip}=e,{pill:u=a.pill}=e,{textOutside:h=a.textOutside}=e,{textOutsideClass:f="block absolute -start-14 top-1/2 mb-px text-sm font-medium -translate-y-1/2"}=e,{textDefaultClass:m="block mb-px text-xs font-medium"}=e,p;function g(v){ke.call(this,r,v)}return r.$$set=v=>{t(13,e=vt(vt({},e),ni(v))),t(7,n=si(e,i)),"btnDefaultClass"in v&&t(8,l=v.btnDefaultClass),"name"in v&&t(0,c=v.name),"tooltip"in v&&t(1,d=v.tooltip),"pill"in v&&t(2,u=v.pill),"textOutside"in v&&t(3,h=v.textOutside),"textOutsideClass"in v&&t(4,f=v.textOutsideClass),"textDefaultClass"in v&&t(5,m=v.textDefaultClass),"$$scope"in v&&t(11,o=v.$$scope)},r.$$.update=()=>{t(6,p=jt(l,d==="none"&&"flex-col",h&&"relative",e.class))},e=ni(e),[c,d,u,h,f,m,p,n,l,s,g,o]}class Il extends cr{constructor(e){super(),lr(this,e,SD,wD,Oi,{btnDefaultClass:8,name:0,tooltip:1,pill:2,textOutside:3,textOutsideClass:4,textDefaultClass:5})}}function TD(r){var d;let e,t,i,n,s,o=r[4].id&&r[4].title&&Rx(r),a=r[5].id&&r[5].desc&&Fx(r),l=[{xmlns:"http://www.w3.org/2000/svg"},{fill:r[2]},r[10],{class:n=jt("shrink-0",r[8][(d=r[0])!=null?d:"md"],r[11].class)},{role:r[1]},{"aria-label":r[6]},{"aria-describedby":s=r[7]?r[9]:void 0},{viewBox:"0 0 24 24"}],c={};for(let u=0;u{t(11,e=vt(vt({},e),ni(w))),t(10,n=si(e,i)),"size"in w&&t(0,a=w.size),"role"in w&&t(1,l=w.role),"color"in w&&t(2,c=w.color),"withEvents"in w&&t(3,d=w.withEvents),"title"in w&&t(4,u=w.title),"desc"in w&&t(5,h=w.desc),"ariaLabel"in w&&t(6,p=w.ariaLabel)},r.$$.update=()=>{r.$$.dirty&48&&(u.id||h.id?t(7,m=!0):t(7,m=!1))},e=ni(e),[a,l,c,d,u,h,p,m,o,f,n,e,g,v,b,S,_,x,I,T,O]}class AD extends cr{constructor(e){super(),lr(this,e,ED,kD,Oi,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}function OD(r){var d;let e,t,i,n,s,o=r[4].id&&r[4].title&&Bx(r),a=r[5].id&&r[5].desc&&jx(r),l=[{xmlns:"http://www.w3.org/2000/svg"},{fill:"none"},{color:r[2]},r[10],{class:n=jt("shrink-0",r[8][(d=r[0])!=null?d:"md"],r[11].class)},{role:r[1]},{"aria-label":r[6]},{"aria-describedby":s=r[7]?r[9]:void 0},{viewBox:"0 0 24 24"}],c={};for(let u=0;u{t(11,e=vt(vt({},e),ni(w))),t(10,n=si(e,i)),"size"in w&&t(0,a=w.size),"role"in w&&t(1,l=w.role),"color"in w&&t(2,c=w.color),"withEvents"in w&&t(3,d=w.withEvents),"title"in w&&t(4,u=w.title),"desc"in w&&t(5,h=w.desc),"ariaLabel"in w&&t(6,p=w.ariaLabel)},r.$$.update=()=>{r.$$.dirty&48&&(u.id||h.id?t(7,m=!0):t(7,m=!1))},e=ni(e),[a,l,c,d,u,h,p,m,o,f,n,e,g,v,b,S,_,x,I,T,O]}class DD extends cr{constructor(e){super(),lr(this,e,PD,LD,Oi,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}function MD(r){var u;let e,t,i,n,s,o,a=r[4].id&&r[4].title&&Ux(r),l=r[5].id&&r[5].desc&&Hx(r),c=[{xmlns:"http://www.w3.org/2000/svg"},{fill:r[2]},r[10],{class:s=jt("shrink-0",r[8][(u=r[0])!=null?u:"md"],r[11].class)},{role:r[1]},{"aria-label":r[6]},{"aria-describedby":o=r[7]?r[9]:void 0},{viewBox:"0 0 24 24"}],d={};for(let h=0;h{t(11,e=vt(vt({},e),ni(w))),t(10,n=si(e,i)),"size"in w&&t(0,a=w.size),"role"in w&&t(1,l=w.role),"color"in w&&t(2,c=w.color),"withEvents"in w&&t(3,d=w.withEvents),"title"in w&&t(4,u=w.title),"desc"in w&&t(5,h=w.desc),"ariaLabel"in w&&t(6,p=w.ariaLabel)},r.$$.update=()=>{r.$$.dirty&48&&(u.id||h.id?t(7,m=!0):t(7,m=!1))},e=ni(e),[a,l,c,d,u,h,p,m,o,f,n,e,g,v,b,S,_,x,I,T,O]}class zD extends cr{constructor(e){super(),lr(this,e,ND,FD,Oi,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}function BD(r){var d;let e,t,i,n,s,o=r[4].id&&r[4].title&&Yx(r),a=r[5].id&&r[5].desc&&qx(r),l=[{xmlns:"http://www.w3.org/2000/svg"},{fill:r[2]},r[10],{class:n=jt("shrink-0",r[8][(d=r[0])!=null?d:"md"],r[11].class)},{role:r[1]},{"aria-label":r[6]},{"aria-describedby":s=r[7]?r[9]:void 0},{viewBox:"0 0 24 24"}],c={};for(let u=0;u{t(11,e=vt(vt({},e),ni(w))),t(10,n=si(e,i)),"size"in w&&t(0,a=w.size),"role"in w&&t(1,l=w.role),"color"in w&&t(2,c=w.color),"withEvents"in w&&t(3,d=w.withEvents),"title"in w&&t(4,u=w.title),"desc"in w&&t(5,h=w.desc),"ariaLabel"in w&&t(6,p=w.ariaLabel)},r.$$.update=()=>{r.$$.dirty&48&&(u.id||h.id?t(7,m=!0):t(7,m=!1))},e=ni(e),[a,l,c,d,u,h,p,m,o,f,n,e,g,v,b,S,_,x,I,T,O]}class UD extends cr{constructor(e){super(),lr(this,e,VD,GD,Oi,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}function HD(r){var d;let e,t,i,n,s,o=r[4].id&&r[4].title&&Jx(r),a=r[5].id&&r[5].desc&&Qx(r),l=[{xmlns:"http://www.w3.org/2000/svg"},{fill:r[2]},r[10],{class:n=jt("shrink-0",r[8][(d=r[0])!=null?d:"md"],r[11].class)},{role:r[1]},{"aria-label":r[6]},{"aria-describedby":s=r[7]?r[9]:void 0},{viewBox:"0 0 24 24"}],c={};for(let u=0;u{t(11,e=vt(vt({},e),ni(w))),t(10,n=si(e,i)),"size"in w&&t(0,a=w.size),"role"in w&&t(1,l=w.role),"color"in w&&t(2,c=w.color),"withEvents"in w&&t(3,d=w.withEvents),"title"in w&&t(4,u=w.title),"desc"in w&&t(5,h=w.desc),"ariaLabel"in w&&t(6,p=w.ariaLabel)},r.$$.update=()=>{r.$$.dirty&48&&(u.id||h.id?t(7,m=!0):t(7,m=!1))},e=ni(e),[a,l,c,d,u,h,p,m,o,f,n,e,g,v,b,S,_,x,I,T,O]}class qD extends cr{constructor(e){super(),lr(this,e,YD,WD,Oi,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}function ZD(r){var d;let e,t,i,n,s,o=r[4].id&&r[4].title&&tw(r),a=r[5].id&&r[5].desc&&iw(r),l=[{xmlns:"http://www.w3.org/2000/svg"},{fill:r[2]},r[10],{class:n=jt("shrink-0",r[8][(d=r[0])!=null?d:"md"],r[11].class)},{role:r[1]},{"aria-label":r[6]},{"aria-describedby":s=r[7]?r[9]:void 0},{viewBox:"0 0 24 24"}],c={};for(let u=0;u{t(11,e=vt(vt({},e),ni(w))),t(10,n=si(e,i)),"size"in w&&t(0,a=w.size),"role"in w&&t(1,l=w.role),"color"in w&&t(2,c=w.color),"withEvents"in w&&t(3,d=w.withEvents),"title"in w&&t(4,u=w.title),"desc"in w&&t(5,h=w.desc),"ariaLabel"in w&&t(6,p=w.ariaLabel)},r.$$.update=()=>{r.$$.dirty&48&&(u.id||h.id?t(7,m=!0):t(7,m=!1))},e=ni(e),[a,l,c,d,u,h,p,m,o,f,n,e,g,v,b,S,_,x,I,T,O]}class $D extends cr{constructor(e){super(),lr(this,e,QD,JD,Oi,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}function e6(r){var d;let e,t,i,n,s,o=r[4].id&&r[4].title&&sw(r),a=r[5].id&&r[5].desc&&ow(r),l=[{xmlns:"http://www.w3.org/2000/svg"},{fill:r[2]},r[10],{class:n=jt("shrink-0",r[8][(d=r[0])!=null?d:"md"],r[11].class)},{role:r[1]},{"aria-label":r[6]},{"aria-describedby":s=r[7]?r[9]:void 0},{viewBox:"0 0 24 24"}],c={};for(let u=0;u{t(11,e=vt(vt({},e),ni(w))),t(10,n=si(e,i)),"size"in w&&t(0,a=w.size),"role"in w&&t(1,l=w.role),"color"in w&&t(2,c=w.color),"withEvents"in w&&t(3,d=w.withEvents),"title"in w&&t(4,u=w.title),"desc"in w&&t(5,h=w.desc),"ariaLabel"in w&&t(6,p=w.ariaLabel)},r.$$.update=()=>{r.$$.dirty&48&&(u.id||h.id?t(7,m=!0):t(7,m=!1))},e=ni(e),[a,l,c,d,u,h,p,m,o,f,n,e,g,v,b,S,_,x,I,T,O]}class n6 extends cr{constructor(e){super(),lr(this,e,r6,i6,Oi,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}function s6(r){var d;let e,t,i,n,s,o=r[4].id&&r[4].title&&cw(r),a=r[5].id&&r[5].desc&&dw(r),l=[{xmlns:"http://www.w3.org/2000/svg"},{fill:r[2]},r[10],{class:n=jt("shrink-0",r[8][(d=r[0])!=null?d:"md"],r[11].class)},{role:r[1]},{"aria-label":r[6]},{"aria-describedby":s=r[7]?r[9]:void 0},{viewBox:"0 0 24 24"}],c={};for(let u=0;u{t(11,e=vt(vt({},e),ni(w))),t(10,n=si(e,i)),"size"in w&&t(0,a=w.size),"role"in w&&t(1,l=w.role),"color"in w&&t(2,c=w.color),"withEvents"in w&&t(3,d=w.withEvents),"title"in w&&t(4,u=w.title),"desc"in w&&t(5,h=w.desc),"ariaLabel"in w&&t(6,p=w.ariaLabel)},r.$$.update=()=>{r.$$.dirty&48&&(u.id||h.id?t(7,m=!0):t(7,m=!1))},e=ni(e),[a,l,c,d,u,h,p,m,o,f,n,e,g,v,b,S,_,x,I,T,O]}class c6 extends cr{constructor(e){super(),lr(this,e,l6,a6,Oi,{size:0,role:1,color:2,withEvents:3,title:4,desc:5,ariaLabel:6})}}var y0="http://www.w3.org/1999/xhtml";const fw={svg:"http://www.w3.org/2000/svg",xhtml:y0,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Lf(r){var e=r+="",t=e.indexOf(":");return t>=0&&(e=r.slice(0,t))!=="xmlns"&&(r=r.slice(t+1)),fw.hasOwnProperty(e)?{space:fw[e],local:r}:r}function d6(r){return function(){var e=this.ownerDocument,t=this.namespaceURI;return t===y0&&e.documentElement.namespaceURI===y0?e.createElement(r):e.createElementNS(t,r)}}function u6(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function fC(r){var e=Lf(r);return(e.local?u6:d6)(e)}function h6(){}function jv(r){return r==null?h6:function(){return this.querySelector(r)}}function f6(r){typeof r!="function"&&(r=jv(r));for(var e=this._groups,t=e.length,i=new Array(t),n=0;n=S&&(S=b+1);!(x=g[S])&&++S=0;)(o=i[n])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function z6(r){r||(r=B6);function e(u,h){return u&&h?r(u.__data__,h.__data__):!u-!h}for(var t=this._groups,i=t.length,n=new Array(i),s=0;se?1:r>=e?0:NaN}function j6(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function G6(){return Array.from(this)}function V6(){for(var r=this._groups,e=0,t=r.length;e1?this.each((e==null?$6:typeof e=="function"?tM:eM)(r,e,t==null?"":t)):Ll(this.node(),r)}function Ll(r,e){return r.style.getPropertyValue(e)||_C(r).getComputedStyle(r,null).getPropertyValue(e)}function rM(r){return function(){delete this[r]}}function nM(r,e){return function(){this[r]=e}}function sM(r,e){return function(){var t=e.apply(this,arguments);t==null?delete this[r]:this[r]=t}}function oM(r,e){return arguments.length>1?this.each((e==null?rM:typeof e=="function"?sM:nM)(r,e)):this.node()[r]}function yC(r){return r.trim().split(/^|\s+/)}function Gv(r){return r.classList||new bC(r)}function bC(r){this._node=r,this._names=yC(r.getAttribute("class")||"")}bC.prototype={add:function(r){var e=this._names.indexOf(r);e<0&&(this._names.push(r),this._node.setAttribute("class",this._names.join(" ")))},remove:function(r){var e=this._names.indexOf(r);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(r){return this._names.indexOf(r)>=0}};function xC(r,e){for(var t=Gv(r),i=-1,n=e.length;++i=0&&(t=e.slice(i+1),e=e.slice(0,i)),{type:e,name:t}})}function MM(r){return function(){var e=this.__on;if(e){for(var t=0,i=-1,n=e.length,s;tCC)throw new Error("too late; already scheduled");return t}function as(r,e){var t=Vn(r,e);if(t.state>gh)throw new Error("too late; already running");return t}function Vn(r,e){var t=r.__transition;if(!t||!(t=t[e]))throw new Error("transition not found");return t}function XM(r,e,t){var i=r.__transition,n;i[e]=t,t.timer=Dv(s,0,t.time);function s(c){t.state=mw,t.timer.restart(o,t.delay,t.time),t.delay<=c&&o(c-t.delay)}function o(c){var d,u,h,f;if(t.state!==mw)return l();for(d in i)if(f=i[d],f.name===t.name){if(f.state===gh)return px(o);f.state===pw?(f.state=vh,f.timer.stop(),f.on.call("interrupt",r,r.__data__,f.index,f.group),delete i[d]):+db0&&i.state>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):t===8?Zu(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):t===4?Zu(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=qM.exec(r))?new Kr(e[1],e[2],e[3],1):(e=ZM.exec(r))?new Kr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=KM.exec(r))?Zu(e[1],e[2],e[3],e[4]):(e=JM.exec(r))?Zu(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=QM.exec(r))?ww(e[1],e[2]/100,e[3]/100,1):(e=$M.exec(r))?ww(e[1],e[2]/100,e[3]/100,e[4]):gw.hasOwnProperty(r)?yw(gw[r]):r==="transparent"?new Kr(NaN,NaN,NaN,0):null}function yw(r){return new Kr(r>>16&255,r>>8&255,r&255,1)}function Zu(r,e,t,i){return i<=0&&(r=e=t=NaN),new Kr(r,e,t,i)}function iR(r){return r instanceof Sd||(r=Ps(r)),r?(r=r.rgb(),new Kr(r.r,r.g,r.b,r.opacity)):new Kr}function w0(r,e,t,i){return arguments.length===1?iR(r):new Kr(r,e,t,i==null?1:i)}function Kr(r,e,t,i){this.r=+r,this.g=+e,this.b=+t,this.opacity=+i}Uv(Kr,w0,kC(Sd,{brighter(r){return r=r==null?qh:Math.pow(qh,r),new Kr(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?rd:Math.pow(rd,r),new Kr(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Kr(sa(this.r),sa(this.g),sa(this.b),Zh(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:bw,formatHex:bw,formatHex8:rR,formatRgb:xw,toString:xw}));function bw(){return`#${ta(this.r)}${ta(this.g)}${ta(this.b)}`}function rR(){return`#${ta(this.r)}${ta(this.g)}${ta(this.b)}${ta((isNaN(this.opacity)?1:this.opacity)*255)}`}function xw(){const r=Zh(this.opacity);return`${r===1?"rgb(":"rgba("}${sa(this.r)}, ${sa(this.g)}, ${sa(this.b)}${r===1?")":`, ${r})`}`}function Zh(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function sa(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function ta(r){return r=sa(r),(r<16?"0":"")+r.toString(16)}function ww(r,e,t,i){return i<=0?r=e=t=NaN:t<=0||t>=1?r=e=NaN:e<=0&&(r=NaN),new Mn(r,e,t,i)}function EC(r){if(r instanceof Mn)return new Mn(r.h,r.s,r.l,r.opacity);if(r instanceof Sd||(r=Ps(r)),!r)return new Mn;if(r instanceof Mn)return r;r=r.rgb();var e=r.r/255,t=r.g/255,i=r.b/255,n=Math.min(e,t,i),s=Math.max(e,t,i),o=NaN,a=s-n,l=(s+n)/2;return a?(e===s?o=(t-i)/a+(t0&&l<1?0:o,new Mn(o,a,l,r.opacity)}function nR(r,e,t,i){return arguments.length===1?EC(r):new Mn(r,e,t,i==null?1:i)}function Mn(r,e,t,i){this.h=+r,this.s=+e,this.l=+t,this.opacity=+i}Uv(Mn,nR,kC(Sd,{brighter(r){return r=r==null?qh:Math.pow(qh,r),new Mn(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?rd:Math.pow(rd,r),new Mn(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,t=this.l,i=t+(t<.5?t:1-t)*e,n=2*t-i;return new Kr(Tg(r>=240?r-240:r+120,n,i),Tg(r,n,i),Tg(r<120?r+240:r-120,n,i),this.opacity)},clamp(){return new Mn(Sw(this.h),Ku(this.s),Ku(this.l),Zh(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 r=Zh(this.opacity);return`${r===1?"hsl(":"hsla("}${Sw(this.h)}, ${Ku(this.s)*100}%, ${Ku(this.l)*100}%${r===1?")":`, ${r})`}`}}));function Sw(r){return r=(r||0)%360,r<0?r+360:r}function Ku(r){return Math.max(0,Math.min(1,r||0))}function Tg(r,e,t){return(r<60?e+(t-e)*r/60:r<180?t:r<240?e+(t-e)*(240-r)/60:e)*255}const Hv=r=>()=>r;function sR(r,e){return function(t){return r+t*e}}function oR(r,e,t){return r=Math.pow(r,t),e=Math.pow(e,t)-r,t=1/t,function(i){return Math.pow(r+i*e,t)}}function aR(r){return(r=+r)==1?AC:function(e,t){return t-e?oR(e,t,r):Hv(isNaN(e)?t:e)}}function AC(r,e){var t=e-r;return t?sR(r,t):Hv(isNaN(r)?e:r)}const Kh=function r(e){var t=aR(e);function i(n,s){var o=t((n=w0(n)).r,(s=w0(s)).r),a=t(n.g,s.g),l=t(n.b,s.b),c=AC(n.opacity,s.opacity);return function(d){return n.r=o(d),n.g=a(d),n.b=l(d),n.opacity=c(d),n+""}}return i.gamma=r,i}(1);function lR(r,e){e||(e=[]);var t=r?Math.min(e.length,r.length):0,i=e.slice(),n;return function(s){for(n=0;nt&&(s=e.slice(t,s),a[o]?a[o]+=s:a[++o]=s),(i=i[0])===(n=n[0])?a[o]?a[o]+=n:a[++o]=n:(a[++o]=null,l.push({i:o,x:Pn(i,n)})),t=Cg.lastIndex;return t180?d+=360:d-c>180&&(c+=360),h.push({i:u.push(n(u)+"rotate(",null,i)-2,x:Pn(c,d)})):d&&u.push(n(u)+"rotate("+d+i)}function a(c,d,u,h){c!==d?h.push({i:u.push(n(u)+"skewX(",null,i)-2,x:Pn(c,d)}):d&&u.push(n(u)+"skewX("+d+i)}function l(c,d,u,h,f,m){if(c!==u||d!==h){var p=f.push(n(f)+"scale(",null,",",null,")");m.push({i:p-4,x:Pn(c,u)},{i:p-2,x:Pn(d,h)})}else(u!==1||h!==1)&&f.push(n(f)+"scale("+u+","+h+")")}return function(c,d){var u=[],h=[];return c=r(c),d=r(d),s(c.translateX,c.translateY,d.translateX,d.translateY,u,h),o(c.rotate,d.rotate,u,h),a(c.skewX,d.skewX,u,h),l(c.scaleX,c.scaleY,d.scaleX,d.scaleY,u,h),c=d=null,function(f){for(var m=-1,p=h.length,g;++m=0&&(e=e.slice(0,t)),!e||e==="start"})}function QR(r,e,t){var i,n,s=JR(e)?Vv:as;return function(){var o=s(this,r),a=o.on;a!==i&&(n=(i=a).copy()).on(e,t),o.on=n}}function $R(r,e){var t=this._id;return arguments.length<2?Vn(this.node(),t).on.on(r):this.each(QR(t,r,e))}function eF(r){return function(){var e=this.parentNode;for(var t in this.__transition)if(+t!==r)return;e&&e.removeChild(this)}}function tF(){return this.on("end.remove",eF(this._id))}function iF(r){var e=this._name,t=this._id;typeof r!="function"&&(r=jv(r));for(var i=this._groups,n=i.length,s=new Array(n),o=0;o=0&&(y|0)===y||o("invalid parameter type, ("+y+")"+l(A)+". must be a nonnegative integer")}function m(y,A,j){A.indexOf(y)<0&&o("invalid value"+l(j)+". must be one of: "+A)}var p=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function g(y){Object.keys(y).forEach(function(A){p.indexOf(A)<0&&o('invalid regl constructor argument "'+A+'". must be one of '+p)})}function v(y,A){for(y=y+"";y.length0&&A.push(new _("unknown",0,j))}}),A}function E(y,A){A.forEach(function(j){var se=y[j.file];if(se){var ye=se.index[j.line];if(ye){ye.errors.push(j),se.hasErrors=!0;return}}y.unknown.hasErrors=!0,y.unknown.lines[0].errors.push(j)})}function w(y,A,j,se,ye){if(!y.getShaderParameter(A,y.COMPILE_STATUS)){var ne=y.getShaderInfoLog(A),he=se===y.FRAGMENT_SHADER?"fragment":"vertex";L(j,"string",he+" shader source must be a string",ye);var Ee=T(j,ye),Ce=O(ne);E(Ee,Ce),Object.keys(Ee).forEach(function(Re){var Ne=Ee[Re];if(!Ne.hasErrors)return;var Fe=[""],Ge=[""];function Ae(De,Q){Fe.push(De),Ge.push(Q||"")}Ae("file number "+Re+": "+Ne.name+` +`,"color:red;text-decoration:underline;font-weight:bold"),Ne.lines.forEach(function(De){if(De.errors.length>0){Ae(v(De.number,4)+"| ","background-color:yellow; font-weight:bold"),Ae(De.line+n,"color:red; background-color:yellow; font-weight:bold");var Q=0;De.errors.forEach(function(ue){var Pe=ue.message,Je=/^\s*'(.*)'\s*:\s*(.*)$/.exec(Pe);if(Je){var Se=Je[1];switch(Pe=Je[2],Se){case"assign":Se="=";break}Q=Math.max(De.line.indexOf(Se,Q),0)}else Q=0;Ae(v("| ",6)),Ae(v("^^^",Q+3)+n,"font-weight:bold"),Ae(v("| ",6)),Ae(Pe+n,"font-weight:bold")}),Ae(v("| ",6)+n)}else Ae(v(De.number,4)+"| "),Ae(De.line+n,"color:red")}),typeof document!="undefined"&&!window.chrome?(Ge[0]=Fe.join("%c"),console.log.apply(console,Ge)):console.log(Fe.join(""))}),a.raise("Error compiling "+he+" shader, "+Ee[0].name)}}function X(y,A,j,se,ye){if(!y.getProgramParameter(A,y.LINK_STATUS)){var ne=y.getProgramInfoLog(A),he=T(j,ye),Ee=T(se,ye),Ce='Error linking program with vertex shader, "'+Ee[0].name+'", and fragment shader "'+he[0].name+'"';typeof document!="undefined"?console.log("%c"+Ce+n+"%c"+ne,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(Ce+n+ne),a.raise(Ce)}}function H(y){y._commandRef=x()}function Y(y,A,j,se){H(y);function ye(Ce){return Ce?se.id(Ce):0}y._fragId=ye(y.static.frag),y._vertId=ye(y.static.vert);function ne(Ce,Re){Object.keys(Re).forEach(function(Ne){Ce[se.id(Ne)]=!0})}var he=y._uniformSet={};ne(he,A.static),ne(he,A.dynamic);var Ee=y._attributeSet={};ne(Ee,j.static),ne(Ee,j.dynamic),y._hasCount="count"in y.static||"count"in y.dynamic||"elements"in y.static||"elements"in y.dynamic}function k(y,A){var j=I();o(y+" in command "+(A||x())+(j==="unknown"?"":" called from "+j))}function D(y,A,j){y||k(A,j||x())}function M(y,A,j,se){y in A||k("unknown parameter ("+y+")"+l(j)+". possible values: "+Object.keys(A).join(),se||x())}function L(y,A,j,se){u(y,A)||k("invalid parameter type"+l(j)+". expected "+A+", got "+typeof y,se||x())}function J(y){y()}function ce(y,A,j){y.texture?m(y.texture._texture.internalformat,A,"unsupported texture format for attachment"):m(y.renderbuffer._renderbuffer.format,j,"unsupported renderbuffer format for attachment")}var te=33071,et=9728,ot=9984,Ot=9985,gt=9986,je=9987,At=5120,It=5121,de=5122,pe=5123,He=5124,dt=5125,Oe=5126,Gt=32819,ei=32820,rt=33635,_t=34042,vi=36193,Si={};Si[At]=Si[It]=1,Si[de]=Si[pe]=Si[vi]=Si[rt]=Si[Gt]=Si[ei]=2,Si[He]=Si[dt]=Si[Oe]=Si[_t]=4;function Vs(y,A){return y===ei||y===Gt||y===rt?2:y===_t?4:Si[y]*A}function Ta(y){return!(y&y-1)&&!!y}function qf(y,A,j){var se,ye=A.width,ne=A.height,he=A.channels;a(ye>0&&ye<=j.maxTextureSize&&ne>0&&ne<=j.maxTextureSize,"invalid texture shape"),(y.wrapS!==te||y.wrapT!==te)&&a(Ta(ye)&&Ta(ne),"incompatible wrap mode for texture, both width and height must be power of 2"),A.mipmask===1?ye!==1&&ne!==1&&a(y.minFilter!==ot&&y.minFilter!==gt&&y.minFilter!==Ot&&y.minFilter!==je,"min filter requires mipmap"):(a(Ta(ye)&&Ta(ne),"texture must be a square power of 2 to support mipmapping"),a(A.mipmask===(ye<<1)-1,"missing or incomplete mipmap data")),A.type===Oe&&(j.extensions.indexOf("oes_texture_float_linear")<0&&a(y.minFilter===et&&y.magFilter===et,"filter not supported, must enable oes_texture_float_linear"),a(!y.genMipmaps,"mipmap generation not supported with float textures"));var Ee=A.images;for(se=0;se<16;++se)if(Ee[se]){var Ce=ye>>se,Re=ne>>se;a(A.mipmask&1<0&&ye<=se.maxTextureSize&&ne>0&&ne<=se.maxTextureSize,"invalid texture shape"),a(ye===ne,"cube map must be square"),a(A.wrapS===te&&A.wrapT===te,"wrap mode not supported by cube map");for(var Ee=0;Ee>Ne,Ae=ne>>Ne;a(Ce.mipmask&1<1&&A===j&&(A==='"'||A==="'"))return['"'+Te(y.substr(1,y.length-2))+'"'];var se=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(y);if(se)return fe(y.substr(0,se.index)).concat(fe(se[1])).concat(fe(y.substr(se.index+se[0].length)));var ye=y.split(".");if(ye.length===1)return['"'+Te(y)+'"'];for(var ne=[],he=0;he0,"invalid pixel ratio"))):P.raise("invalid arguments to regl"),j&&(j.nodeName.toLowerCase()==="canvas"?ye=j:se=j),!ne){if(!ye){P(typeof document!="undefined","must manually specify webgl context outside of DOM environments");var Ae=Di(se||document.body,Fe,Re);if(!Ae)return null;ye=Ae.canvas,Ge=Ae.onDestroy}he.premultipliedAlpha===void 0&&(he.premultipliedAlpha=!0),ne=yi(ye,he)}return ne?{gl:ne,canvas:ye,container:se,extensions:Ee,optionalExtensions:Ce,pixelRatio:Re,profile:Ne,onDone:Fe,onDestroy:Ge}:(Ge(),Fe("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function Us(y,A){var j={};function se(he){P.type(he,"string","extension name must be string");var Ee=he.toLowerCase(),Ce;try{Ce=j[Ee]=y.getExtension(Ee)}catch(Re){}return!!Ce}for(var ye=0;ye65535)<<4,y>>>=A,j=(y>255)<<3,y>>>=j,A|=j,j=(y>15)<<2,y>>>=j,A|=j,j=(y>3)<<1,y>>>=j,A|=j,A|y>>1}function Fd(){var y=Ti(8,function(){return[]});function A(ne){var he=Md(ne),Ee=y[Rd(he)>>2];return Ee.length>0?Ee.pop():new ArrayBuffer(he)}function j(ne){y[Rd(ne.byteLength)>>2].push(ne)}function se(ne,he){var Ee=null;switch(ne){case Oo:Ee=new Int8Array(A(he),0,he);break;case wr:Ee=new Uint8Array(A(he),0,he);break;case ir:Ee=new Int16Array(A(2*he),0,he);break;case Jf:Ee=new Uint16Array(A(2*he),0,he);break;case Zl:Ee=new Int32Array(A(4*he),0,he);break;case Dd:Ee=new Uint32Array(A(4*he),0,he);break;case Qf:Ee=new Float32Array(A(4*he),0,he);break;default:return null}return Ee.length!==he?Ee.subarray(0,he):Ee}function ye(ne){j(ne.buffer)}return{alloc:A,free:j,allocType:se,freeType:ye}}var Ii=Fd();Ii.zero=Fd();var lt=3408,Yt=3410,oi=3411,Wi=3412,Kt=3413,Nt=3414,ci=3415,bi=33901,rr=33902,dr=3379,ur=3386,hs=34921,dn=36347,Hs=36348,Ca=35661,fs=35660,ms=34930,Kl=36349,Sn=34076,Nd=34024,Qk=7936,$k=7937,eE=7938,tE=35724,iE=34047,rE=36063,nE=34852,zd=3553,y_=34067,sE=34069,oE=33984,Jl=6408,$f=5126,b_=5121,em=36160,aE=36053,lE=36064,cE=16384,dE=function(y,A){var j=1;A.ext_texture_filter_anisotropic&&(j=y.getParameter(iE));var se=1,ye=1;A.webgl_draw_buffers&&(se=y.getParameter(nE),ye=y.getParameter(rE));var ne=!!A.oes_texture_float;if(ne){var he=y.createTexture();y.bindTexture(zd,he),y.texImage2D(zd,0,Jl,1,1,0,Jl,$f,null);var Ee=y.createFramebuffer();if(y.bindFramebuffer(em,Ee),y.framebufferTexture2D(em,lE,zd,he,0),y.bindTexture(zd,null),y.checkFramebufferStatus(em)!==aE)ne=!1;else{y.viewport(0,0,1,1),y.clearColor(1,0,0,1),y.clear(cE);var Ce=Ii.allocType($f,4);y.readPixels(0,0,1,1,Jl,$f,Ce),y.getError()?ne=!1:(y.deleteFramebuffer(Ee),y.deleteTexture(he),ne=Ce[0]===1),Ii.freeType(Ce)}}var Re=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Ne=!0;if(!Re){var Fe=y.createTexture(),Ge=Ii.allocType(b_,36);y.activeTexture(oE),y.bindTexture(y_,Fe),y.texImage2D(sE,0,Jl,3,3,0,Jl,b_,Ge),Ii.freeType(Ge),y.bindTexture(y_,null),y.deleteTexture(Fe),Ne=!y.getError()}return{colorBits:[y.getParameter(Yt),y.getParameter(oi),y.getParameter(Wi),y.getParameter(Kt)],depthBits:y.getParameter(Nt),stencilBits:y.getParameter(ci),subpixelBits:y.getParameter(lt),extensions:Object.keys(A).filter(function(Ae){return!!A[Ae]}),maxAnisotropic:j,maxDrawbuffers:se,maxColorAttachments:ye,pointSizeDims:y.getParameter(bi),lineWidthDims:y.getParameter(rr),maxViewportDims:y.getParameter(ur),maxCombinedTextureUnits:y.getParameter(Ca),maxCubeMapSize:y.getParameter(Sn),maxRenderbufferSize:y.getParameter(Nd),maxTextureUnits:y.getParameter(ms),maxTextureSize:y.getParameter(dr),maxAttributes:y.getParameter(hs),maxVertexUniforms:y.getParameter(dn),maxVertexTextureUnits:y.getParameter(fs),maxVaryingVectors:y.getParameter(Hs),maxFragmentUniforms:y.getParameter(Kl),glsl:y.getParameter(tE),renderer:y.getParameter($k),vendor:y.getParameter(Qk),version:y.getParameter(eE),readFloat:ne,npotTextureCube:Ne}};function Tn(y){return!!y&&typeof y=="object"&&Array.isArray(y.shape)&&Array.isArray(y.stride)&&typeof y.offset=="number"&&y.shape.length===y.stride.length&&(Array.isArray(y.data)||t(y.data))}var rn=function(y){return Object.keys(y).map(function(A){return y[A]})},Bd={shape:mE,flatten:fE};function uE(y,A,j){for(var se=0;se0){var mt;if(Array.isArray(ue[0])){We=S_(ue);for(var be=1,_e=1;_e0)if(typeof be[0]=="number"){var Ie=Ii.allocType(Se.dtype,be.length);C_(Ie,be),We(Ie,it),Ii.freeType(Ie)}else if(Array.isArray(be[0])||t(be[0])){Ve=S_(be);var Ue=im(be,Ve,Se.dtype);We(Ue,it),Ii.freeType(Ue)}else P.raise("invalid buffer data")}else if(Tn(be)){Ve=be.shape;var Xe=be.stride,kt=0,Ct=0,Ye=0,Ke=0;Ve.length===1?(kt=Ve[0],Ct=1,Ye=Xe[0],Ke=0):Ve.length===2?(kt=Ve[0],Ct=Ve[1],Ye=Xe[0],Ke=Xe[1]):P.raise("invalid shape");var wt=Array.isArray(be.data)?Se.dtype:Gd(be.data),Et=Ii.allocType(wt,kt*Ct);k_(Et,be.data,kt,Ct,Ye,Ke,be.offset),We(Et,it),Ii.freeType(Et)}else P.raise("invalid data for buffer subdata");return qe}return Pe||qe(Q),qe._reglType="buffer",qe._buffer=Se,qe.subdata=mt,j.profile&&(qe.stats=Se.stats),qe.destroy=function(){Ge(Se)},qe}function De(){rn(ne).forEach(function(Q){Q.buffer=y.createBuffer(),y.bindBuffer(Q.type,Q.buffer),y.bufferData(Q.type,Q.persistentData||Q.byteLength,Q.usage)})}return j.profile&&(A.getTotalBufferSize=function(){var Q=0;return Object.keys(ne).forEach(function(ue){Q+=ne[ue].stats.size}),Q}),{create:Ae,createStream:Ce,destroyStream:Re,clear:function(){rn(ne).forEach(Ge),Ee.forEach(Ge)},getBuffer:function(Q){return Q&&Q._buffer instanceof he?Q._buffer:null},restore:De,_initBuffer:Fe}}var EE=0,AE=0,OE=1,IE=1,LE=4,PE=4,Ws={points:EE,point:AE,lines:OE,line:IE,triangles:LE,triangle:PE,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},DE=0,ME=1,Ql=4,RE=5120,ka=5121,E_=5122,Ea=5123,A_=5124,Lo=5125,sm=34963,FE=35040,NE=35044;function zE(y,A,j,se){var ye={},ne=0,he={uint8:ka,uint16:Ea};A.oes_element_index_uint&&(he.uint32=Lo);function Ee(De){this.id=ne++,ye[this.id]=this,this.buffer=De,this.primType=Ql,this.vertCount=0,this.type=0}Ee.prototype.bind=function(){this.buffer.bind()};var Ce=[];function Re(De){var Q=Ce.pop();return Q||(Q=new Ee(j.create(null,sm,!0,!1)._buffer)),Fe(Q,De,FE,-1,-1,0,0),Q}function Ne(De){Ce.push(De)}function Fe(De,Q,ue,Pe,Je,Se,qe){De.buffer.bind();var We;if(Q){var mt=qe;!qe&&(!t(Q)||Tn(Q)&&!t(Q.data))&&(mt=A.oes_element_index_uint?Lo:Ea),j._initBuffer(De.buffer,Q,ue,mt,3)}else y.bufferData(sm,Se,ue),De.buffer.dtype=We||ka,De.buffer.usage=ue,De.buffer.dimension=3,De.buffer.byteLength=Se;if(We=qe,!qe){switch(De.buffer.dtype){case ka:case RE:We=ka;break;case Ea:case E_:We=Ea;break;case Lo:case A_:We=Lo;break;default:P.raise("unsupported type for element array")}De.buffer.dtype=We}De.type=We,P(We!==Lo||!!A.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var be=Je;be<0&&(be=De.buffer.byteLength,We===Ea?be>>=1:We===Lo&&(be>>=2)),De.vertCount=be;var _e=Pe;if(Pe<0){_e=Ql;var it=De.buffer.dimension;it===1&&(_e=DE),it===2&&(_e=ME),it===3&&(_e=Ql)}De.primType=_e}function Ge(De){se.elementsCount--,P(De.buffer!==null,"must not double destroy elements"),delete ye[De.id],De.buffer.destroy(),De.buffer=null}function Ae(De,Q){var ue=j.create(null,sm,!0),Pe=new Ee(ue._buffer);se.elementsCount++;function Je(Se){if(!Se)ue(),Pe.primType=Ql,Pe.vertCount=0,Pe.type=ka;else if(typeof Se=="number")ue(Se),Pe.primType=Ql,Pe.vertCount=Se|0,Pe.type=ka;else{var qe=null,We=NE,mt=-1,be=-1,_e=0,it=0;Array.isArray(Se)||t(Se)||Tn(Se)?qe=Se:(P.type(Se,"object","invalid arguments for elements"),"data"in Se&&(qe=Se.data,P(Array.isArray(qe)||t(qe)||Tn(qe),"invalid data for element buffer")),"usage"in Se&&(P.parameter(Se.usage,jd,"invalid element buffer usage"),We=jd[Se.usage]),"primitive"in Se&&(P.parameter(Se.primitive,Ws,"invalid element buffer primitive"),mt=Ws[Se.primitive]),"count"in Se&&(P(typeof Se.count=="number"&&Se.count>=0,"invalid vertex count for elements"),be=Se.count|0),"type"in Se&&(P.parameter(Se.type,he,"invalid buffer type"),it=he[Se.type]),"length"in Se?_e=Se.length|0:(_e=be,it===Ea||it===E_?_e*=2:(it===Lo||it===A_)&&(_e*=4))),Fe(Pe,qe,We,mt,be,_e,it)}return Je}return Je(De),Je._reglType="elements",Je._elements=Pe,Je.subdata=function(Se,qe){return ue.subdata(Se,qe),Je},Je.destroy=function(){Ge(Pe)},Je}return{create:Ae,createStream:Re,destroyStream:Ne,getElements:function(De){return typeof De=="function"&&De._elements instanceof Ee?De._elements:null},clear:function(){rn(ye).forEach(Ge)}}}var O_=new Float32Array(1),BE=new Uint32Array(O_.buffer),jE=5123;function I_(y){for(var A=Ii.allocType(jE,y.length),j=0;j>>31<<15,ne=(se<<1>>>24)-127,he=se>>13&1023;if(ne<-24)A[j]=ye;else if(ne<-14){var Ee=-14-ne;A[j]=ye+(he+1024>>Ee)}else ne>15?A[j]=ye+31744:A[j]=ye+(ne+15<<10)+he}return A}function ki(y){return Array.isArray(y)||t(y)}var L_=function(y){return!(y&y-1)&&!!y},GE=34467,Un=3553,om=34067,Vd=34069,Po=6408,am=6406,Ud=6407,$l=6409,Hd=6410,P_=32854,lm=32855,D_=36194,VE=32819,UE=32820,HE=33635,XE=34042,cm=6402,Xd=34041,dm=35904,um=35906,Aa=36193,hm=33776,fm=33777,mm=33778,pm=33779,M_=35986,R_=35987,F_=34798,N_=35840,z_=35841,B_=35842,j_=35843,G_=36196,Oa=5121,gm=5123,vm=5125,ec=5126,WE=10242,YE=10243,qE=10497,_m=33071,ZE=33648,KE=10240,JE=10241,ym=9728,QE=9729,bm=9984,V_=9985,U_=9986,xm=9987,$E=33170,Wd=4352,e3=4353,t3=4354,i3=34046,r3=3317,n3=37440,s3=37441,o3=37443,H_=37444,tc=33984,a3=[bm,U_,V_,xm],Yd=[0,$l,Hd,Ud,Po],un={};un[$l]=un[am]=un[cm]=1,un[Xd]=un[Hd]=2,un[Ud]=un[dm]=3,un[Po]=un[um]=4;function Ia(y){return"[object "+y+"]"}var X_=Ia("HTMLCanvasElement"),W_=Ia("OffscreenCanvas"),Y_=Ia("CanvasRenderingContext2D"),q_=Ia("ImageBitmap"),Z_=Ia("HTMLImageElement"),K_=Ia("HTMLVideoElement"),l3=Object.keys(tm).concat([X_,W_,Y_,q_,Z_,K_]),La=[];La[Oa]=1,La[ec]=4,La[Aa]=2,La[gm]=2,La[vm]=4;var gr=[];gr[P_]=2,gr[lm]=2,gr[D_]=2,gr[Xd]=4,gr[hm]=.5,gr[fm]=.5,gr[mm]=1,gr[pm]=1,gr[M_]=.5,gr[R_]=1,gr[F_]=1,gr[N_]=.5,gr[z_]=.25,gr[B_]=.5,gr[j_]=.25,gr[G_]=.5;function J_(y){return Array.isArray(y)&&(y.length===0||typeof y[0]=="number")}function Q_(y){if(!Array.isArray(y))return!1;var A=y.length;return!(A===0||!ki(y[0]))}function Do(y){return Object.prototype.toString.call(y)}function $_(y){return Do(y)===X_}function ey(y){return Do(y)===W_}function c3(y){return Do(y)===Y_}function d3(y){return Do(y)===q_}function u3(y){return Do(y)===Z_}function h3(y){return Do(y)===K_}function wm(y){if(!y)return!1;var A=Do(y);return l3.indexOf(A)>=0?!0:J_(y)||Q_(y)||Tn(y)}function ty(y){return tm[Object.prototype.toString.call(y)]|0}function f3(y,A){var j=A.length;switch(y.type){case Oa:case gm:case vm:case ec:var se=Ii.allocType(y.type,j);se.set(A),y.data=se;break;case Aa:y.data=I_(A);break;default:P.raise("unsupported texture type, must specify a typed array")}}function iy(y,A){return Ii.allocType(y.type===Aa?ec:y.type,A)}function ry(y,A){y.type===Aa?(y.data=I_(A),Ii.freeType(A)):y.data=A}function m3(y,A,j,se,ye,ne){for(var he=y.width,Ee=y.height,Ce=y.channels,Re=he*Ee*Ce,Ne=iy(y,Re),Fe=0,Ge=0;Ge=1;)Ee+=he*Ce*Ce,Ce/=2;return Ee}else return he*j*se}function p3(y,A,j,se,ye,ne,he){var Ee={"don't care":Wd,"dont care":Wd,nice:t3,fast:e3},Ce={repeat:qE,clamp:_m,mirror:ZE},Re={nearest:ym,linear:QE},Ne=i({mipmap:xm,"nearest mipmap nearest":bm,"linear mipmap nearest":V_,"nearest mipmap linear":U_,"linear mipmap linear":xm},Re),Fe={none:0,browser:H_},Ge={uint8:Oa,rgba4:VE,rgb565:HE,"rgb5 a1":UE},Ae={alpha:am,luminance:$l,"luminance alpha":Hd,rgb:Ud,rgba:Po,rgba4:P_,"rgb5 a1":lm,rgb565:D_},De={};A.ext_srgb&&(Ae.srgb=dm,Ae.srgba=um),A.oes_texture_float&&(Ge.float32=Ge.float=ec),A.oes_texture_half_float&&(Ge.float16=Ge["half float"]=Aa),A.webgl_depth_texture&&(i(Ae,{depth:cm,"depth stencil":Xd}),i(Ge,{uint16:gm,uint32:vm,"depth stencil":XE})),A.webgl_compressed_texture_s3tc&&i(De,{"rgb s3tc dxt1":hm,"rgba s3tc dxt1":fm,"rgba s3tc dxt3":mm,"rgba s3tc dxt5":pm}),A.webgl_compressed_texture_atc&&i(De,{"rgb atc":M_,"rgba atc explicit alpha":R_,"rgba atc interpolated alpha":F_}),A.webgl_compressed_texture_pvrtc&&i(De,{"rgb pvrtc 4bppv1":N_,"rgb pvrtc 2bppv1":z_,"rgba pvrtc 4bppv1":B_,"rgba pvrtc 2bppv1":j_}),A.webgl_compressed_texture_etc1&&(De["rgb etc1"]=G_);var Q=Array.prototype.slice.call(y.getParameter(GE));Object.keys(De).forEach(function(z){var oe=De[z];Q.indexOf(oe)>=0&&(Ae[z]=oe)});var ue=Object.keys(Ae);j.textureFormats=ue;var Pe=[];Object.keys(Ae).forEach(function(z){var oe=Ae[z];Pe[oe]=z});var Je=[];Object.keys(Ge).forEach(function(z){var oe=Ge[z];Je[oe]=z});var Se=[];Object.keys(Re).forEach(function(z){var oe=Re[z];Se[oe]=z});var qe=[];Object.keys(Ne).forEach(function(z){var oe=Ne[z];qe[oe]=z});var We=[];Object.keys(Ce).forEach(function(z){var oe=Ce[z];We[oe]=z});var mt=ue.reduce(function(z,oe){var re=Ae[oe];return re===$l||re===am||re===$l||re===Hd||re===cm||re===Xd||A.ext_srgb&&(re===dm||re===um)?z[re]=re:re===lm||oe.indexOf("rgba")>=0?z[re]=Po:z[re]=Ud,z},{});function be(){this.internalformat=Po,this.format=Po,this.type=Oa,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=H_,this.width=0,this.height=0,this.channels=0}function _e(z,oe){z.internalformat=oe.internalformat,z.format=oe.format,z.type=oe.type,z.compressed=oe.compressed,z.premultiplyAlpha=oe.premultiplyAlpha,z.flipY=oe.flipY,z.unpackAlignment=oe.unpackAlignment,z.colorSpace=oe.colorSpace,z.width=oe.width,z.height=oe.height,z.channels=oe.channels}function it(z,oe){if(!(typeof oe!="object"||!oe)){if("premultiplyAlpha"in oe&&(P.type(oe.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),z.premultiplyAlpha=oe.premultiplyAlpha),"flipY"in oe&&(P.type(oe.flipY,"boolean","invalid texture flip"),z.flipY=oe.flipY),"alignment"in oe&&(P.oneOf(oe.alignment,[1,2,4,8],"invalid texture unpack alignment"),z.unpackAlignment=oe.alignment),"colorSpace"in oe&&(P.parameter(oe.colorSpace,Fe,"invalid colorSpace"),z.colorSpace=Fe[oe.colorSpace]),"type"in oe){var re=oe.type;P(A.oes_texture_float||!(re==="float"||re==="float32"),"you must enable the OES_texture_float extension in order to use floating point textures."),P(A.oes_texture_half_float||!(re==="half float"||re==="float16"),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),P(A.webgl_depth_texture||!(re==="uint16"||re==="uint32"||re==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),P.parameter(re,Ge,"invalid texture type"),z.type=Ge[re]}var tt=z.width,Mt=z.height,R=z.channels,C=!1;"shape"in oe?(P(Array.isArray(oe.shape)&&oe.shape.length>=2,"shape must be an array"),tt=oe.shape[0],Mt=oe.shape[1],oe.shape.length===3&&(R=oe.shape[2],P(R>0&&R<=4,"invalid number of channels"),C=!0),P(tt>=0&&tt<=j.maxTextureSize,"invalid width"),P(Mt>=0&&Mt<=j.maxTextureSize,"invalid height")):("radius"in oe&&(tt=Mt=oe.radius,P(tt>=0&&tt<=j.maxTextureSize,"invalid radius")),"width"in oe&&(tt=oe.width,P(tt>=0&&tt<=j.maxTextureSize,"invalid width")),"height"in oe&&(Mt=oe.height,P(Mt>=0&&Mt<=j.maxTextureSize,"invalid height")),"channels"in oe&&(R=oe.channels,P(R>0&&R<=4,"invalid number of channels"),C=!0)),z.width=tt|0,z.height=Mt|0,z.channels=R|0;var G=!1;if("format"in oe){var K=oe.format;P(A.webgl_depth_texture||!(K==="depth"||K==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),P.parameter(K,Ae,"invalid texture format");var $=z.internalformat=Ae[K];z.format=mt[$],K in Ge&&("type"in oe||(z.type=Ge[K])),K in De&&(z.compressed=!0),G=!0}!C&&G?z.channels=un[z.format]:C&&!G?z.channels!==Yd[z.format]&&(z.format=z.internalformat=Yd[z.channels]):G&&C&&P(z.channels===un[z.format],"number of channels inconsistent with specified format")}}function Ve(z){y.pixelStorei(n3,z.flipY),y.pixelStorei(s3,z.premultiplyAlpha),y.pixelStorei(o3,z.colorSpace),y.pixelStorei(r3,z.unpackAlignment)}function Ie(){be.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ue(z,oe){var re=null;if(wm(oe)?re=oe:oe&&(P.type(oe,"object","invalid pixel data type"),it(z,oe),"x"in oe&&(z.xOffset=oe.x|0),"y"in oe&&(z.yOffset=oe.y|0),wm(oe.data)&&(re=oe.data)),P(!z.compressed||re instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),oe.copy){P(!re,"can not specify copy and data field for the same texture");var tt=ye.viewportWidth,Mt=ye.viewportHeight;z.width=z.width||tt-z.xOffset,z.height=z.height||Mt-z.yOffset,z.needsCopy=!0,P(z.xOffset>=0&&z.xOffset=0&&z.yOffset0&&z.width<=tt&&z.height>0&&z.height<=Mt,"copy texture read out of bounds")}else if(!re)z.width=z.width||1,z.height=z.height||1,z.channels=z.channels||4;else if(t(re))z.channels=z.channels||4,z.data=re,!("type"in oe)&&z.type===Oa&&(z.type=ty(re));else if(J_(re))z.channels=z.channels||4,f3(z,re),z.alignment=1,z.needsFree=!0;else if(Tn(re)){var R=re.data;!Array.isArray(R)&&z.type===Oa&&(z.type=ty(R));var C=re.shape,G=re.stride,K,$,U,V,W,F;C.length===3?(U=C[2],F=G[2]):(P(C.length===2,"invalid ndarray pixel data, must be 2 or 3D"),U=1,F=1),K=C[0],$=C[1],V=G[0],W=G[1],z.alignment=1,z.width=K,z.height=$,z.channels=U,z.format=z.internalformat=Yd[U],z.needsFree=!0,m3(z,R,V,W,F,re.offset)}else if($_(re)||ey(re)||c3(re))$_(re)||ey(re)?z.element=re:z.element=re.canvas,z.width=z.element.width,z.height=z.element.height,z.channels=4;else if(d3(re))z.element=re,z.width=re.width,z.height=re.height,z.channels=4;else if(u3(re))z.element=re,z.width=re.naturalWidth,z.height=re.naturalHeight,z.channels=4;else if(h3(re))z.element=re,z.width=re.videoWidth,z.height=re.videoHeight,z.channels=4;else if(Q_(re)){var B=z.width||re[0].length,N=z.height||re.length,ie=z.channels;ki(re[0][0])?ie=ie||re[0][0].length:ie=ie||1;for(var ee=Bd.shape(re),ge=1,xe=0;xe=0,"oes_texture_float extension not enabled"):z.type===Aa&&P(j.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function Xe(z,oe,re){var tt=z.element,Mt=z.data,R=z.internalformat,C=z.format,G=z.type,K=z.width,$=z.height;Ve(z),tt?y.texImage2D(oe,re,C,C,G,tt):z.compressed?y.compressedTexImage2D(oe,re,R,K,$,0,Mt):z.needsCopy?(se(),y.copyTexImage2D(oe,re,C,z.xOffset,z.yOffset,K,$,0)):y.texImage2D(oe,re,C,K,$,0,C,G,Mt||null)}function kt(z,oe,re,tt,Mt){var R=z.element,C=z.data,G=z.internalformat,K=z.format,$=z.type,U=z.width,V=z.height;Ve(z),R?y.texSubImage2D(oe,Mt,re,tt,K,$,R):z.compressed?y.compressedTexSubImage2D(oe,Mt,re,tt,G,U,V,C):z.needsCopy?(se(),y.copyTexSubImage2D(oe,Mt,re,tt,z.xOffset,z.yOffset,U,V)):y.texSubImage2D(oe,Mt,re,tt,U,V,K,$,C)}var Ct=[];function Ye(){return Ct.pop()||new Ie}function Ke(z){z.needsFree&&Ii.freeType(z.data),Ie.call(z),Ct.push(z)}function wt(){be.call(this),this.genMipmaps=!1,this.mipmapHint=Wd,this.mipmask=0,this.images=Array(16)}function Et(z,oe,re){var tt=z.images[0]=Ye();z.mipmask=1,tt.width=z.width=oe,tt.height=z.height=re,tt.channels=z.channels=4}function Rt(z,oe){var re=null;if(wm(oe))re=z.images[0]=Ye(),_e(re,z),Ue(re,oe),z.mipmask=1;else if(it(z,oe),Array.isArray(oe.mipmap))for(var tt=oe.mipmap,Mt=0;Mt>=Mt,re.height>>=Mt,Ue(re,tt[Mt]),z.mipmask|=1<=0&&!("faces"in oe)&&(z.genMipmaps=!0)}if("mag"in oe){var tt=oe.mag;P.parameter(tt,Re),z.magFilter=Re[tt]}var Mt=z.wrapS,R=z.wrapT;if("wrap"in oe){var C=oe.wrap;typeof C=="string"?(P.parameter(C,Ce),Mt=R=Ce[C]):Array.isArray(C)&&(P.parameter(C[0],Ce),P.parameter(C[1],Ce),Mt=Ce[C[0]],R=Ce[C[1]])}else{if("wrapS"in oe){var G=oe.wrapS;P.parameter(G,Ce),Mt=Ce[G]}if("wrapT"in oe){var K=oe.wrapT;P.parameter(K,Ce),R=Ce[K]}}if(z.wrapS=Mt,z.wrapT=R,"anisotropic"in oe){var $=oe.anisotropic;P(typeof $=="number"&&$>=1&&$<=j.maxAnisotropic,"aniso samples must be between 1 and "),z.anisotropic=oe.anisotropic}if("mipmap"in oe){var U=!1;switch(typeof oe.mipmap){case"string":P.parameter(oe.mipmap,Ee,"invalid mipmap hint"),z.mipmapHint=Ee[oe.mipmap],z.genMipmaps=!0,U=!0;break;case"boolean":U=z.genMipmaps=oe.mipmap;break;case"object":P(Array.isArray(oe.mipmap),"invalid mipmap type"),z.genMipmaps=!1,U=!0;break;default:P.raise("invalid mipmap type")}U&&!("min"in oe)&&(z.minFilter=bm)}}function qi(z,oe){y.texParameteri(oe,JE,z.minFilter),y.texParameteri(oe,KE,z.magFilter),y.texParameteri(oe,WE,z.wrapS),y.texParameteri(oe,YE,z.wrapT),A.ext_texture_filter_anisotropic&&y.texParameteri(oe,i3,z.anisotropic),z.genMipmaps&&(y.hint($E,z.mipmapHint),y.generateMipmap(oe))}var Zi=0,hr={},vr=j.maxTextureUnits,Fi=Array(vr).map(function(){return null});function Lt(z){be.call(this),this.mipmask=0,this.internalformat=Po,this.id=Zi++,this.refCount=1,this.target=z,this.texture=y.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new xi,he.profile&&(this.stats={size:0})}function _r(z){y.activeTexture(tc),y.bindTexture(z.target,z.texture)}function Qt(){var z=Fi[0];z?y.bindTexture(z.target,z.texture):y.bindTexture(Un,null)}function xt(z){var oe=z.texture;P(oe,"must not double destroy texture");var re=z.unit,tt=z.target;re>=0&&(y.activeTexture(tc+re),y.bindTexture(tt,null),Fi[re]=null),y.deleteTexture(oe),z.texture=null,z.params=null,z.pixels=null,z.refCount=0,delete hr[z.id],ne.textureCount--}i(Lt.prototype,{bind:function(){var z=this;z.bindCount+=1;var oe=z.unit;if(oe<0){for(var re=0;re0)continue;tt.unit=-1}Fi[re]=z,oe=re;break}oe>=vr&&P.raise("insufficient number of texture units"),he.profile&&ne.maxTextureUnits>W)-U,F.height=F.height||(re.height>>W)-V,P(re.type===F.type&&re.format===F.format&&re.internalformat===F.internalformat,"incompatible format for texture.subimage"),P(U>=0&&V>=0&&U+F.width<=re.width&&V+F.height<=re.height,"texture.subimage write out of bounds"),P(re.mipmask&1<>U;++U){var V=K>>U,W=$>>U;if(!V||!W)break;y.texImage2D(Un,U,re.format,V,W,0,re.format,re.type,null)}return Qt(),he.profile&&(re.stats.size=qd(re.internalformat,re.type,K,$,!1,!1)),tt}return tt(z,oe),tt.subimage=Mt,tt.resize=R,tt._reglType="texture2d",tt._texture=re,he.profile&&(tt.stats=re.stats),tt.destroy=function(){re.decRef()},tt}function Wt(z,oe,re,tt,Mt,R){var C=new Lt(om);hr[C.id]=C,ne.cubeCount++;var G=new Array(6);function K(V,W,F,B,N,ie){var ee,ge=C.texInfo;for(xi.call(ge),ee=0;ee<6;++ee)G[ee]=zt();if(typeof V=="number"||!V){var xe=V|0||1;for(ee=0;ee<6;++ee)Et(G[ee],xe,xe)}else if(typeof V=="object")if(W)Rt(G[0],V),Rt(G[1],W),Rt(G[2],F),Rt(G[3],B),Rt(G[4],N),Rt(G[5],ie);else if(Vi(ge,V),it(C,V),"faces"in V){var Be=V.faces;for(P(Array.isArray(Be)&&Be.length===6,"cube faces must be a length 6 array"),ee=0;ee<6;++ee)P(typeof Be[ee]=="object"&&!!Be[ee],"invalid input for cube map face"),_e(G[ee],C),Rt(G[ee],Be[ee])}else for(ee=0;ee<6;++ee)Rt(G[ee],V);else P.raise("invalid arguments to cube map");for(_e(C,G[0]),P.optional(function(){j.npotTextureCube||P(L_(C.width)&&L_(C.height),"your browser does not support non power or two texture dimensions")}),ge.genMipmaps?C.mipmask=(G[0].width<<1)-1:C.mipmask=G[0].mipmask,P.textureCube(C,ge,G,j),C.internalformat=G[0].internalformat,K.width=G[0].width,K.height=G[0].height,_r(C),ee=0;ee<6;++ee)Ei(G[ee],Vd+ee);for(qi(ge,om),Qt(),he.profile&&(C.stats.size=qd(C.internalformat,C.type,K.width,K.height,ge.genMipmaps,!0)),K.format=Pe[C.internalformat],K.type=Je[C.type],K.mag=Se[ge.magFilter],K.min=qe[ge.minFilter],K.wrapS=We[ge.wrapS],K.wrapT=We[ge.wrapT],ee=0;ee<6;++ee)Yi(G[ee]);return K}function $(V,W,F,B,N){P(!!W,"must specify image data"),P(typeof V=="number"&&V===(V|0)&&V>=0&&V<6,"invalid face");var ie=F|0,ee=B|0,ge=N|0,xe=Ye();return _e(xe,C),xe.width=0,xe.height=0,Ue(xe,W),xe.width=xe.width||(C.width>>ge)-ie,xe.height=xe.height||(C.height>>ge)-ee,P(C.type===xe.type&&C.format===xe.format&&C.internalformat===xe.internalformat,"incompatible format for texture.subimage"),P(ie>=0&&ee>=0&&ie+xe.width<=C.width&&ee+xe.height<=C.height,"texture.subimage write out of bounds"),P(C.mipmask&1<>B;++B)y.texImage2D(Vd+F,B,C.format,W>>B,W>>B,0,C.format,C.type,null);return Qt(),he.profile&&(C.stats.size=qd(C.internalformat,C.type,K.width,K.height,!1,!0)),K}}return K(z,oe,re,tt,Mt,R),K.subimage=$,K.resize=U,K._reglType="textureCube",K._texture=C,he.profile&&(K.stats=C.stats),K.destroy=function(){C.decRef()},K}function Ni(){for(var z=0;z>tt,re.height>>tt,0,re.internalformat,re.type,null);else for(var Mt=0;Mt<6;++Mt)y.texImage2D(Vd+Mt,tt,re.internalformat,re.width>>tt,re.height>>tt,0,re.internalformat,re.type,null);qi(re.texInfo,re.target)})}function jo(){for(var z=0;z=2,"invalid renderbuffer shape"),qe=_e[0]|0,We=_e[1]|0}else"radius"in be&&(qe=We=be.radius|0),"width"in be&&(qe=be.width|0),"height"in be&&(We=be.height|0);"format"in be&&(P.parameter(be.format,ne,"invalid renderbuffer format"),mt=ne[be.format])}else typeof Je=="number"?(qe=Je|0,typeof Se=="number"?We=Se|0:We=qe):Je?P.raise("invalid arguments to renderbuffer constructor"):qe=We=1;if(P(qe>0&&We>0&&qe<=j.maxRenderbufferSize&&We<=j.maxRenderbufferSize,"invalid renderbuffer size"),!(qe===Q.width&&We===Q.height&&mt===Q.format))return ue.width=Q.width=qe,ue.height=Q.height=We,Q.format=mt,y.bindRenderbuffer(Ys,Q.renderbuffer),y.renderbufferStorage(Ys,mt,qe,We),P(y.getError()===0,"invalid render buffer format"),ye.profile&&(Q.stats.size=fy(Q.format,Q.width,Q.height)),ue.format=he[Q.format],ue}function Pe(Je,Se){var qe=Je|0,We=Se|0||qe;return qe===Q.width&&We===Q.height||(P(qe>0&&We>0&&qe<=j.maxRenderbufferSize&&We<=j.maxRenderbufferSize,"invalid renderbuffer size"),ue.width=Q.width=qe,ue.height=Q.height=We,y.bindRenderbuffer(Ys,Q.renderbuffer),y.renderbufferStorage(Ys,Q.format,qe,We),P(y.getError()===0,"invalid render buffer format"),ye.profile&&(Q.stats.size=fy(Q.format,Q.width,Q.height))),ue}return ue(Ae,De),ue.resize=Pe,ue._reglType="renderbuffer",ue._renderbuffer=Q,ye.profile&&(ue.stats=Q.stats),ue.destroy=function(){Q.decRef()},ue}ye.profile&&(se.getTotalRenderbufferSize=function(){var Ae=0;return Object.keys(Ce).forEach(function(De){Ae+=Ce[De].stats.size}),Ae});function Ge(){rn(Ce).forEach(function(Ae){Ae.renderbuffer=y.createRenderbuffer(),y.bindRenderbuffer(Ys,Ae.renderbuffer),y.renderbufferStorage(Ys,Ae.format,Ae.width,Ae.height)}),y.bindRenderbuffer(Ys,null)}return{create:Fe,clear:function(){rn(Ce).forEach(Ne)},restore:Ge}},ps=36160,Sm=36161,Mo=3553,Kd=34069,my=36064,py=36096,gy=36128,vy=33306,_y=36053,v3=36054,_3=36055,y3=36057,b3=36061,x3=36193,w3=5121,S3=5126,yy=6407,by=6408,T3=6402,C3=[yy,by],Tm=[];Tm[by]=4,Tm[yy]=3;var Jd=[];Jd[w3]=1,Jd[S3]=4,Jd[x3]=2;var k3=32854,E3=32855,A3=36194,O3=33189,I3=36168,xy=34041,L3=35907,P3=34836,D3=34842,M3=34843,R3=[k3,E3,A3,L3,D3,M3,P3],Pa={};Pa[_y]="complete",Pa[v3]="incomplete attachment",Pa[y3]="incomplete dimensions",Pa[_3]="incomplete, missing attachment",Pa[b3]="unsupported";function F3(y,A,j,se,ye,ne){var he={cur:null,next:null,dirty:!1,setFBO:null},Ee=["rgba"],Ce=["rgba4","rgb565","rgb5 a1"];A.ext_srgb&&Ce.push("srgba"),A.ext_color_buffer_half_float&&Ce.push("rgba16f","rgb16f"),A.webgl_color_buffer_float&&Ce.push("rgba32f");var Re=["uint8"];A.oes_texture_half_float&&Re.push("half float","float16"),A.oes_texture_float&&Re.push("float","float32");function Ne(Ie,Ue,Xe){this.target=Ie,this.texture=Ue,this.renderbuffer=Xe;var kt=0,Ct=0;Ue?(kt=Ue.width,Ct=Ue.height):Xe&&(kt=Xe.width,Ct=Xe.height),this.width=kt,this.height=Ct}function Fe(Ie){Ie&&(Ie.texture&&Ie.texture._texture.decRef(),Ie.renderbuffer&&Ie.renderbuffer._renderbuffer.decRef())}function Ge(Ie,Ue,Xe){if(Ie)if(Ie.texture){var kt=Ie.texture._texture,Ct=Math.max(1,kt.width),Ye=Math.max(1,kt.height);P(Ct===Ue&&Ye===Xe,"inconsistent width/height for supplied texture"),kt.refCount+=1}else{var Ke=Ie.renderbuffer._renderbuffer;P(Ke.width===Ue&&Ke.height===Xe,"inconsistent width/height for renderbuffer"),Ke.refCount+=1}}function Ae(Ie,Ue){Ue&&(Ue.texture?y.framebufferTexture2D(ps,Ie,Ue.target,Ue.texture._texture.texture,0):y.framebufferRenderbuffer(ps,Ie,Sm,Ue.renderbuffer._renderbuffer.renderbuffer))}function De(Ie){var Ue=Mo,Xe=null,kt=null,Ct=Ie;typeof Ie=="object"&&(Ct=Ie.data,"target"in Ie&&(Ue=Ie.target|0)),P.type(Ct,"function","invalid attachment data");var Ye=Ct._reglType;return Ye==="texture2d"?(Xe=Ct,P(Ue===Mo)):Ye==="textureCube"?(Xe=Ct,P(Ue>=Kd&&Ue=2,"invalid shape for framebuffer"),Et=_r[0],Rt=_r[1]}else"radius"in Lt&&(Et=Rt=Lt.radius),"width"in Lt&&(Et=Lt.width),"height"in Lt&&(Rt=Lt.height);("color"in Lt||"colors"in Lt)&&(zt=Lt.color||Lt.colors,Array.isArray(zt)&&P(zt.length===1||A.webgl_draw_buffers,"multiple render targets not supported")),zt||("colorCount"in Lt&&(qi=Lt.colorCount|0,P(qi>0,"invalid color buffer count")),"colorTexture"in Lt&&(Yi=!!Lt.colorTexture,xi="rgba4"),"colorType"in Lt&&(Vi=Lt.colorType,Yi?(P(A.oes_texture_float||!(Vi==="float"||Vi==="float32"),"you must enable OES_texture_float in order to use floating point framebuffer objects"),P(A.oes_texture_half_float||!(Vi==="half float"||Vi==="float16"),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):Vi==="half float"||Vi==="float16"?(P(A.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),xi="rgba16f"):(Vi==="float"||Vi==="float32")&&(P(A.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),xi="rgba32f"),P.oneOf(Vi,Re,"invalid color type")),"colorFormat"in Lt&&(xi=Lt.colorFormat,Ee.indexOf(xi)>=0?Yi=!0:Ce.indexOf(xi)>=0?Yi=!1:P.optional(function(){Yi?P.oneOf(Lt.colorFormat,Ee,"invalid color format for texture"):P.oneOf(Lt.colorFormat,Ce,"invalid color format for renderbuffer")}))),("depthTexture"in Lt||"depthStencilTexture"in Lt)&&(Fi=!!(Lt.depthTexture||Lt.depthStencilTexture),P(!Fi||A.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in Lt&&(typeof Lt.depth=="boolean"?Ei=Lt.depth:(Zi=Lt.depth,Li=!1)),"stencil"in Lt&&(typeof Lt.stencil=="boolean"?Li=Lt.stencil:(hr=Lt.stencil,Ei=!1)),"depthStencil"in Lt&&(typeof Lt.depthStencil=="boolean"?Ei=Li=Lt.depthStencil:(vr=Lt.depthStencil,Ei=!1,Li=!1))}var Qt=null,xt=null,Ft=null,Wt=null;if(Array.isArray(zt))Qt=zt.map(De);else if(zt)Qt=[De(zt)];else for(Qt=new Array(qi),wt=0;wt=0||Qt[wt].renderbuffer&&R3.indexOf(Qt[wt].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+wt+" is invalid"),Qt[wt]&&Qt[wt].texture){var Xn=Tm[Qt[wt].texture._texture.format]*Jd[Qt[wt].texture._texture.type];Ni===null?Ni=Xn:P(Ni===Xn,"all color attachments much have the same number of bits per pixel.")}return Ge(xt,Et,Rt),P(!xt||xt.texture&&xt.texture._texture.format===T3||xt.renderbuffer&&xt.renderbuffer._renderbuffer.format===O3,"invalid depth attachment for framebuffer object"),Ge(Ft,Et,Rt),P(!Ft||Ft.renderbuffer&&Ft.renderbuffer._renderbuffer.format===I3,"invalid stencil attachment for framebuffer object"),Ge(Wt,Et,Rt),P(!Wt||Wt.texture&&Wt.texture._texture.format===xy||Wt.renderbuffer&&Wt.renderbuffer._renderbuffer.format===xy,"invalid depth-stencil attachment for framebuffer object"),We(Xe),Xe.width=Et,Xe.height=Rt,Xe.colorAttachments=Qt,Xe.depthAttachment=xt,Xe.stencilAttachment=Ft,Xe.depthStencilAttachment=Wt,kt.color=Qt.map(ue),kt.depth=ue(xt),kt.stencil=ue(Ft),kt.depthStencil=ue(Wt),kt.width=Xe.width,kt.height=Xe.height,be(Xe),kt}function Ct(Ye,Ke){P(he.next!==Xe,"can not resize a framebuffer which is currently in use");var wt=Math.max(Ye|0,1),Et=Math.max(Ke|0||wt,1);if(wt===Xe.width&&Et===Xe.height)return kt;for(var Rt=Xe.colorAttachments,Ei=0;Ei=2,"invalid shape for framebuffer"),P(Yi[0]===Yi[1],"cube framebuffer must be square"),wt=Yi[0]}else"radius"in zt&&(wt=zt.radius|0),"width"in zt?(wt=zt.width|0,"height"in zt&&P(zt.height===wt,"must be square")):"height"in zt&&(wt=zt.height|0);("color"in zt||"colors"in zt)&&(Et=zt.color||zt.colors,Array.isArray(Et)&&P(Et.length===1||A.webgl_draw_buffers,"multiple render targets not supported")),Et||("colorCount"in zt&&(Li=zt.colorCount|0,P(Li>0,"invalid color buffer count")),"colorType"in zt&&(P.oneOf(zt.colorType,Re,"invalid color type"),Ei=zt.colorType),"colorFormat"in zt&&(Rt=zt.colorFormat,P.oneOf(zt.colorFormat,Ee,"invalid color format for texture"))),"depth"in zt&&(Ke.depth=zt.depth),"stencil"in zt&&(Ke.stencil=zt.stencil),"depthStencil"in zt&&(Ke.depthStencil=zt.depthStencil)}var xi;if(Et)if(Array.isArray(Et))for(xi=[],Ye=0;Ye0&&(Ke.depth=Ue[0].depth,Ke.stencil=Ue[0].stencil,Ke.depthStencil=Ue[0].depthStencil),Ue[Ye]?Ue[Ye](Ke):Ue[Ye]=_e(Ke)}return i(Xe,{width:wt,height:wt,color:xi})}function kt(Ct){var Ye,Ke=Ct|0;if(P(Ke>0&&Ke<=j.maxCubeMapSize,"invalid radius for cube fbo"),Ke===Xe.width)return Xe;var wt=Xe.color;for(Ye=0;Ye{for(var Ei=Object.keys(Ve),Li=0;Li=0,'invalid option for vao: "'+Ei[Li]+'" valid options are '+Sy)}),P(Array.isArray(Ie),"attributes must be an array")}P(Ie.length0,"must specify at least one attribute");var Xe={},kt=_e.attributes;kt.length=Ie.length;for(var Ct=0;Ct=wt.byteLength?Et.subdata(wt):(Et.destroy(),_e.buffers[Ct]=null)),_e.buffers[Ct]||(Et=_e.buffers[Ct]=ye.create(Ye,wy,!1,!0)),Ke.buffer=ye.getBuffer(Et),Ke.size=Ke.buffer.dimension|0,Ke.normalized=!1,Ke.type=Ke.buffer.dtype,Ke.offset=0,Ke.stride=0,Ke.divisor=0,Ke.state=1,Xe[Ct]=1}else ye.getBuffer(Ye)?(Ke.buffer=ye.getBuffer(Ye),Ke.size=Ke.buffer.dimension|0,Ke.normalized=!1,Ke.type=Ke.buffer.dtype,Ke.offset=0,Ke.stride=0,Ke.divisor=0,Ke.state=1):ye.getBuffer(Ye.buffer)?(Ke.buffer=ye.getBuffer(Ye.buffer),Ke.size=(+Ye.size||Ke.buffer.dimension)|0,Ke.normalized=!!Ye.normalized||!1,"type"in Ye?(P.parameter(Ye.type,Io,"invalid buffer type"),Ke.type=Io[Ye.type]):Ke.type=Ke.buffer.dtype,Ke.offset=(Ye.offset||0)|0,Ke.stride=(Ye.stride||0)|0,Ke.divisor=(Ye.divisor||0)|0,Ke.state=1,P(Ke.size>=1&&Ke.size<=4,"size must be between 1 and 4"),P(Ke.offset>=0,"invalid offset"),P(Ke.stride>=0&&Ke.stride<=255,"stride must be between 0 and 255"),P(Ke.divisor>=0,"divisor must be positive"),P(!Ke.divisor||!!A.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in Ye?(P(Ct>0,"first attribute must not be a constant"),Ke.x=+Ye.x||0,Ke.y=+Ye.y||0,Ke.z=+Ye.z||0,Ke.w=+Ye.w||0,Ke.state=2):P(!1,"invalid attribute spec for location "+Ct)}for(var Rt=0;Rt<_e.buffers.length;++Rt)!Xe[Rt]&&_e.buffers[Rt]&&(_e.buffers[Rt].destroy(),_e.buffers[Rt]=null);return _e.refresh(),it}return it.destroy=function(){for(var Ve=0;Ve<_e.buffers.length;++Ve)_e.buffers[Ve]&&_e.buffers[Ve].destroy();_e.buffers.length=0,_e.ownsElements&&(_e.elements.destroy(),_e.elements=null,_e.ownsElements=!1),_e.destroy()},it._vao=_e,it._reglType="vao",it(be)}return Ge}var Ty=35632,B3=35633,j3=35718,G3=35721;function V3(y,A,j,se){var ye={},ne={};function he(Q,ue,Pe,Je){this.name=Q,this.id=ue,this.location=Pe,this.info=Je}function Ee(Q,ue){for(var Pe=0;Pe1)for(var Ve=0;Ve1&&(Ue=Ue.replace("[0]","")),Ee(it,new he(Ue,A.id(Ue),y.getUniformLocation(mt,Ue),Se))}var Xe=y.getProgramParameter(mt,G3);se.profile&&(Q.stats.attributesCount=Xe);var kt=Q.attributes;for(Je=0;JeQ&&(Q=ue.stats.uniformsCount)}),Q},j.getMaxAttributesCount=function(){var Q=0;return Ne.forEach(function(ue){ue.stats.attributesCount>Q&&(Q=ue.stats.attributesCount)}),Q});function De(){ye={},ne={};for(var Q=0;Q=0,"missing vertex shader",Pe),P.command(ue>=0,"missing fragment shader",Pe);var Se=Re[ue];Se||(Se=Re[ue]={});var qe=Se[Q];if(qe&&(qe.refCount++,!Je))return qe;var We=new Ge(ue,Q);return j.shaderCount++,Ae(We,Pe,Je),qe||(Se[Q]=We),Ne.push(We),i(We,{destroy:function(){if(We.refCount--,We.refCount<=0){y.deleteProgram(We.program);var mt=Ne.indexOf(We);Ne.splice(mt,1),j.shaderCount--}Se[We.vertId].refCount<=0&&(y.deleteShader(ne[We.vertId]),delete ne[We.vertId],delete Re[We.fragId][We.vertId]),Object.keys(Re[We.fragId]).length||(y.deleteShader(ye[We.fragId]),delete ye[We.fragId],delete Re[We.fragId])}})},restore:De,shader:Ce,frag:-1,vert:-1}}var U3=6408,ic=5121,H3=3333,$d=5126;function X3(y,A,j,se,ye,ne,he){function Ee(Ne){var Fe;A.next===null?(P(ye.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),Fe=ic):(P(A.next.colorAttachments[0].texture!==null,"You cannot read from a renderbuffer"),Fe=A.next.colorAttachments[0].texture._texture.type,P.optional(function(){ne.oes_texture_float?(P(Fe===ic||Fe===$d,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),Fe===$d&&P(he.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):P(Fe===ic,"Reading from a framebuffer is only allowed for the type 'uint8'")}));var Ge=0,Ae=0,De=se.framebufferWidth,Q=se.framebufferHeight,ue=null;t(Ne)?ue=Ne:Ne&&(P.type(Ne,"object","invalid arguments to regl.read()"),Ge=Ne.x|0,Ae=Ne.y|0,P(Ge>=0&&Ge=0&&Ae0&&De+Ge<=se.framebufferWidth,"invalid width for read pixels"),P(Q>0&&Q+Ae<=se.framebufferHeight,"invalid height for read pixels"),j();var Pe=De*Q*4;return ue||(Fe===ic?ue=new Uint8Array(Pe):Fe===$d&&(ue=ue||new Float32Array(Pe))),P.isTypedArray(ue,"data buffer for regl.read() must be a typedarray"),P(ue.byteLength>=Pe,"data buffer for regl.read() too small"),y.pixelStorei(H3,4),y.readPixels(Ge,Ae,De,Q,U3,Fe,ue),ue}function Ce(Ne){var Fe;return A.setFBO({framebuffer:Ne.framebuffer},function(){Fe=Ee(Ne)}),Fe}function Re(Ne){return!Ne||!("framebuffer"in Ne)?Ee(Ne):Ce(Ne)}return Re}function Da(y){return Array.prototype.slice.call(y)}function Ma(y){return Da(y).join("")}function W3(){var y=0,A=[],j=[];function se(Fe){for(var Ge=0;Ge0&&(Fe.push(Q,"="),Fe.push.apply(Fe,Da(arguments)),Fe.push(";")),Q}return i(Ge,{def:De,toString:function(){return Ma([Ae.length>0?"var "+Ae.join(",")+";":"",Ma(Fe)])}})}function ne(){var Fe=ye(),Ge=ye(),Ae=Fe.toString,De=Ge.toString;function Q(ue,Pe){Ge(ue,Pe,"=",Fe.def(ue,Pe),";")}return i(function(){Fe.apply(Fe,Da(arguments))},{def:Fe.def,entry:Fe,exit:Ge,save:Q,set:function(ue,Pe,Je){Q(ue,Pe),Fe(ue,Pe,"=",Je,";")},toString:function(){return Ae()+De()}})}function he(){var Fe=Ma(arguments),Ge=ne(),Ae=ne(),De=Ge.toString,Q=Ae.toString;return i(Ge,{then:function(){return Ge.apply(Ge,Da(arguments)),this},else:function(){return Ae.apply(Ae,Da(arguments)),this},toString:function(){var ue=Q();return ue&&(ue="else{"+ue+"}"),Ma(["if(",Fe,"){",De(),"}",ue])}})}var Ee=ye(),Ce={};function Re(Fe,Ge){var Ae=[];function De(){var Se="a"+Ae.length;return Ae.push(Se),Se}Ge=Ge||0;for(var Q=0;Q":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Zs={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},$y={frag:K3,vert:J3},qm={cw:Yy,ccw:Ym};function fu(y){return Array.isArray(y)||t(y)||Tn(y)}function eb(y){return y.sort(function(A,j){return A===gs?-1:j===gs?1:A=1,se>=2,A)}else if(j===eu){var ye=y.data;return new nr(ye.thisDep,ye.contextDep,ye.propDep,A)}else{if(j===ky)return new nr(!1,!1,!1,A);if(j===Ey){for(var ne=!1,he=!1,Ee=!1,Ce=0;Ce=1&&(he=!0),Ne>=2&&(Ee=!0)}else Re.type===eu&&(ne=ne||Re.data.thisDep,he=he||Re.data.contextDep,Ee=Ee||Re.data.propDep)}return new nr(ne,he,Ee,A)}else return new nr(j===Im,j===Om,j===Am,A)}}var tb=new nr(!1,!1,!1,function(){});function fA(y,A,j,se,ye,ne,he,Ee,Ce,Re,Ne,Fe,Ge,Ae,De){var Q=Re.Record,ue={add:32774,subtract:32778,"reverse subtract":32779};j.ext_blend_minmax&&(ue.min=lA,ue.max=cA);var Pe=j.angle_instanced_arrays,Je=j.webgl_draw_buffers,Se=j.oes_vertex_array_object,qe={dirty:!0,profile:De.profile},We={},mt=[],be={},_e={};function it(R){return R.replace(".","_")}function Ve(R,C,G){var K=it(R);mt.push(R),We[K]=qe[K]=!!G,be[K]=C}function Ie(R,C,G){var K=it(R);mt.push(R),Array.isArray(G)?(qe[K]=G.slice(),We[K]=G.slice()):qe[K]=We[K]=G,_e[K]=C}Ve(Ay,tA),Ve(Oy,eA),Ie(Iy,"blendColor",[0,0,0,0]),Ie(Lm,"blendEquationSeparate",[Ky,Ky]),Ie(Pm,"blendFuncSeparate",[Zy,qy,Zy,qy]),Ve(Ly,rA,!0),Ie(Py,"depthFunc",uA),Ie(Dy,"depthRange",[0,1]),Ie(My,"depthMask",!0),Ie(Dm,Dm,[!0,!0,!0,!0]),Ve(Ry,$3),Ie(Fy,"cullFace",Bo),Ie(Mm,Mm,Ym),Ie(Rm,Rm,1),Ve(Ny,sA),Ie(Fm,"polygonOffset",[0,0]),Ve(zy,oA),Ve(By,aA),Ie(Nm,"sampleCoverage",[1,!1]),Ve(jy,iA),Ie(Gy,"stencilMask",-1),Ie(zm,"stencilFunc",[dA,0,-1]),Ie(Bm,"stencilOpSeparate",[fc,qs,qs,qs]),Ie(rc,"stencilOpSeparate",[Bo,qs,qs,qs]),Ve(Vy,nA),Ie(tu,"scissor",[0,0,y.drawingBufferWidth,y.drawingBufferHeight]),Ie(gs,gs,[0,0,y.drawingBufferWidth,y.drawingBufferHeight]);var Ue={gl:y,context:Ge,strings:A,next:We,current:qe,draw:Fe,elements:ne,buffer:ye,shader:Ne,attributes:Re.state,vao:Re,uniforms:Ce,framebuffer:Ee,extensions:j,timer:Ae,isBufferArgs:fu},Xe={primTypes:Ws,compareFuncs:ja,blendFuncs:Hn,blendEquations:ue,stencilOps:Zs,glTypes:Io,orientationType:qm};P.optional(function(){Ue.isArrayLike=ki}),Je&&(Xe.backBuffer=[Bo],Xe.drawBuffer=Ti(se.maxDrawbuffers,function(R){return R===0?[0]:Ti(R,function(C){return hA+C})}));var kt=0;function Ct(){var R=W3(),C=R.link,G=R.global;R.id=kt++,R.batchId="0";var K=C(Ue),$=R.shared={props:"a0"};Object.keys(Ue).forEach(function(B){$[B]=G.def(K,".",B)}),P.optional(function(){R.CHECK=C(P),R.commandStr=P.guessCommand(),R.command=C(R.commandStr),R.assert=function(B,N,ie){B("if(!(",N,"))",this.CHECK,".commandRaise(",C(ie),",",this.command,");")},Xe.invalidBlendCombinations=Qy});var U=R.next={},V=R.current={};Object.keys(_e).forEach(function(B){Array.isArray(qe[B])&&(U[B]=G.def($.next,".",B),V[B]=G.def($.current,".",B))});var W=R.constants={};Object.keys(Xe).forEach(function(B){W[B]=G.def(JSON.stringify(Xe[B]))}),R.invoke=function(B,N){switch(N.type){case Em:var ie=["this",$.context,$.props,R.batchId];return B.def(C(N.data),".call(",ie.slice(0,Math.max(N.data.length+1,4)),")");case Am:return B.def($.props,N.data);case Om:return B.def($.context,N.data);case Im:return B.def("this",N.data);case eu:return N.data.append(R,B),N.data.ref;case ky:return N.data.toString();case Ey:return N.data.map(function(ee){return R.invoke(B,ee)})}},R.attribCache={};var F={};return R.scopeAttrib=function(B){var N=A.id(B);if(N in F)return F[N];var ie=Re.scope[N];ie||(ie=Re.scope[N]=new Q);var ee=F[N]=C(ie);return ee},R}function Ye(R){var C=R.static,G=R.dynamic,K;if(nc in C){var $=!!C[nc];K=Gi(function(V,W){return $}),K.enable=$}else if(nc in G){var U=G[nc];K=Xr(U,function(V,W){return V.invoke(W,U)})}return K}function Ke(R,C){var G=R.static,K=R.dynamic;if(Ro in G){var $=G[Ro];return $?($=Ee.getFramebuffer($),P.command($,"invalid framebuffer object"),Gi(function(V,W){var F=V.link($),B=V.shared;W.set(B.framebuffer,".next",F);var N=B.context;return W.set(N,"."+Na,F+".width"),W.set(N,"."+za,F+".height"),F})):Gi(function(V,W){var F=V.shared;W.set(F.framebuffer,".next","null");var B=F.context;return W.set(B,"."+Na,B+"."+Hy),W.set(B,"."+za,B+"."+Xy),"null"})}else if(Ro in K){var U=K[Ro];return Xr(U,function(V,W){var F=V.invoke(W,U),B=V.shared,N=B.framebuffer,ie=W.def(N,".getFramebuffer(",F,")");P.optional(function(){V.assert(W,"!"+F+"||"+ie,"invalid framebuffer object")}),W.set(N,".next",ie);var ee=B.context;return W.set(ee,"."+Na,ie+"?"+ie+".width:"+ee+"."+Hy),W.set(ee,"."+za,ie+"?"+ie+".height:"+ee+"."+Xy),ie})}else return null}function wt(R,C,G){var K=R.static,$=R.dynamic;function U(F){if(F in K){var B=K[F];P.commandType(B,"object","invalid "+F,G.commandStr);var N=!0,ie=B.x|0,ee=B.y|0,ge,xe;return"width"in B?(ge=B.width|0,P.command(ge>=0,"invalid "+F,G.commandStr)):N=!1,"height"in B?(xe=B.height|0,P.command(xe>=0,"invalid "+F,G.commandStr)):N=!1,new nr(!N&&C&&C.thisDep,!N&&C&&C.contextDep,!N&&C&&C.propDep,function(ft,Qe){var we=ft.shared.context,me=ge;"width"in B||(me=Qe.def(we,".",Na,"-",ie));var ct=xe;return"height"in B||(ct=Qe.def(we,".",za,"-",ee)),[ie,ee,me,ct]})}else if(F in $){var Be=$[F],Tt=Xr(Be,function(ft,Qe){var we=ft.invoke(Qe,Be);P.optional(function(){ft.assert(Qe,we+"&&typeof "+we+'==="object"',"invalid "+F)});var me=ft.shared.context,ct=Qe.def(we,".x|0"),nt=Qe.def(we,".y|0"),St=Qe.def('"width" in ',we,"?",we,".width|0:","(",me,".",Na,"-",ct,")"),ti=Qe.def('"height" in ',we,"?",we,".height|0:","(",me,".",za,"-",nt,")");return P.optional(function(){ft.assert(Qe,St+">=0&&"+ti+">=0","invalid "+F)}),[ct,nt,St,ti]});return C&&(Tt.thisDep=Tt.thisDep||C.thisDep,Tt.contextDep=Tt.contextDep||C.contextDep,Tt.propDep=Tt.propDep||C.propDep),Tt}else return C?new nr(C.thisDep,C.contextDep,C.propDep,function(ft,Qe){var we=ft.shared.context;return[0,0,Qe.def(we,".",Na),Qe.def(we,".",za)]}):null}var V=U(gs);if(V){var W=V;V=new nr(V.thisDep,V.contextDep,V.propDep,function(F,B){var N=W.append(F,B),ie=F.shared.context;return B.set(ie,"."+Y3,N[2]),B.set(ie,"."+q3,N[3]),N})}return{viewport:V,scissor_box:U(tu)}}function Et(R,C){var G=R.static,K=typeof G[oc]=="string"&&typeof G[sc]=="string";if(K){if(Object.keys(C.dynamic).length>0)return null;var $=C.static,U=Object.keys($);if(U.length>0&&typeof $[U[0]]=="number"){for(var V=[],W=0;W=0,"invalid "+Qe,C.commandStr),Gi(function(nt,St){return we&&(nt.OFFSET=me),me})}else if(Qe in K){var ct=K[Qe];return Xr(ct,function(nt,St){var ti=nt.invoke(St,ct);return we&&(nt.OFFSET=ti,P.optional(function(){nt.assert(St,ti+">=0","invalid "+Qe)})),ti})}else if(we){if(F)return Gi(function(nt,St){return nt.OFFSET=0,0});if(U)return new nr(W.thisDep,W.contextDep,W.propDep,function(nt,St){return St.def(nt.shared.vao+".currentVAO?"+nt.shared.vao+".currentVAO.offset:0")})}else if(U)return new nr(W.thisDep,W.contextDep,W.propDep,function(nt,St){return St.def(nt.shared.vao+".currentVAO?"+nt.shared.vao+".currentVAO.instances:-1")});return null}var ge=ee(iu,!0);function xe(){if(zo in G){var Qe=G[zo]|0;return $.count=Qe,P.command(typeof Qe=="number"&&Qe>=0,"invalid vertex count",C.commandStr),Gi(function(){return Qe})}else if(zo in K){var we=K[zo];return Xr(we,function(St,ti){var yr=St.invoke(ti,we);return P.optional(function(){St.assert(ti,"typeof "+yr+'==="number"&&'+yr+">=0&&"+yr+"===("+yr+"|0)","invalid vertex count")}),yr})}else if(F)if(Ks(N)){if(N)return ge?new nr(ge.thisDep,ge.contextDep,ge.propDep,function(St,ti){var yr=ti.def(St.ELEMENTS,".vertCount-",St.OFFSET);return P.optional(function(){St.assert(ti,yr+">=0","invalid vertex offset/element buffer too small")}),yr}):Gi(function(St,ti){return ti.def(St.ELEMENTS,".vertCount")});var me=Gi(function(){return-1});return P.optional(function(){me.MISSING=!0}),me}else{var ct=new nr(N.thisDep||ge.thisDep,N.contextDep||ge.contextDep,N.propDep||ge.propDep,function(St,ti){var yr=St.ELEMENTS;return St.OFFSET?ti.def(yr,"?",yr,".vertCount-",St.OFFSET,":-1"):ti.def(yr,"?",yr,".vertCount:-1")});return P.optional(function(){ct.DYNAMIC=!0}),ct}else if(U){var nt=new nr(W.thisDep,W.contextDep,W.propDep,function(St,ti){return ti.def(St.shared.vao,".currentVAO?",St.shared.vao,".currentVAO.count:-1")});return nt}return null}var Be=ie(),Tt=xe(),ft=ee(ru,!1);return{elements:N,primitive:Be,count:Tt,instances:ft,offset:ge,vao:W,vaoActive:U,elementsActive:F,static:$}}function Li(R,C){var G=R.static,K=R.dynamic,$={};return mt.forEach(function(U){var V=it(U);function W(F,B){if(U in G){var N=F(G[U]);$[V]=Gi(function(){return N})}else if(U in K){var ie=K[U];$[V]=Xr(ie,function(ee,ge){return B(ee,ge,ee.invoke(ge,ie))})}}switch(U){case Ry:case Oy:case Ay:case jy:case Ly:case Vy:case Ny:case zy:case By:case My:return W(function(F){return P.commandType(F,"boolean",U,C.commandStr),F},function(F,B,N){return P.optional(function(){F.assert(B,"typeof "+N+'==="boolean"',"invalid flag "+U,F.commandStr)}),N});case Py:return W(function(F){return P.commandParameter(F,ja,"invalid "+U,C.commandStr),ja[F]},function(F,B,N){var ie=F.constants.compareFuncs;return P.optional(function(){F.assert(B,N+" in "+ie,"invalid "+U+", must be one of "+Object.keys(ja))}),B.def(ie,"[",N,"]")});case Dy:return W(function(F){return P.command(ki(F)&&F.length===2&&typeof F[0]=="number"&&typeof F[1]=="number"&&F[0]<=F[1],"depth range is 2d array",C.commandStr),F},function(F,B,N){P.optional(function(){F.assert(B,F.shared.isArrayLike+"("+N+")&&"+N+".length===2&&typeof "+N+'[0]==="number"&&typeof '+N+'[1]==="number"&&'+N+"[0]<="+N+"[1]","depth range must be a 2d array")});var ie=B.def("+",N,"[0]"),ee=B.def("+",N,"[1]");return[ie,ee]});case Pm:return W(function(F){P.commandType(F,"object","blend.func",C.commandStr);var B="srcRGB"in F?F.srcRGB:F.src,N="srcAlpha"in F?F.srcAlpha:F.src,ie="dstRGB"in F?F.dstRGB:F.dst,ee="dstAlpha"in F?F.dstAlpha:F.dst;return P.commandParameter(B,Hn,V+".srcRGB",C.commandStr),P.commandParameter(N,Hn,V+".srcAlpha",C.commandStr),P.commandParameter(ie,Hn,V+".dstRGB",C.commandStr),P.commandParameter(ee,Hn,V+".dstAlpha",C.commandStr),P.command(Qy.indexOf(B+", "+ie)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+B+", "+ie+")",C.commandStr),[Hn[B],Hn[ie],Hn[N],Hn[ee]]},function(F,B,N){var ie=F.constants.blendFuncs;P.optional(function(){F.assert(B,N+"&&typeof "+N+'==="object"',"invalid blend func, must be an object")});function ee(we,me){var ct=B.def('"',we,me,'" in ',N,"?",N,".",we,me,":",N,".",we);return P.optional(function(){F.assert(B,ct+" in "+ie,"invalid "+U+"."+we+me+", must be one of "+Object.keys(Hn))}),ct}var ge=ee("src","RGB"),xe=ee("dst","RGB");P.optional(function(){var we=F.constants.invalidBlendCombinations;F.assert(B,we+".indexOf("+ge+'+", "+'+xe+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var Be=B.def(ie,"[",ge,"]"),Tt=B.def(ie,"[",ee("src","Alpha"),"]"),ft=B.def(ie,"[",xe,"]"),Qe=B.def(ie,"[",ee("dst","Alpha"),"]");return[Be,ft,Tt,Qe]});case Lm:return W(function(F){if(typeof F=="string")return P.commandParameter(F,ue,"invalid "+U,C.commandStr),[ue[F],ue[F]];if(typeof F=="object")return P.commandParameter(F.rgb,ue,U+".rgb",C.commandStr),P.commandParameter(F.alpha,ue,U+".alpha",C.commandStr),[ue[F.rgb],ue[F.alpha]];P.commandRaise("invalid blend.equation",C.commandStr)},function(F,B,N){var ie=F.constants.blendEquations,ee=B.def(),ge=B.def(),xe=F.cond("typeof ",N,'==="string"');return P.optional(function(){function Be(Tt,ft,Qe){F.assert(Tt,Qe+" in "+ie,"invalid "+ft+", must be one of "+Object.keys(ue))}Be(xe.then,U,N),F.assert(xe.else,N+"&&typeof "+N+'==="object"',"invalid "+U),Be(xe.else,U+".rgb",N+".rgb"),Be(xe.else,U+".alpha",N+".alpha")}),xe.then(ee,"=",ge,"=",ie,"[",N,"];"),xe.else(ee,"=",ie,"[",N,".rgb];",ge,"=",ie,"[",N,".alpha];"),B(xe),[ee,ge]});case Iy:return W(function(F){return P.command(ki(F)&&F.length===4,"blend.color must be a 4d array",C.commandStr),Ti(4,function(B){return+F[B]})},function(F,B,N){return P.optional(function(){F.assert(B,F.shared.isArrayLike+"("+N+")&&"+N+".length===4","blend.color must be a 4d array")}),Ti(4,function(ie){return B.def("+",N,"[",ie,"]")})});case Gy:return W(function(F){return P.commandType(F,"number",V,C.commandStr),F|0},function(F,B,N){return P.optional(function(){F.assert(B,"typeof "+N+'==="number"',"invalid stencil.mask")}),B.def(N,"|0")});case zm:return W(function(F){P.commandType(F,"object",V,C.commandStr);var B=F.cmp||"keep",N=F.ref||0,ie="mask"in F?F.mask:-1;return P.commandParameter(B,ja,U+".cmp",C.commandStr),P.commandType(N,"number",U+".ref",C.commandStr),P.commandType(ie,"number",U+".mask",C.commandStr),[ja[B],N,ie]},function(F,B,N){var ie=F.constants.compareFuncs;P.optional(function(){function Be(){F.assert(B,Array.prototype.join.call(arguments,""),"invalid stencil.func")}Be(N+"&&typeof ",N,'==="object"'),Be('!("cmp" in ',N,")||(",N,".cmp in ",ie,")")});var ee=B.def('"cmp" in ',N,"?",ie,"[",N,".cmp]",":",qs),ge=B.def(N,".ref|0"),xe=B.def('"mask" in ',N,"?",N,".mask|0:-1");return[ee,ge,xe]});case Bm:case rc:return W(function(F){P.commandType(F,"object",V,C.commandStr);var B=F.fail||"keep",N=F.zfail||"keep",ie=F.zpass||"keep";return P.commandParameter(B,Zs,U+".fail",C.commandStr),P.commandParameter(N,Zs,U+".zfail",C.commandStr),P.commandParameter(ie,Zs,U+".zpass",C.commandStr),[U===rc?Bo:fc,Zs[B],Zs[N],Zs[ie]]},function(F,B,N){var ie=F.constants.stencilOps;P.optional(function(){F.assert(B,N+"&&typeof "+N+'==="object"',"invalid "+U)});function ee(ge){return P.optional(function(){F.assert(B,'!("'+ge+'" in '+N+")||("+N+"."+ge+" in "+ie+")","invalid "+U+"."+ge+", must be one of "+Object.keys(Zs))}),B.def('"',ge,'" in ',N,"?",ie,"[",N,".",ge,"]:",qs)}return[U===rc?Bo:fc,ee("fail"),ee("zfail"),ee("zpass")]});case Fm:return W(function(F){P.commandType(F,"object",V,C.commandStr);var B=F.factor|0,N=F.units|0;return P.commandType(B,"number",V+".factor",C.commandStr),P.commandType(N,"number",V+".units",C.commandStr),[B,N]},function(F,B,N){P.optional(function(){F.assert(B,N+"&&typeof "+N+'==="object"',"invalid "+U)});var ie=B.def(N,".factor|0"),ee=B.def(N,".units|0");return[ie,ee]});case Fy:return W(function(F){var B=0;return F==="front"?B=fc:F==="back"&&(B=Bo),P.command(!!B,V,C.commandStr),B},function(F,B,N){return P.optional(function(){F.assert(B,N+'==="front"||'+N+'==="back"',"invalid cull.face")}),B.def(N,'==="front"?',fc,":",Bo)});case Rm:return W(function(F){return P.command(typeof F=="number"&&F>=se.lineWidthDims[0]&&F<=se.lineWidthDims[1],"invalid line width, must be a positive number between "+se.lineWidthDims[0]+" and "+se.lineWidthDims[1],C.commandStr),F},function(F,B,N){return P.optional(function(){F.assert(B,"typeof "+N+'==="number"&&'+N+">="+se.lineWidthDims[0]+"&&"+N+"<="+se.lineWidthDims[1],"invalid line width")}),N});case Mm:return W(function(F){return P.commandParameter(F,qm,V,C.commandStr),qm[F]},function(F,B,N){return P.optional(function(){F.assert(B,N+'==="cw"||'+N+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),B.def(N+'==="cw"?'+Yy+":"+Ym)});case Dm:return W(function(F){return P.command(ki(F)&&F.length===4,"color.mask must be length 4 array",C.commandStr),F.map(function(B){return!!B})},function(F,B,N){return P.optional(function(){F.assert(B,F.shared.isArrayLike+"("+N+")&&"+N+".length===4","invalid color.mask")}),Ti(4,function(ie){return"!!"+N+"["+ie+"]"})});case Nm:return W(function(F){P.command(typeof F=="object"&&F,V,C.commandStr);var B="value"in F?F.value:1,N=!!F.invert;return P.command(typeof B=="number"&&B>=0&&B<=1,"sample.coverage.value must be a number between 0 and 1",C.commandStr),[B,N]},function(F,B,N){P.optional(function(){F.assert(B,N+"&&typeof "+N+'==="object"',"invalid sample.coverage")});var ie=B.def('"value" in ',N,"?+",N,".value:1"),ee=B.def("!!",N,".invert");return[ie,ee]})}}),$}function zt(R,C){var G=R.static,K=R.dynamic,$={};return Object.keys(G).forEach(function(U){var V=G[U],W;if(typeof V=="number"||typeof V=="boolean")W=Gi(function(){return V});else if(typeof V=="function"){var F=V._reglType;F==="texture2d"||F==="textureCube"?W=Gi(function(B){return B.link(V)}):F==="framebuffer"||F==="framebufferCube"?(P.command(V.color.length>0,'missing color attachment for framebuffer sent to uniform "'+U+'"',C.commandStr),W=Gi(function(B){return B.link(V.color[0])})):P.commandRaise('invalid data for uniform "'+U+'"',C.commandStr)}else ki(V)?W=Gi(function(B){var N=B.global.def("[",Ti(V.length,function(ie){return P.command(typeof V[ie]=="number"||typeof V[ie]=="boolean","invalid uniform "+U,B.commandStr),V[ie]}),"]");return N}):P.commandRaise('invalid or missing data for uniform "'+U+'"',C.commandStr);W.value=V,$[U]=W}),Object.keys(K).forEach(function(U){var V=K[U];$[U]=Xr(V,function(W,F){return W.invoke(F,V)})}),$}function Yi(R,C){var G=R.static,K=R.dynamic,$={};return Object.keys(G).forEach(function(U){var V=G[U],W=A.id(U),F=new Q;if(fu(V))F.state=Fa,F.buffer=ye.getBuffer(ye.create(V,Ba,!1,!0)),F.type=0;else{var B=ye.getBuffer(V);if(B)F.state=Fa,F.buffer=B,F.type=0;else if(P.command(typeof V=="object"&&V,"invalid data for attribute "+U,C.commandStr),"constant"in V){var N=V.constant;F.buffer="null",F.state=km,typeof N=="number"?F.x=N:(P.command(ki(N)&&N.length>0&&N.length<=4,"invalid constant for attribute "+U,C.commandStr),Ra.forEach(function(ft,Qe){Qe=0,'invalid offset for attribute "'+U+'"',C.commandStr);var ee=V.stride|0;P.command(ee>=0&&ee<256,'invalid stride for attribute "'+U+'", must be integer betweeen [0, 255]',C.commandStr);var ge=V.size|0;P.command(!("size"in V)||ge>0&&ge<=4,'invalid size for attribute "'+U+'", must be 1,2,3,4',C.commandStr);var xe=!!V.normalized,Be=0;"type"in V&&(P.commandParameter(V.type,Io,"invalid type for attribute "+U,C.commandStr),Be=Io[V.type]);var Tt=V.divisor|0;P.optional(function(){"divisor"in V&&(P.command(Tt===0||Pe,'cannot specify divisor for attribute "'+U+'", instancing not supported',C.commandStr),P.command(Tt>=0,'invalid divisor for attribute "'+U+'"',C.commandStr));var ft=C.commandStr,Qe=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(V).forEach(function(we){P.command(Qe.indexOf(we)>=0,'unknown parameter "'+we+'" for attribute pointer "'+U+'" (valid parameters are '+Qe+")",ft)})}),F.buffer=B,F.state=Fa,F.size=ge,F.normalized=xe,F.type=Be||B.dtype,F.offset=ie,F.stride=ee,F.divisor=Tt}}$[U]=Gi(function(ft,Qe){var we=ft.attribCache;if(W in we)return we[W];var me={isStream:!1};return Object.keys(F).forEach(function(ct){me[ct]=F[ct]}),F.buffer&&(me.buffer=ft.link(F.buffer),me.type=me.type||me.buffer+".dtype"),we[W]=me,me})}),Object.keys(K).forEach(function(U){var V=K[U];function W(F,B){var N=F.invoke(B,V),ie=F.shared,ee=F.constants,ge=ie.isBufferArgs,xe=ie.buffer;P.optional(function(){F.assert(B,N+"&&(typeof "+N+'==="object"||typeof '+N+'==="function")&&('+ge+"("+N+")||"+xe+".getBuffer("+N+")||"+xe+".getBuffer("+N+".buffer)||"+ge+"("+N+'.buffer)||("constant" in '+N+"&&(typeof "+N+'.constant==="number"||'+ie.isArrayLike+"("+N+".constant))))",'invalid dynamic attribute "'+U+'"')});var Be={isStream:B.def(!1)},Tt=new Q;Tt.state=Fa,Object.keys(Tt).forEach(function(me){Be[me]=B.def(""+Tt[me])});var ft=Be.buffer,Qe=Be.type;B("if(",ge,"(",N,")){",Be.isStream,"=true;",ft,"=",xe,".createStream(",Ba,",",N,");",Qe,"=",ft,".dtype;","}else{",ft,"=",xe,".getBuffer(",N,");","if(",ft,"){",Qe,"=",ft,".dtype;",'}else if("constant" in ',N,"){",Be.state,"=",km,";","if(typeof "+N+'.constant === "number"){',Be[Ra[0]],"=",N,".constant;",Ra.slice(1).map(function(me){return Be[me]}).join("="),"=0;","}else{",Ra.map(function(me,ct){return Be[me]+"="+N+".constant.length>"+ct+"?"+N+".constant["+ct+"]:0;"}).join(""),"}}else{","if(",ge,"(",N,".buffer)){",ft,"=",xe,".createStream(",Ba,",",N,".buffer);","}else{",ft,"=",xe,".getBuffer(",N,".buffer);","}",Qe,'="type" in ',N,"?",ee.glTypes,"[",N,".type]:",ft,".dtype;",Be.normalized,"=!!",N,".normalized;");function we(me){B(Be[me],"=",N,".",me,"|0;")}return we("size"),we("offset"),we("stride"),we("divisor"),B("}}"),B.exit("if(",Be.isStream,"){",xe,".destroyStream(",ft,");","}"),Be}$[U]=Xr(V,W)}),$}function xi(R){var C=R.static,G=R.dynamic,K={};return Object.keys(C).forEach(function($){var U=C[$];K[$]=Gi(function(V,W){return typeof U=="number"||typeof U=="boolean"?""+U:V.link(U)})}),Object.keys(G).forEach(function($){var U=G[$];K[$]=Xr(U,function(V,W){return V.invoke(W,U)})}),K}function Vi(R,C,G,K,$){var U=R.static,V=R.dynamic;P.optional(function(){var we=[Ro,sc,oc,Fo,No,iu,zo,ru,nc,ac].concat(mt);function me(ct){Object.keys(ct).forEach(function(nt){P.command(we.indexOf(nt)>=0,'unknown parameter "'+nt+'"',$.commandStr)})}me(U),me(V)});var W=Et(R,C),F=Ke(R),B=wt(R,F,$),N=Ei(R,$),ie=Li(R,$),ee=Rt(R,$,W);function ge(we){var me=B[we];me&&(ie[we]=me)}ge(gs),ge(it(tu));var xe=Object.keys(ie).length>0,Be={framebuffer:F,draw:N,shader:ee,state:ie,dirty:xe,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Be.profile=Ye(R),Be.uniforms=zt(G,$),Be.drawVAO=Be.scopeVAO=N.vao,!Be.drawVAO&&ee.program&&!W&&j.angle_instanced_arrays&&N.static.elements){var Tt=!0,ft=ee.program.attributes.map(function(we){var me=C.static[we];return Tt=Tt&&!!me,me});if(Tt&&ft.length>0){var Qe=Re.getVAO(Re.createVAO({attributes:ft,elements:N.static.elements}));Be.drawVAO=new nr(null,null,null,function(we,me){return we.link(Qe)}),Be.useVAO=!0}}return W?Be.useVAO=!0:Be.attributes=Yi(C,$),Be.context=xi(K),Be}function qi(R,C,G){var K=R.shared,$=K.context,U=R.scope();Object.keys(G).forEach(function(V){C.save($,"."+V);var W=G[V],F=W.append(R,C);Array.isArray(F)?U($,".",V,"=[",F.join(),"];"):U($,".",V,"=",F,";")}),C(U)}function Zi(R,C,G,K){var $=R.shared,U=$.gl,V=$.framebuffer,W;Je&&(W=C.def($.extensions,".webgl_draw_buffers"));var F=R.constants,B=F.drawBuffer,N=F.backBuffer,ie;G?ie=G.append(R,C):ie=C.def(V,".next"),K||C("if(",ie,"!==",V,".cur){"),C("if(",ie,"){",U,".bindFramebuffer(",Jy,",",ie,".framebuffer);"),Je&&C(W,".drawBuffersWEBGL(",B,"[",ie,".colorAttachments.length]);"),C("}else{",U,".bindFramebuffer(",Jy,",null);"),Je&&C(W,".drawBuffersWEBGL(",N,");"),C("}",V,".cur=",ie,";"),K||C("}")}function hr(R,C,G){var K=R.shared,$=K.gl,U=R.current,V=R.next,W=K.current,F=K.next,B=R.cond(W,".dirty");mt.forEach(function(N){var ie=it(N);if(!(ie in G.state)){var ee,ge;if(ie in V){ee=V[ie],ge=U[ie];var xe=Ti(qe[ie].length,function(Tt){return B.def(ee,"[",Tt,"]")});B(R.cond(xe.map(function(Tt,ft){return Tt+"!=="+ge+"["+ft+"]"}).join("||")).then($,".",_e[ie],"(",xe,");",xe.map(function(Tt,ft){return ge+"["+ft+"]="+Tt}).join(";"),";"))}else{ee=B.def(F,".",ie);var Be=R.cond(ee,"!==",W,".",ie);B(Be),ie in be?Be(R.cond(ee).then($,".enable(",be[ie],");").else($,".disable(",be[ie],");"),W,".",ie,"=",ee,";"):Be($,".",_e[ie],"(",ee,");",W,".",ie,"=",ee,";")}}}),Object.keys(G.state).length===0&&B(W,".dirty=false;"),C(B)}function vr(R,C,G,K){var $=R.shared,U=R.current,V=$.current,W=$.gl;eb(Object.keys(G)).forEach(function(F){var B=G[F];if(!(K&&!K(B))){var N=B.append(R,C);if(be[F]){var ie=be[F];Ks(B)?N?C(W,".enable(",ie,");"):C(W,".disable(",ie,");"):C(R.cond(N).then(W,".enable(",ie,");").else(W,".disable(",ie,");")),C(V,".",F,"=",N,";")}else if(ki(N)){var ee=U[F];C(W,".",_e[F],"(",N,");",N.map(function(ge,xe){return ee+"["+xe+"]="+ge}).join(";"),";")}else C(W,".",_e[F],"(",N,");",V,".",F,"=",N,";")}})}function Fi(R,C){Pe&&(R.instancing=C.def(R.shared.extensions,".angle_instanced_arrays"))}function Lt(R,C,G,K,$){var U=R.shared,V=R.stats,W=U.current,F=U.timer,B=G.profile;function N(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var ie,ee;function ge(we){ie=C.def(),we(ie,"=",N(),";"),typeof $=="string"?we(V,".count+=",$,";"):we(V,".count++;"),Ae&&(K?(ee=C.def(),we(ee,"=",F,".getNumPendingQueries();")):we(F,".beginQuery(",V,");"))}function xe(we){we(V,".cpuTime+=",N(),"-",ie,";"),Ae&&(K?we(F,".pushScopeStats(",ee,",",F,".getNumPendingQueries(),",V,");"):we(F,".endQuery();"))}function Be(we){var me=C.def(W,".profile");C(W,".profile=",we,";"),C.exit(W,".profile=",me,";")}var Tt;if(B){if(Ks(B)){B.enable?(ge(C),xe(C.exit),Be("true")):Be("false");return}Tt=B.append(R,C),Be(Tt)}else Tt=C.def(W,".profile");var ft=R.block();ge(ft),C("if(",Tt,"){",ft,"}");var Qe=R.block();xe(Qe),C.exit("if(",Tt,"){",Qe,"}")}function _r(R,C,G,K,$){var U=R.shared;function V(F){switch(F){case nu:case au:case du:return 2;case su:case lu:case uu:return 3;case ou:case cu:case hu:return 4;default:return 1}}function W(F,B,N){var ie=U.gl,ee=C.def(F,".location"),ge=C.def(U.attributes,"[",ee,"]"),xe=N.state,Be=N.buffer,Tt=[N.x,N.y,N.z,N.w],ft=["buffer","normalized","offset","stride"];function Qe(){C("if(!",ge,".buffer){",ie,".enableVertexAttribArray(",ee,");}");var me=N.type,ct;if(N.size?ct=C.def(N.size,"||",B):ct=B,C("if(",ge,".type!==",me,"||",ge,".size!==",ct,"||",ft.map(function(St){return ge+"."+St+"!=="+N[St]}).join("||"),"){",ie,".bindBuffer(",Ba,",",Be,".buffer);",ie,".vertexAttribPointer(",[ee,ct,me,N.normalized,N.stride,N.offset],");",ge,".type=",me,";",ge,".size=",ct,";",ft.map(function(St){return ge+"."+St+"="+N[St]+";"}).join(""),"}"),Pe){var nt=N.divisor;C("if(",ge,".divisor!==",nt,"){",R.instancing,".vertexAttribDivisorANGLE(",[ee,nt],");",ge,".divisor=",nt,";}")}}function we(){C("if(",ge,".buffer){",ie,".disableVertexAttribArray(",ee,");",ge,".buffer=null;","}if(",Ra.map(function(me,ct){return ge+"."+me+"!=="+Tt[ct]}).join("||"),"){",ie,".vertexAttrib4f(",ee,",",Tt,");",Ra.map(function(me,ct){return ge+"."+me+"="+Tt[ct]+";"}).join(""),"}")}xe===Fa?Qe():xe===km?we():(C("if(",xe,"===",Fa,"){"),Qe(),C("}else{"),we(),C("}"))}K.forEach(function(F){var B=F.name,N=G.attributes[B],ie;if(N){if(!$(N))return;ie=N.append(R,C)}else{if(!$(tb))return;var ee=R.scopeAttrib(B);P.optional(function(){R.assert(C,ee+".state","missing attribute "+B)}),ie={},Object.keys(new Q).forEach(function(ge){ie[ge]=C.def(ee,".",ge)})}W(R.link(F),V(F.info.type),ie)})}function Qt(R,C,G,K,$,U){for(var V=R.shared,W=V.gl,F={},B,N=0;N1){if(!Be)continue;var Tt=ee.replace("[0]","");if(F[Tt])continue;F[Tt]=1}var ft=R.link(ie),Qe=ft+".location",we;if(Be){if(!$(Be))continue;if(Ks(Be)){var me=Be.value;if(P.command(me!==null&&typeof me!="undefined",'missing uniform "'+ee+'"',R.commandStr),ge===uc||ge===hc){P.command(typeof me=="function"&&(ge===uc&&(me._reglType==="texture2d"||me._reglType==="framebuffer")||ge===hc&&(me._reglType==="textureCube"||me._reglType==="framebufferCube")),"invalid texture for uniform "+ee,R.commandStr);var ct=R.link(me._texture||me.color[0]._texture);C(W,".uniform1i(",Qe,",",ct+".bind());"),C.exit(ct,".unbind();")}else if(ge===lc||ge===cc||ge===dc){P.optional(function(){P.command(ki(me),"invalid matrix for uniform "+ee,R.commandStr),P.command(ge===lc&&me.length===4||ge===cc&&me.length===9||ge===dc&&me.length===16,"invalid length for matrix uniform "+ee,R.commandStr)});var nt=R.global.def("new Float32Array(["+Array.prototype.slice.call(me)+"])"),St=2;ge===cc?St=3:ge===dc&&(St=4),C(W,".uniformMatrix",St,"fv(",Qe,",false,",nt,");")}else{switch(ge){case Um:xe===1?P.commandType(me,"number","uniform "+ee,R.commandStr):P.command(ki(me)&&me.length===xe,"uniform "+ee,R.commandStr),B="1f";break;case nu:P.command(ki(me)&&me.length&&me.length%2===0&&me.length<=xe*2,"uniform "+ee,R.commandStr),B="2f";break;case su:P.command(ki(me)&&me.length&&me.length%3===0&&me.length<=xe*3,"uniform "+ee,R.commandStr),B="3f";break;case ou:P.command(ki(me)&&me.length&&me.length%4===0&&me.length<=xe*4,"uniform "+ee,R.commandStr),B="4f";break;case Xm:xe===1?P.commandType(me,"boolean","uniform "+ee,R.commandStr):P.command(ki(me)&&me.length===xe,"uniform "+ee,R.commandStr),B="1i";break;case Hm:xe===1?P.commandType(me,"number","uniform "+ee,R.commandStr):P.command(ki(me)&&me.length===xe,"uniform "+ee,R.commandStr),B="1i";break;case du:P.command(ki(me)&&me.length&&me.length%2===0&&me.length<=xe*2,"uniform "+ee,R.commandStr),B="2i";break;case au:P.command(ki(me)&&me.length&&me.length%2===0&&me.length<=xe*2,"uniform "+ee,R.commandStr),B="2i";break;case uu:P.command(ki(me)&&me.length&&me.length%3===0&&me.length<=xe*3,"uniform "+ee,R.commandStr),B="3i";break;case lu:P.command(ki(me)&&me.length&&me.length%3===0&&me.length<=xe*3,"uniform "+ee,R.commandStr),B="3i";break;case hu:P.command(ki(me)&&me.length&&me.length%4===0&&me.length<=xe*4,"uniform "+ee,R.commandStr),B="4i";break;case cu:P.command(ki(me)&&me.length&&me.length%4===0&&me.length<=xe*4,"uniform "+ee,R.commandStr),B="4i";break}xe>1?(B+="v",me=R.global.def("["+Array.prototype.slice.call(me)+"]")):me=ki(me)?Array.prototype.slice.call(me):me,C(W,".uniform",B,"(",Qe,",",me,");")}continue}else we=Be.append(R,C)}else{if(!$(tb))continue;we=C.def(V.uniforms,"[",A.id(ee),"]")}ge===uc?(P(!Array.isArray(we),"must specify a scalar prop for textures"),C("if(",we,"&&",we,'._reglType==="framebuffer"){',we,"=",we,".color[0];","}")):ge===hc&&(P(!Array.isArray(we),"must specify a scalar prop for cube maps"),C("if(",we,"&&",we,'._reglType==="framebufferCube"){',we,"=",we,".color[0];","}")),P.optional(function(){function nn(Wr,mu){R.assert(C,Wr,'bad data or missing for uniform "'+ee+'". '+mu)}function Uo(Wr,mu){mu===1&&P(!Array.isArray(we),"must not specify an array type for uniform"),nn("Array.isArray("+we+") && typeof "+we+'[0]===" '+Wr+'" || typeof '+we+'==="'+Wr+'"',"invalid type, expected "+Wr)}function hn(Wr,mu,pu){Array.isArray(we)?P(we.length&&we.length%Wr===0&&we.length<=Wr*pu,"must have length of "+(pu===1?"":"n * ")+Wr):nn(V.isArrayLike+"("+we+")&&"+we+".length && "+we+".length % "+Wr+" === 0 && "+we+".length<="+Wr*pu,"invalid vector, should have length of "+(pu===1?"":"n * ")+Wr,R.commandStr)}function lb(Wr){P(!Array.isArray(we),"must not specify a value type"),nn("typeof "+we+'==="function"&&'+we+'._reglType==="texture'+(Wr===Wy?"2d":"Cube")+'"',"invalid texture type",R.commandStr)}switch(ge){case Hm:Uo("number",xe);break;case au:hn(2,"number",xe);break;case lu:hn(3,"number",xe);break;case cu:hn(4,"number",xe);break;case Um:Uo("number",xe);break;case nu:hn(2,"number",xe);break;case su:hn(3,"number",xe);break;case ou:hn(4,"number",xe);break;case Xm:Uo("boolean",xe);break;case du:hn(2,"boolean",xe);break;case uu:hn(3,"boolean",xe);break;case hu:hn(4,"boolean",xe);break;case lc:hn(4,"number",xe);break;case cc:hn(9,"number",xe);break;case dc:hn(16,"number",xe);break;case uc:lb(Wy);break;case hc:lb(Q3);break}});var ti=1;switch(ge){case uc:case hc:var yr=C.def(we,"._texture");C(W,".uniform1i(",Qe,",",yr,".bind());"),C.exit(yr,".unbind();");continue;case Hm:case Xm:B="1i";break;case au:case du:B="2i",ti=2;break;case lu:case uu:B="3i",ti=3;break;case cu:case hu:B="4i",ti=4;break;case Um:B="1f";break;case nu:B="2f",ti=2;break;case su:B="3f",ti=3;break;case ou:B="4f",ti=4;break;case lc:B="Matrix2fv";break;case cc:B="Matrix3fv";break;case dc:B="Matrix4fv";break}if(B.indexOf("Matrix")===-1&&xe>1&&(B+="v",ti=1),B.charAt(0)==="M"){C(W,".uniform",B,"(",Qe,",");var Go=Math.pow(ge-lc+2,2),vs=R.global.def("new Float32Array(",Go,")");Array.isArray(we)?C("false,(",Ti(Go,function(nn){return vs+"["+nn+"]="+we[nn]}),",",vs,")"):C("false,(Array.isArray(",we,")||",we," instanceof Float32Array)?",we,":(",Ti(Go,function(nn){return vs+"["+nn+"]="+we+"["+nn+"]"}),",",vs,")"),C(");")}else if(ti>1){for(var Wn=[],Js=[],Vo=0;Vo=0","missing vertex count")})):(nt=St.def(V,".",zo),P.optional(function(){R.assert(St,nt+">=0","missing vertex count")})),nt}var N=F();function ie(ct){var nt=W[ct];return nt?nt.contextDep&&K.contextDynamic||nt.propDep?nt.append(R,G):nt.append(R,C):C.def(V,".",ct)}var ee=ie(No),ge=ie(iu),xe=B();if(typeof xe=="number"){if(xe===0)return}else G("if(",xe,"){"),G.exit("}");var Be,Tt;Pe&&(Be=ie(ru),Tt=R.instancing);var ft=N+".type",Qe=W.elements&&Ks(W.elements)&&!W.vaoActive;function we(){function ct(){G(Tt,".drawElementsInstancedANGLE(",[ee,xe,ft,ge+"<<(("+ft+"-"+Cy+")>>1)",Be],");")}function nt(){G(Tt,".drawArraysInstancedANGLE(",[ee,ge,xe,Be],");")}N&&N!=="null"?Qe?ct():(G("if(",N,"){"),ct(),G("}else{"),nt(),G("}")):nt()}function me(){function ct(){G(U+".drawElements("+[ee,xe,ft,ge+"<<(("+ft+"-"+Cy+")>>1)"]+");")}function nt(){G(U+".drawArrays("+[ee,ge,xe]+");")}N&&N!=="null"?Qe?ct():(G("if(",N,"){"),ct(),G("}else{"),nt(),G("}")):nt()}Pe&&(typeof Be!="number"||Be>=0)?typeof Be=="string"?(G("if(",Be,">0){"),we(),G("}else if(",Be,"<0){"),me(),G("}")):we():me()}function Ft(R,C,G,K,$){var U=Ct(),V=U.proc("body",$);return P.optional(function(){U.commandStr=C.commandStr,U.command=U.link(C.commandStr)}),Pe&&(U.instancing=V.def(U.shared.extensions,".angle_instanced_arrays")),R(U,V,G,K),U.compile().body}function Wt(R,C,G,K){Fi(R,C),G.useVAO?G.drawVAO?C(R.shared.vao,".setVAO(",G.drawVAO.append(R,C),");"):C(R.shared.vao,".setVAO(",R.shared.vao,".targetVAO);"):(C(R.shared.vao,".setVAO(null);"),_r(R,C,G,K.attributes,function(){return!0})),Qt(R,C,G,K.uniforms,function(){return!0},!1),xt(R,C,C,G)}function Ni(R,C){var G=R.proc("draw",1);Fi(R,G),qi(R,G,C.context),Zi(R,G,C.framebuffer),hr(R,G,C),vr(R,G,C.state),Lt(R,G,C,!1,!0);var K=C.shader.progVar.append(R,G);if(G(R.shared.gl,".useProgram(",K,".program);"),C.shader.program)Wt(R,G,C,C.shader.program);else{G(R.shared.vao,".setVAO(null);");var $=R.global.def("{}"),U=G.def(K,".id"),V=G.def($,"[",U,"]");G(R.cond(V).then(V,".call(this,a0);").else(V,"=",$,"[",U,"]=",R.link(function(W){return Ft(Wt,R,C,W,1)}),"(",K,");",V,".call(this,a0);"))}Object.keys(C.state).length>0&&G(R.shared.current,".dirty=true;"),R.shared.vao&&G(R.shared.vao,".setVAO(null);")}function Xn(R,C,G,K){R.batchId="a1",Fi(R,C);function $(){return!0}_r(R,C,G,K.attributes,$),Qt(R,C,G,K.uniforms,$,!1),xt(R,C,C,G)}function jo(R,C,G,K){Fi(R,C);var $=G.contextDep,U=C.def(),V="a0",W="a1",F=C.def();R.shared.props=F,R.batchId=U;var B=R.scope(),N=R.scope();C(B.entry,"for(",U,"=0;",U,"<",W,";++",U,"){",F,"=",V,"[",U,"];",N,"}",B.exit);function ie(ft){return ft.contextDep&&$||ft.propDep}function ee(ft){return!ie(ft)}if(G.needsContext&&qi(R,N,G.context),G.needsFramebuffer&&Zi(R,N,G.framebuffer),vr(R,N,G.state,ie),G.profile&&ie(G.profile)&&Lt(R,N,G,!1,!0),K)G.useVAO?G.drawVAO?ie(G.drawVAO)?N(R.shared.vao,".setVAO(",G.drawVAO.append(R,N),");"):B(R.shared.vao,".setVAO(",G.drawVAO.append(R,B),");"):B(R.shared.vao,".setVAO(",R.shared.vao,".targetVAO);"):(B(R.shared.vao,".setVAO(null);"),_r(R,B,G,K.attributes,ee),_r(R,N,G,K.attributes,ie)),Qt(R,B,G,K.uniforms,ee,!1),Qt(R,N,G,K.uniforms,ie,!0),xt(R,B,N,G);else{var ge=R.global.def("{}"),xe=G.shader.progVar.append(R,N),Be=N.def(xe,".id"),Tt=N.def(ge,"[",Be,"]");N(R.shared.gl,".useProgram(",xe,".program);","if(!",Tt,"){",Tt,"=",ge,"[",Be,"]=",R.link(function(ft){return Ft(Xn,R,G,ft,2)}),"(",xe,");}",Tt,".call(this,a0[",U,"],",U,");")}}function z(R,C){var G=R.proc("batch",2);R.batchId="0",Fi(R,G);var K=!1,$=!0;Object.keys(C.context).forEach(function(ge){K=K||C.context[ge].propDep}),K||(qi(R,G,C.context),$=!1);var U=C.framebuffer,V=!1;U?(U.propDep?K=V=!0:U.contextDep&&K&&(V=!0),V||Zi(R,G,U)):Zi(R,G,null),C.state.viewport&&C.state.viewport.propDep&&(K=!0);function W(ge){return ge.contextDep&&K||ge.propDep}hr(R,G,C),vr(R,G,C.state,function(ge){return!W(ge)}),(!C.profile||!W(C.profile))&&Lt(R,G,C,!1,"a1"),C.contextDep=K,C.needsContext=$,C.needsFramebuffer=V;var F=C.shader.progVar;if(F.contextDep&&K||F.propDep)jo(R,G,C,null);else{var B=F.append(R,G);if(G(R.shared.gl,".useProgram(",B,".program);"),C.shader.program)jo(R,G,C,C.shader.program);else{G(R.shared.vao,".setVAO(null);");var N=R.global.def("{}"),ie=G.def(B,".id"),ee=G.def(N,"[",ie,"]");G(R.cond(ee).then(ee,".call(this,a0,a1);").else(ee,"=",N,"[",ie,"]=",R.link(function(ge){return Ft(jo,R,C,ge,2)}),"(",B,");",ee,".call(this,a0,a1);"))}}Object.keys(C.state).length>0&&G(R.shared.current,".dirty=true;"),R.shared.vao&&G(R.shared.vao,".setVAO(null);")}function oe(R,C){var G=R.proc("scope",3);R.batchId="a2";var K=R.shared,$=K.current;qi(R,G,C.context),C.framebuffer&&C.framebuffer.append(R,G),eb(Object.keys(C.state)).forEach(function(V){var W=C.state[V],F=W.append(R,G);ki(F)?F.forEach(function(B,N){G.set(R.next[V],"["+N+"]",B)}):G.set(K.next,"."+V,F)}),Lt(R,G,C,!0,!0),[Fo,iu,zo,ru,No].forEach(function(V){var W=C.draw[V];W&&G.set(K.draw,"."+V,""+W.append(R,G))}),Object.keys(C.uniforms).forEach(function(V){var W=C.uniforms[V].append(R,G);Array.isArray(W)&&(W="["+W.join()+"]"),G.set(K.uniforms,"["+A.id(V)+"]",W)}),Object.keys(C.attributes).forEach(function(V){var W=C.attributes[V].append(R,G),F=R.scopeAttrib(V);Object.keys(new Q).forEach(function(B){G.set(F,"."+B,W[B])})}),C.scopeVAO&&G.set(K.vao,".targetVAO",C.scopeVAO.append(R,G));function U(V){var W=C.shader[V];W&&G.set(K.shader,"."+V,W.append(R,G))}U(sc),U(oc),Object.keys(C.state).length>0&&(G($,".dirty=true;"),G.exit($,".dirty=true;")),G("a1(",R.shared.context,",a0,",R.batchId,");")}function re(R){if(!(typeof R!="object"||ki(R))){for(var C=Object.keys(R),G=0;G=0;--xt){var Ft=Xe[xt];Ft&&Ft(Ae,null,0)}j.flush(),Re&&Re.update()}function Et(){!Ke&&Xe.length>0&&(Ke=ji.next(wt))}function Rt(){Ke&&(ji.cancel(wt),Ke=null)}function Ei(xt){xt.preventDefault(),ye=!0,Rt(),kt.forEach(function(Ft){Ft()})}function Li(xt){j.getError(),ye=!1,ne.restore(),We.restore(),Pe.restore(),mt.restore(),be.restore(),_e.restore(),Se.restore(),Re&&Re.restore(),it.procs.refresh(),Et(),Ct.forEach(function(Ft){Ft()})}Ue&&(Ue.addEventListener(rb,Ei,!1),Ue.addEventListener(nb,Li,!1));function zt(){Xe.length=0,Rt(),Ue&&(Ue.removeEventListener(rb,Ei),Ue.removeEventListener(nb,Li)),We.clear(),_e.clear(),be.clear(),Se.clear(),mt.clear(),Je.clear(),Pe.clear(),Re&&Re.clear(),Ye.forEach(function(xt){xt()})}function Yi(xt){P(!!xt,"invalid args to regl({...})"),P.type(xt,"object","invalid args to regl({...})");function Ft($){var U=i({},$);delete U.uniforms,delete U.attributes,delete U.context,delete U.vao,"stencil"in U&&U.stencil.op&&(U.stencil.opBack=U.stencil.opFront=U.stencil.op,delete U.stencil.op);function V(W){if(W in U){var F=U[W];delete U[W],Object.keys(F).forEach(function(B){U[W+"."+B]=F[B]})}}return V("blend"),V("depth"),V("cull"),V("stencil"),V("polygonOffset"),V("scissor"),V("sample"),"vao"in $&&(U.vao=$.vao),U}function Wt($,U){var V={},W={};return Object.keys($).forEach(function(F){var B=$[F];if(li.isDynamic(B)){W[F]=li.unbox(B,F);return}else if(U&&Array.isArray(B)){for(var N=0;N0)return Mt.call(this,G($|0),$|0)}else if(Array.isArray($)){if($.length)return Mt.call(this,$,$.length)}else return tt.call(this,$)}return i(K,{stats:oe,destroy:function(){re.destroy()}})}var xi=_e.setFBO=Yi({framebuffer:li.define.call(null,sb,"framebuffer")});function Vi(xt,Ft){var Wt=0;it.procs.poll();var Ni=Ft.color;Ni&&(j.clearColor(+Ni[0]||0,+Ni[1]||0,+Ni[2]||0,+Ni[3]||0),Wt|=_A),"depth"in Ft&&(j.clearDepth(+Ft.depth),Wt|=yA),"stencil"in Ft&&(j.clearStencil(Ft.stencil|0),Wt|=bA),P(!!Wt,"called regl.clear with no buffer specified"),j.clear(Wt)}function qi(xt){if(P(typeof xt=="object"&&xt,"regl.clear() takes an object as input"),"framebuffer"in xt)if(xt.framebuffer&&xt.framebuffer_reglType==="framebufferCube")for(var Ft=0;Ft<6;++Ft)xi(i({framebuffer:xt.framebuffer.faces[Ft]},xt),Vi);else xi(xt,Vi);else Vi(null,xt)}function Zi(xt){P.type(xt,"function","regl.frame() callback must be a function"),Xe.push(xt);function Ft(){var Wt=ob(Xe,xt);P(Wt>=0,"cannot cancel a frame twice");function Ni(){var Xn=ob(Xe,Ni);Xe[Xn]=Xe[Xe.length-1],Xe.length-=1,Xe.length<=0&&Rt()}Xe[Wt]=Ni}return Et(),{cancel:Ft}}function hr(){var xt=Ie.viewport,Ft=Ie.scissor_box;xt[0]=xt[1]=Ft[0]=Ft[1]=0,Ae.viewportWidth=Ae.framebufferWidth=Ae.drawingBufferWidth=xt[2]=Ft[2]=j.drawingBufferWidth,Ae.viewportHeight=Ae.framebufferHeight=Ae.drawingBufferHeight=xt[3]=Ft[3]=j.drawingBufferHeight}function vr(){Ae.tick+=1,Ae.time=Lt(),hr(),it.procs.poll()}function Fi(){mt.refresh(),hr(),it.procs.refresh(),Re&&Re.update()}function Lt(){return(Ri()-Ne)/1e3}Fi();function _r(xt,Ft){P.type(Ft,"function","listener callback must be a function");var Wt;switch(xt){case"frame":return Zi(Ft);case"lost":Wt=kt;break;case"restore":Wt=Ct;break;case"destroy":Wt=Ye;break;default:P.raise("invalid event, must be one of frame,lost,restore,destroy")}return Wt.push(Ft),{cancel:function(){for(var Ni=0;Ni=0},read:Ve,destroy:zt,_gl:j,_refresh:Fi,poll:function(){vr(),Re&&Re.update()},now:Lt,stats:Ee});return A.onDone(null,Qt),Qt}return TA})})(RC);var IF=RC.exports;const LF=Sv(IF);function yh(r,e){return r==null||e==null?NaN:re?1:r>=e?0:NaN}function PF(r,e){return r==null||e==null?NaN:er?1:e>=r?0:NaN}function FC(r){let e,t,i;r.length!==2?(e=yh,t=(a,l)=>yh(r(a),l),i=(a,l)=>r(a)-l):(e=r===yh||r===PF?r:DF,t=r,i=r);function n(a,l,c=0,d=a.length){if(c>>1;t(a[u],l)<0?c=u+1:d=u}while(c>>1;t(a[u],l)<=0?c=u+1:d=u}while(cc&&i(a[u-1],l)>-i(a[u],l)?u-1:u}return{left:n,center:o,right:s}}function DF(){return 0}function MF(r){return r===null?NaN:+r}const RF=FC(yh),FF=RF.right;FC(MF).center;function Jh(r,e){let t,i;for(const n of r)n!=null&&(t===void 0?n>=n&&(t=i=n):(t>n&&(t=n),i=NF?10:s>=zF?5:s>=BF?2:1;let a,l,c;return n<0?(c=Math.pow(10,-n)/o,a=Math.round(r*c),l=Math.round(e*c),a/ce&&--l,c=-c):(c=Math.pow(10,n)*o,a=Math.round(r/c),l=Math.round(e/c),a*ce&&--l),l0))return[];if(r===e)return[r];const i=e=n))return[];const a=s-n+1,l=new Array(a);if(i)if(o<0)for(let c=0;ce&&(t=r,r=e,e=t),function(i){return Math.max(r,Math.min(e,i))}}function WF(r,e,t){var i=r[0],n=r[1],s=e[0],o=e[1];return n2?YF:WF,l=c=null,u}function u(h){return h==null||isNaN(h=+h)?s:(l||(l=a(r.map(i),e,t)))(i(o(h)))}return u.invert=function(h){return o(n((c||(c=a(e,r.map(i),Pn)))(h)))},u.domain=function(h){return arguments.length?(r=Array.from(h,HF),d()):r.slice()},u.range=function(h){return arguments.length?(e=Array.from(h),d()):e.slice()},u.rangeRound=function(h){return e=Array.from(h),t=pR,d()},u.clamp=function(h){return arguments.length?(o=h?!0:$n,d()):o!==$n},u.interpolate=function(h){return arguments.length?(t=h,d()):t},u.unknown=function(h){return arguments.length?(s=h,u):s},function(h,f){return i=h,n=f,d()}}function qF(){return BC()($n,$n)}function ZF(r){return Math.abs(r=Math.round(r))>=1e21?r.toLocaleString("en").replace(/,/g,""):r.toString(10)}function $h(r,e){if((t=(r=e?r.toExponential(e-1):r.toExponential()).indexOf("e"))<0)return null;var t,i=r.slice(0,t);return[i.length>1?i[0]+i.slice(2):i,+r.slice(t+1)]}function Pl(r){return r=$h(Math.abs(r)),r?r[1]:NaN}function KF(r,e){return function(t,i){for(var n=t.length,s=[],o=0,a=r[0],l=0;n>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),s.push(t.substring(n-=a,n+a)),!((l+=a+1)>i));)a=r[o=(o+1)%r.length];return s.reverse().join(e)}}function JF(r){return function(e){return e.replace(/[0-9]/g,function(t){return r[+t]})}}var QF=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ef(r){if(!(e=QF.exec(r)))throw new Error("invalid format: "+r);var e;return new Yv({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}ef.prototype=Yv.prototype;function Yv(r){this.fill=r.fill===void 0?" ":r.fill+"",this.align=r.align===void 0?">":r.align+"",this.sign=r.sign===void 0?"-":r.sign+"",this.symbol=r.symbol===void 0?"":r.symbol+"",this.zero=!!r.zero,this.width=r.width===void 0?void 0:+r.width,this.comma=!!r.comma,this.precision=r.precision===void 0?void 0:+r.precision,this.trim=!!r.trim,this.type=r.type===void 0?"":r.type+""}Yv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function $F(r){e:for(var e=r.length,t=1,i=-1,n;t0&&(i=0);break}return i>0?r.slice(0,i)+r.slice(n+1):r}var jC;function eN(r,e){var t=$h(r,e);if(!t)return r+"";var i=t[0],n=t[1],s=n-(jC=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,o=i.length;return s===o?i:s>o?i+new Array(s-o+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+$h(r,Math.max(0,e+s-1))[0]}function Ew(r,e){var t=$h(r,e);if(!t)return r+"";var i=t[0],n=t[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}const Aw={"%":(r,e)=>(r*100).toFixed(e),b:r=>Math.round(r).toString(2),c:r=>r+"",d:ZF,e:(r,e)=>r.toExponential(e),f:(r,e)=>r.toFixed(e),g:(r,e)=>r.toPrecision(e),o:r=>Math.round(r).toString(8),p:(r,e)=>Ew(r*100,e),r:Ew,s:eN,X:r=>Math.round(r).toString(16).toUpperCase(),x:r=>Math.round(r).toString(16)};function Ow(r){return r}var Iw=Array.prototype.map,Lw=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function tN(r){var e=r.grouping===void 0||r.thousands===void 0?Ow:KF(Iw.call(r.grouping,Number),r.thousands+""),t=r.currency===void 0?"":r.currency[0]+"",i=r.currency===void 0?"":r.currency[1]+"",n=r.decimal===void 0?".":r.decimal+"",s=r.numerals===void 0?Ow:JF(Iw.call(r.numerals,String)),o=r.percent===void 0?"%":r.percent+"",a=r.minus===void 0?"−":r.minus+"",l=r.nan===void 0?"NaN":r.nan+"";function c(u){u=ef(u);var h=u.fill,f=u.align,m=u.sign,p=u.symbol,g=u.zero,v=u.width,b=u.comma,S=u.precision,_=u.trim,x=u.type;x==="n"?(b=!0,x="g"):Aw[x]||(S===void 0&&(S=12),_=!0,x="g"),(g||h==="0"&&f==="=")&&(g=!0,h="0",f="=");var I=p==="$"?t:p==="#"&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",T=p==="$"?i:/[%p]/.test(x)?o:"",O=Aw[x],E=/[defgprs%]/.test(x);S=S===void 0?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function w(X){var H=I,Y=T,k,D,M;if(x==="c")Y=O(X)+Y,X="";else{X=+X;var L=X<0||1/X<0;if(X=isNaN(X)?l:O(Math.abs(X),S),_&&(X=$F(X)),L&&+X==0&&m!=="+"&&(L=!1),H=(L?m==="("?m:a:m==="-"||m==="("?"":m)+H,Y=(x==="s"?Lw[8+jC/3]:"")+Y+(L&&m==="("?")":""),E){for(k=-1,D=X.length;++kM||M>57){Y=(M===46?n+X.slice(k+1):X.slice(k))+Y,X=X.slice(0,k);break}}}b&&!g&&(X=e(X,1/0));var J=H.length+X.length+Y.length,ce=J>1)+H+X+Y+ce.slice(J);break;default:X=ce+H+X+Y;break}return s(X)}return w.toString=function(){return u+""},w}function d(u,h){var f=c((u=ef(u),u.type="f",u)),m=Math.max(-8,Math.min(8,Math.floor(Pl(h)/3)))*3,p=Math.pow(10,-m),g=Lw[8+m/3];return function(v){return f(p*v)+g}}return{format:c,formatPrefix:d}}var Qu,GC,VC;iN({thousands:",",grouping:[3],currency:["$",""]});function iN(r){return Qu=tN(r),GC=Qu.format,VC=Qu.formatPrefix,Qu}function rN(r){return Math.max(0,-Pl(Math.abs(r)))}function nN(r,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Pl(e)/3)))*3-Pl(Math.abs(r)))}function sN(r,e){return r=Math.abs(r),e=Math.abs(e)-r,Math.max(0,Pl(e)-Pl(r))+1}function oN(r,e,t,i){var n=GF(r,e,t),s;switch(i=ef(i==null?",f":i),i.type){case"s":{var o=Math.max(Math.abs(r),Math.abs(e));return i.precision==null&&!isNaN(s=nN(n,o))&&(i.precision=s),VC(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(s=sN(n,Math.max(Math.abs(r),Math.abs(e))))&&(i.precision=s-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(s=rN(n))&&(i.precision=s-(i.type==="%")*2);break}}return GC(i)}function UC(r){var e=r.domain;return r.ticks=function(t){var i=e();return jF(i[0],i[i.length-1],t==null?10:t)},r.tickFormat=function(t,i){var n=e();return oN(n[0],n[n.length-1],t==null?10:t,i)},r.nice=function(t){t==null&&(t=10);var i=e(),n=0,s=i.length-1,o=i[n],a=i[s],l,c,d=10;for(a0;){if(c=C0(o,a,t),c===l)return i[n]=o,i[s]=a,e(i);if(c>0)o=Math.floor(o/c)*c,a=Math.ceil(a/c)*c;else if(c<0)o=Math.ceil(o*c)/c,a=Math.floor(a*c)/c;else break;l=c}return r},r}function sd(){var r=qF();return r.copy=function(){return zC(r,sd())},NC.apply(r,arguments),UC(r)}function Pw(r){return function(e){return e<0?-Math.pow(-e,r):Math.pow(e,r)}}function aN(r){return r<0?-Math.sqrt(-r):Math.sqrt(r)}function lN(r){return r<0?-r*r:r*r}function cN(r){var e=r($n,$n),t=1;function i(){return t===1?r($n,$n):t===.5?r(aN,lN):r(Pw(t),Pw(1/t))}return e.exponent=function(n){return arguments.length?(t=+n,i()):t},UC(e)}function HC(){var r=cN(BC());return r.copy=function(){return zC(r,HC()).exponent(r.exponent())},NC.apply(r,arguments),r}const kg=new Date,Eg=new Date;function ls(r,e,t,i){function n(s){return r(s=arguments.length===0?new Date:new Date(+s)),s}return n.floor=s=>(r(s=new Date(+s)),s),n.ceil=s=>(r(s=new Date(s-1)),e(s,1),r(s),s),n.round=s=>{const o=n(s),a=n.ceil(s);return s-o(e(s=new Date(+s),o==null?1:Math.floor(o)),s),n.range=(s,o,a)=>{const l=[];if(s=n.ceil(s),a=a==null?1:Math.floor(a),!(s0))return l;let c;do l.push(c=new Date(+s)),e(s,a),r(s);while(cls(o=>{if(o>=o)for(;r(o),!s(o);)o.setTime(o-1)},(o,a)=>{if(o>=o)if(a<0)for(;++a<=0;)for(;e(o,-1),!s(o););else for(;--a>=0;)for(;e(o,1),!s(o););}),t&&(n.count=(s,o)=>(kg.setTime(+s),Eg.setTime(+o),r(kg),r(Eg),Math.floor(t(kg,Eg))),n.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?n.filter(i?o=>i(o)%s===0:o=>n.count(0,o)%s===0):n)),n}const dN=1e3,qv=dN*60,uN=qv*60,od=uN*24,XC=od*7,Zv=ls(r=>r.setHours(0,0,0,0),(r,e)=>r.setDate(r.getDate()+e),(r,e)=>(e-r-(e.getTimezoneOffset()-r.getTimezoneOffset())*qv)/od,r=>r.getDate()-1);Zv.range;const Kv=ls(r=>{r.setUTCHours(0,0,0,0)},(r,e)=>{r.setUTCDate(r.getUTCDate()+e)},(r,e)=>(e-r)/od,r=>r.getUTCDate()-1);Kv.range;const hN=ls(r=>{r.setUTCHours(0,0,0,0)},(r,e)=>{r.setUTCDate(r.getUTCDate()+e)},(r,e)=>(e-r)/od,r=>Math.floor(r/od));hN.range;function _a(r){return ls(e=>{e.setDate(e.getDate()-(e.getDay()+7-r)%7),e.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*qv)/XC)}const WC=_a(0),tf=_a(1),fN=_a(2),mN=_a(3),Dl=_a(4),pN=_a(5),gN=_a(6);WC.range;tf.range;fN.range;mN.range;Dl.range;pN.range;gN.range;function ya(r){return ls(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-r)%7),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/XC)}const YC=ya(0),rf=ya(1),vN=ya(2),_N=ya(3),Ml=ya(4),yN=ya(5),bN=ya(6);YC.range;rf.range;vN.range;_N.range;Ml.range;yN.range;bN.range;const ha=ls(r=>{r.setMonth(0,1),r.setHours(0,0,0,0)},(r,e)=>{r.setFullYear(r.getFullYear()+e)},(r,e)=>e.getFullYear()-r.getFullYear(),r=>r.getFullYear());ha.every=r=>!isFinite(r=Math.floor(r))||!(r>0)?null:ls(e=>{e.setFullYear(Math.floor(e.getFullYear()/r)*r),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t*r)});ha.range;const fa=ls(r=>{r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0)},(r,e)=>{r.setUTCFullYear(r.getUTCFullYear()+e)},(r,e)=>e.getUTCFullYear()-r.getUTCFullYear(),r=>r.getUTCFullYear());fa.every=r=>!isFinite(r=Math.floor(r))||!(r>0)?null:ls(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/r)*r),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t*r)});fa.range;function Ag(r){if(0<=r.y&&r.y<100){var e=new Date(-1,r.m,r.d,r.H,r.M,r.S,r.L);return e.setFullYear(r.y),e}return new Date(r.y,r.m,r.d,r.H,r.M,r.S,r.L)}function Og(r){if(0<=r.y&&r.y<100){var e=new Date(Date.UTC(-1,r.m,r.d,r.H,r.M,r.S,r.L));return e.setUTCFullYear(r.y),e}return new Date(Date.UTC(r.y,r.m,r.d,r.H,r.M,r.S,r.L))}function bc(r,e,t){return{y:r,m:e,d:t,H:0,M:0,S:0,L:0}}function xN(r){var e=r.dateTime,t=r.date,i=r.time,n=r.periods,s=r.days,o=r.shortDays,a=r.months,l=r.shortMonths,c=xc(n),d=wc(n),u=xc(s),h=wc(s),f=xc(o),m=wc(o),p=xc(a),g=wc(a),v=xc(l),b=wc(l),S={a:L,A:J,b:ce,B:te,c:null,d:zw,e:zw,f:HN,g:e7,G:i7,H:GN,I:VN,j:UN,L:qC,m:XN,M:WN,p:et,q:ot,Q:Gw,s:Vw,S:YN,u:qN,U:ZN,V:KN,w:JN,W:QN,x:null,X:null,y:$N,Y:t7,Z:r7,"%":jw},_={a:Ot,A:gt,b:je,B:At,c:null,d:Bw,e:Bw,f:a7,g:v7,G:y7,H:n7,I:s7,j:o7,L:KC,m:l7,M:c7,p:It,q:de,Q:Gw,s:Vw,S:d7,u:u7,U:h7,V:f7,w:m7,W:p7,x:null,X:null,y:g7,Y:_7,Z:b7,"%":jw},x={a:w,A:X,b:H,B:Y,c:k,d:Fw,e:Fw,f:NN,g:Rw,G:Mw,H:Nw,I:Nw,j:DN,L:FN,m:PN,M:MN,p:E,q:LN,Q:BN,s:jN,S:RN,u:kN,U:EN,V:AN,w:CN,W:ON,x:D,X:M,y:Rw,Y:Mw,Z:IN,"%":zN};S.x=I(t,S),S.X=I(i,S),S.c=I(e,S),_.x=I(t,_),_.X=I(i,_),_.c=I(e,_);function I(pe,He){return function(dt){var Oe=[],Gt=-1,ei=0,rt=pe.length,_t,vi,Si;for(dt instanceof Date||(dt=new Date(+dt));++Gt53)return null;"w"in Oe||(Oe.w=1),"Z"in Oe?(ei=Og(bc(Oe.y,0,1)),rt=ei.getUTCDay(),ei=rt>4||rt===0?rf.ceil(ei):rf(ei),ei=Kv.offset(ei,(Oe.V-1)*7),Oe.y=ei.getUTCFullYear(),Oe.m=ei.getUTCMonth(),Oe.d=ei.getUTCDate()+(Oe.w+6)%7):(ei=Ag(bc(Oe.y,0,1)),rt=ei.getDay(),ei=rt>4||rt===0?tf.ceil(ei):tf(ei),ei=Zv.offset(ei,(Oe.V-1)*7),Oe.y=ei.getFullYear(),Oe.m=ei.getMonth(),Oe.d=ei.getDate()+(Oe.w+6)%7)}else("W"in Oe||"U"in Oe)&&("w"in Oe||(Oe.w="u"in Oe?Oe.u%7:"W"in Oe?1:0),rt="Z"in Oe?Og(bc(Oe.y,0,1)).getUTCDay():Ag(bc(Oe.y,0,1)).getDay(),Oe.m=0,Oe.d="W"in Oe?(Oe.w+6)%7+Oe.W*7-(rt+5)%7:Oe.w+Oe.U*7-(rt+6)%7);return"Z"in Oe?(Oe.H+=Oe.Z/100|0,Oe.M+=Oe.Z%100,Og(Oe)):Ag(Oe)}}function O(pe,He,dt,Oe){for(var Gt=0,ei=He.length,rt=dt.length,_t,vi;Gt=rt)return-1;if(_t=He.charCodeAt(Gt++),_t===37){if(_t=He.charAt(Gt++),vi=x[_t in Dw?He.charAt(Gt++):_t],!vi||(Oe=vi(pe,dt,Oe))<0)return-1}else if(_t!=dt.charCodeAt(Oe++))return-1}return Oe}function E(pe,He,dt){var Oe=c.exec(He.slice(dt));return Oe?(pe.p=d.get(Oe[0].toLowerCase()),dt+Oe[0].length):-1}function w(pe,He,dt){var Oe=f.exec(He.slice(dt));return Oe?(pe.w=m.get(Oe[0].toLowerCase()),dt+Oe[0].length):-1}function X(pe,He,dt){var Oe=u.exec(He.slice(dt));return Oe?(pe.w=h.get(Oe[0].toLowerCase()),dt+Oe[0].length):-1}function H(pe,He,dt){var Oe=v.exec(He.slice(dt));return Oe?(pe.m=b.get(Oe[0].toLowerCase()),dt+Oe[0].length):-1}function Y(pe,He,dt){var Oe=p.exec(He.slice(dt));return Oe?(pe.m=g.get(Oe[0].toLowerCase()),dt+Oe[0].length):-1}function k(pe,He,dt){return O(pe,e,He,dt)}function D(pe,He,dt){return O(pe,t,He,dt)}function M(pe,He,dt){return O(pe,i,He,dt)}function L(pe){return o[pe.getDay()]}function J(pe){return s[pe.getDay()]}function ce(pe){return l[pe.getMonth()]}function te(pe){return a[pe.getMonth()]}function et(pe){return n[+(pe.getHours()>=12)]}function ot(pe){return 1+~~(pe.getMonth()/3)}function Ot(pe){return o[pe.getUTCDay()]}function gt(pe){return s[pe.getUTCDay()]}function je(pe){return l[pe.getUTCMonth()]}function At(pe){return a[pe.getUTCMonth()]}function It(pe){return n[+(pe.getUTCHours()>=12)]}function de(pe){return 1+~~(pe.getUTCMonth()/3)}return{format:function(pe){var He=I(pe+="",S);return He.toString=function(){return pe},He},parse:function(pe){var He=T(pe+="",!1);return He.toString=function(){return pe},He},utcFormat:function(pe){var He=I(pe+="",_);return He.toString=function(){return pe},He},utcParse:function(pe){var He=T(pe+="",!0);return He.toString=function(){return pe},He}}}var Dw={"-":"",_:" ",0:"0"},xr=/^\s*\d+/,wN=/^%/,SN=/[\\^$*+?|[\]().{}]/g;function ui(r,e,t){var i=r<0?"-":"",n=(i?-r:r)+"",s=n.length;return i+(s[e.toLowerCase(),t]))}function CN(r,e,t){var i=xr.exec(e.slice(t,t+1));return i?(r.w=+i[0],t+i[0].length):-1}function kN(r,e,t){var i=xr.exec(e.slice(t,t+1));return i?(r.u=+i[0],t+i[0].length):-1}function EN(r,e,t){var i=xr.exec(e.slice(t,t+2));return i?(r.U=+i[0],t+i[0].length):-1}function AN(r,e,t){var i=xr.exec(e.slice(t,t+2));return i?(r.V=+i[0],t+i[0].length):-1}function ON(r,e,t){var i=xr.exec(e.slice(t,t+2));return i?(r.W=+i[0],t+i[0].length):-1}function Mw(r,e,t){var i=xr.exec(e.slice(t,t+4));return i?(r.y=+i[0],t+i[0].length):-1}function Rw(r,e,t){var i=xr.exec(e.slice(t,t+2));return i?(r.y=+i[0]+(+i[0]>68?1900:2e3),t+i[0].length):-1}function IN(r,e,t){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(t,t+6));return i?(r.Z=i[1]?0:-(i[2]+(i[3]||"00")),t+i[0].length):-1}function LN(r,e,t){var i=xr.exec(e.slice(t,t+1));return i?(r.q=i[0]*3-3,t+i[0].length):-1}function PN(r,e,t){var i=xr.exec(e.slice(t,t+2));return i?(r.m=i[0]-1,t+i[0].length):-1}function Fw(r,e,t){var i=xr.exec(e.slice(t,t+2));return i?(r.d=+i[0],t+i[0].length):-1}function DN(r,e,t){var i=xr.exec(e.slice(t,t+3));return i?(r.m=0,r.d=+i[0],t+i[0].length):-1}function Nw(r,e,t){var i=xr.exec(e.slice(t,t+2));return i?(r.H=+i[0],t+i[0].length):-1}function MN(r,e,t){var i=xr.exec(e.slice(t,t+2));return i?(r.M=+i[0],t+i[0].length):-1}function RN(r,e,t){var i=xr.exec(e.slice(t,t+2));return i?(r.S=+i[0],t+i[0].length):-1}function FN(r,e,t){var i=xr.exec(e.slice(t,t+3));return i?(r.L=+i[0],t+i[0].length):-1}function NN(r,e,t){var i=xr.exec(e.slice(t,t+6));return i?(r.L=Math.floor(i[0]/1e3),t+i[0].length):-1}function zN(r,e,t){var i=wN.exec(e.slice(t,t+1));return i?t+i[0].length:-1}function BN(r,e,t){var i=xr.exec(e.slice(t));return i?(r.Q=+i[0],t+i[0].length):-1}function jN(r,e,t){var i=xr.exec(e.slice(t));return i?(r.s=+i[0],t+i[0].length):-1}function zw(r,e){return ui(r.getDate(),e,2)}function GN(r,e){return ui(r.getHours(),e,2)}function VN(r,e){return ui(r.getHours()%12||12,e,2)}function UN(r,e){return ui(1+Zv.count(ha(r),r),e,3)}function qC(r,e){return ui(r.getMilliseconds(),e,3)}function HN(r,e){return qC(r,e)+"000"}function XN(r,e){return ui(r.getMonth()+1,e,2)}function WN(r,e){return ui(r.getMinutes(),e,2)}function YN(r,e){return ui(r.getSeconds(),e,2)}function qN(r){var e=r.getDay();return e===0?7:e}function ZN(r,e){return ui(WC.count(ha(r)-1,r),e,2)}function ZC(r){var e=r.getDay();return e>=4||e===0?Dl(r):Dl.ceil(r)}function KN(r,e){return r=ZC(r),ui(Dl.count(ha(r),r)+(ha(r).getDay()===4),e,2)}function JN(r){return r.getDay()}function QN(r,e){return ui(tf.count(ha(r)-1,r),e,2)}function $N(r,e){return ui(r.getFullYear()%100,e,2)}function e7(r,e){return r=ZC(r),ui(r.getFullYear()%100,e,2)}function t7(r,e){return ui(r.getFullYear()%1e4,e,4)}function i7(r,e){var t=r.getDay();return r=t>=4||t===0?Dl(r):Dl.ceil(r),ui(r.getFullYear()%1e4,e,4)}function r7(r){var e=r.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ui(e/60|0,"0",2)+ui(e%60,"0",2)}function Bw(r,e){return ui(r.getUTCDate(),e,2)}function n7(r,e){return ui(r.getUTCHours(),e,2)}function s7(r,e){return ui(r.getUTCHours()%12||12,e,2)}function o7(r,e){return ui(1+Kv.count(fa(r),r),e,3)}function KC(r,e){return ui(r.getUTCMilliseconds(),e,3)}function a7(r,e){return KC(r,e)+"000"}function l7(r,e){return ui(r.getUTCMonth()+1,e,2)}function c7(r,e){return ui(r.getUTCMinutes(),e,2)}function d7(r,e){return ui(r.getUTCSeconds(),e,2)}function u7(r){var e=r.getUTCDay();return e===0?7:e}function h7(r,e){return ui(YC.count(fa(r)-1,r),e,2)}function JC(r){var e=r.getUTCDay();return e>=4||e===0?Ml(r):Ml.ceil(r)}function f7(r,e){return r=JC(r),ui(Ml.count(fa(r),r)+(fa(r).getUTCDay()===4),e,2)}function m7(r){return r.getUTCDay()}function p7(r,e){return ui(rf.count(fa(r)-1,r),e,2)}function g7(r,e){return ui(r.getUTCFullYear()%100,e,2)}function v7(r,e){return r=JC(r),ui(r.getUTCFullYear()%100,e,2)}function _7(r,e){return ui(r.getUTCFullYear()%1e4,e,4)}function y7(r,e){var t=r.getUTCDay();return r=t>=4||t===0?Ml(r):Ml.ceil(r),ui(r.getUTCFullYear()%1e4,e,4)}function b7(){return"+0000"}function jw(){return"%"}function Gw(r){return+r}function Vw(r){return Math.floor(+r/1e3)}var Wa,Ns;x7({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"]});function x7(r){return Wa=xN(r),Ns=Wa.format,Wa.parse,Wa.utcFormat,Wa.utcParse,Wa}var Uw=typeof Float32Array!="undefined"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var r=0,e=arguments.length;e--;)r+=arguments[e]*arguments[e];return Math.sqrt(r)});function w7(){var r=new Uw(9);return Uw!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r}function Hw(r,e,t){var i=e[0],n=e[1],s=e[2],o=e[3],a=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=t[0],f=t[1];return r[0]=i,r[1]=n,r[2]=s,r[3]=o,r[4]=a,r[5]=l,r[6]=h*i+f*o+c,r[7]=h*n+f*a+d,r[8]=h*s+f*l+u,r}function Ig(r,e,t){var i=t[0],n=t[1];return r[0]=i*e[0],r[1]=i*e[1],r[2]=i*e[2],r[3]=n*e[3],r[4]=n*e[4],r[5]=n*e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r}function S7(r,e,t){return r[0]=2/e,r[1]=0,r[2]=0,r[3]=0,r[4]=-2/t,r[5]=0,r[6]=-1,r[7]=1,r[8]=1,r}var Jv={exports:{}};Jv.exports;(function(r){(function(e,t,i){function n(l){var c=this,d=a();c.next=function(){var u=2091639*c.s0+c.c*23283064365386963e-26;return c.s0=c.s1,c.s1=c.s2,c.s2=u-(c.c=u|0)},c.c=1,c.s0=d(" "),c.s1=d(" "),c.s2=d(" "),c.s0-=d(l),c.s0<0&&(c.s0+=1),c.s1-=d(l),c.s1<0&&(c.s1+=1),c.s2-=d(l),c.s2<0&&(c.s2+=1),d=null}function s(l,c){return c.c=l.c,c.s0=l.s0,c.s1=l.s1,c.s2=l.s2,c}function o(l,c){var d=new n(l),u=c&&c.state,h=d.next;return h.int32=function(){return d.next()*4294967296|0},h.double=function(){return h()+(h()*2097152|0)*11102230246251565e-32},h.quick=h,u&&(typeof u=="object"&&s(u,d),h.state=function(){return s(d,{})}),h}function a(){var l=4022871197,c=function(d){d=String(d);for(var u=0;u>>0,h-=l,h*=l,l=h>>>0,h-=l,l+=h*4294967296}return(l>>>0)*23283064365386963e-26};return c}t&&t.exports?t.exports=o:this.alea=o})(Xi,r)})(Jv);var T7=Jv.exports,Qv={exports:{}};Qv.exports;(function(r){(function(e,t,i){function n(a){var l=this,c="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var u=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^u^u>>>8},a===(a|0)?l.x=a:c+=a;for(var d=0;d>>0)/4294967296};return u.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},u.int32=c.next,u.quick=u,d&&(typeof d=="object"&&s(d,c),u.state=function(){return s(c,{})}),u}t&&t.exports?t.exports=o:this.xor128=o})(Xi,r)})(Qv);var C7=Qv.exports,$v={exports:{}};$v.exports;(function(r){(function(e,t,i){function n(a){var l=this,c="";l.next=function(){var u=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^(u^u<<1))|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,a===(a|0)?l.x=a:c+=a;for(var d=0;d>>4),l.next()}function s(a,l){return l.x=a.x,l.y=a.y,l.z=a.z,l.w=a.w,l.v=a.v,l.d=a.d,l}function o(a,l){var c=new n(a),d=l&&l.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},u.int32=c.next,u.quick=u,d&&(typeof d=="object"&&s(d,c),u.state=function(){return s(c,{})}),u}t&&t.exports?t.exports=o:this.xorwow=o})(Xi,r)})($v);var k7=$v.exports,e_={exports:{}};e_.exports;(function(r){(function(e,t,i){function n(a){var l=this;l.next=function(){var d=l.x,u=l.i,h,f;return h=d[u],h^=h>>>7,f=h^h<<24,h=d[u+1&7],f^=h^h>>>10,h=d[u+3&7],f^=h^h>>>3,h=d[u+4&7],f^=h^h<<7,h=d[u+7&7],h=h^h<<13,f^=h^h<<9,d[u]=f,l.i=u+1&7,f};function c(d,u){var h,f=[];if(u===(u|0))f[0]=u;else for(u=""+u,h=0;h0;--h)d.next()}c(l,a)}function s(a,l){return l.x=a.x.slice(),l.i=a.i,l}function o(a,l){a==null&&(a=+new Date);var c=new n(a),d=l&&l.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},u.int32=c.next,u.quick=u,d&&(d.x&&s(d,c),u.state=function(){return s(c,{})}),u}t&&t.exports?t.exports=o:this.xorshift7=o})(Xi,r)})(e_);var E7=e_.exports,t_={exports:{}};t_.exports;(function(r){(function(e,t,i){function n(a){var l=this;l.next=function(){var d=l.w,u=l.X,h=l.i,f,m;return l.w=d=d+1640531527|0,m=u[h+34&127],f=u[h=h+1&127],m^=m<<13,f^=f<<17,m^=m>>>15,f^=f>>>12,m=u[h]=m^f,l.i=h,m+(d^d>>>16)|0};function c(d,u){var h,f,m,p,g,v=[],b=128;for(u===(u|0)?(f=u,u=null):(u=u+"\0",f=0,b=Math.max(b,u.length)),m=0,p=-32;p>>15,f^=f<<4,f^=f>>>13,p>=0&&(g=g+1640531527|0,h=v[p&127]^=f+g,m=h==0?m+1:0);for(m>=128&&(v[(u&&u.length||0)&127]=-1),m=127,p=4*128;p>0;--p)f=v[m+34&127],h=v[m=m+1&127],f^=f<<13,h^=h<<17,f^=f>>>15,h^=h>>>12,v[m]=f^h;d.w=g,d.X=v,d.i=m}c(l,a)}function s(a,l){return l.i=a.i,l.w=a.w,l.X=a.X.slice(),l}function o(a,l){a==null&&(a=+new Date);var c=new n(a),d=l&&l.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},u.int32=c.next,u.quick=u,d&&(d.X&&s(d,c),u.state=function(){return s(c,{})}),u}t&&t.exports?t.exports=o:this.xor4096=o})(Xi,r)})(t_);var A7=t_.exports,i_={exports:{}};i_.exports;(function(r){(function(e,t,i){function n(a){var l=this,c="";l.next=function(){var u=l.b,h=l.c,f=l.d,m=l.a;return u=u<<25^u>>>7^h,h=h-f|0,f=f<<24^f>>>8^m,m=m-u|0,l.b=u=u<<20^u>>>12^h,l.c=h=h-f|0,l.d=f<<16^h>>>16^m,l.a=m-u|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,a===Math.floor(a)?(l.a=a/4294967296|0,l.b=a|0):c+=a;for(var d=0;d>>0)/4294967296};return u.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},u.int32=c.next,u.quick=u,d&&(typeof d=="object"&&s(d,c),u.state=function(){return s(c,{})}),u}t&&t.exports?t.exports=o:this.tychei=o})(Xi,r)})(i_);var O7=i_.exports,QC={exports:{}};const I7={},L7=Object.freeze(Object.defineProperty({__proto__:null,default:I7},Symbol.toStringTag,{value:"Module"})),P7=ET(L7);(function(r){(function(e,t,i){var n=256,s=6,o=52,a="random",l=i.pow(n,s),c=i.pow(2,o),d=c*2,u=n-1,h;function f(_,x,I){var T=[];x=x==!0?{entropy:!0}:x||{};var O=v(g(x.entropy?[_,S(t)]:_==null?b():_,3),T),E=new m(T),w=function(){for(var X=E.g(s),H=l,Y=0;X=d;)X/=2,H/=2,Y>>>=1;return(X+Y)/H};return w.int32=function(){return E.g(4)|0},w.quick=function(){return E.g(4)/4294967296},w.double=w,v(S(E.S),t),(x.pass||I||function(X,H,Y,k){return k&&(k.S&&p(k,E),X.state=function(){return p(E,{})}),Y?(i[a]=X,H):X})(w,O,"global"in x?x.global:this==i,x.state)}function m(_){var x,I=_.length,T=this,O=0,E=T.i=T.j=0,w=T.S=[];for(I||(_=[I++]);O0)return t;throw new Error("Expected number to be positive, got "+t.n)},this.lessThan=function(i){if(t.n=i)return t;throw new Error("Expected number to be greater than or equal to "+i+", got "+t.n)},this.greaterThan=function(i){if(t.n>i)return t;throw new Error("Expected number to be greater than "+i+", got "+t.n)},this.n=e},Y7=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),t===void 0&&(t=e===void 0?1:e,e=0),jn(e).isInt(),jn(t).isInt(),function(){return Math.floor(r.next()*(t-e+1)+e)}},q7=function(r){return function(){return r.next()>=.5}},Z7=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),function(){var i,n,s;do i=r.next()*2-1,n=r.next()*2-1,s=i*i+n*n;while(!s||s>1);return e+t*n*Math.sqrt(-2*Math.log(s)/s)}},K7=function(r,e,t){e===void 0&&(e=0),t===void 0&&(t=1);var i=r.normal(e,t);return function(){return Math.exp(i())}},J7=function(r,e){return e===void 0&&(e=.5),jn(e).greaterThanOrEqual(0).lessThan(1),function(){return Math.floor(r.next()+e)}},Q7=function(r,e,t){return e===void 0&&(e=1),t===void 0&&(t=.5),jn(e).isInt().isPositive(),jn(t).greaterThanOrEqual(0).lessThan(1),function(){for(var i=0,n=0;i++l;)d=d-l,l=e*l/++c;return c}}else{var i=Math.sqrt(e),n=.931+2.53*i,s=-.059+.02483*n,o=1.1239+1.1328/(n-3.4),a=.9277-3.6224/(n-2);return function(){for(;;){var l=void 0,c=r.next();if(c<=.86*a)return l=c/a-.43,Math.floor((2*s/(.5-Math.abs(l))+n)*l+e+.445);c>=a?l=r.next()-.5:(l=c/a-.93,l=(l<0?-.5:.5)-l,c=r.next()*a);var d=.5-Math.abs(l);if(!(d<.013&&c>d)){var u=Math.floor((2*s/d+n)*l+e+.445);if(c=c*o/(s/(d*d)+n),u>=10){var h=(u+.5)*Math.log(e/u)-e-i8+u-(.08333333333333333-(.002777777777777778-1/(1260*u*u))/(u*u))/u;if(Math.log(c*i)<=h)return u}else if(u>=0){var f,m=(f=t8(u))!=null?f:0;if(Math.log(c)<=u*Math.log(e)-e-m)return u}}}}}},n8=function(r,e){return e===void 0&&(e=1),jn(e).isPositive(),function(){return-Math.log(1-r.next())/e}},s8=function(r,e){return e===void 0&&(e=1),jn(e).isInt().greaterThanOrEqual(0),function(){for(var t=0,i=0;i0){var s=this.uniformInt(0,n-1)();return i[s]}else return},e._memoize=function(i,n){var s=[].slice.call(arguments,2),o=""+s.join(";"),a=this._cache[i];return(a===void 0||a.key!==o)&&(a={key:o,distribution:n.apply(void 0,[this].concat(s))},this._cache[i]=a),a.distribution},r_(r,[{key:"rng",get:function(){return this._rng}}]),r}();new ek;const A0={capture:!0,passive:!1};function O0(r){r.preventDefault(),r.stopImmediatePropagation()}function c8(r){var e=r.document.documentElement,t=Zn(r).on("dragstart.drag",O0,A0);"onselectstart"in e?t.on("selectstart.drag",O0,A0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function d8(r,e){var t=r.document.documentElement,i=Zn(r).on("dragstart.drag",null);e&&(i.on("click.drag",O0,A0),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in t?i.on("selectstart.drag",null):(t.style.MozUserSelect=t.__noselect,delete t.__noselect)}const $u=r=>()=>r;function u8(r,{sourceEvent:e,target:t,transform:i,dispatch:n}){Object.defineProperties(this,{type:{value:r,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:n}})}function ks(r,e,t){this.k=r,this.x=e,this.y=t}ks.prototype={constructor:ks,scale:function(r){return r===1?this:new ks(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new ks(this.k,this.x+this.k*r,this.y+this.k*e)},apply:function(r){return[r[0]*this.k+this.x,r[1]*this.k+this.y]},applyX:function(r){return r*this.k+this.x},applyY:function(r){return r*this.k+this.y},invert:function(r){return[(r[0]-this.x)/this.k,(r[1]-this.y)/this.k]},invertX:function(r){return(r-this.x)/this.k},invertY:function(r){return(r-this.y)/this.k},rescaleX:function(r){return r.copy().domain(r.range().map(this.invertX,this).map(r.invert,r))},rescaleY:function(r){return r.copy().domain(r.range().map(this.invertY,this).map(r.invert,r))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Uc=new ks(1,0,0);ks.prototype;function Lg(r){r.stopImmediatePropagation()}function Sc(r){r.preventDefault(),r.stopImmediatePropagation()}function h8(r){return(!r.ctrlKey||r.type==="wheel")&&!r.button}function f8(){var r=this;return r instanceof SVGElement?(r=r.ownerSVGElement||r,r.hasAttribute("viewBox")?(r=r.viewBox.baseVal,[[r.x,r.y],[r.x+r.width,r.y+r.height]]):[[0,0],[r.width.baseVal.value,r.height.baseVal.value]]):[[0,0],[r.clientWidth,r.clientHeight]]}function Yw(){return this.__zoom||Uc}function m8(r){return-r.deltaY*(r.deltaMode===1?.05:r.deltaMode?1:.002)*(r.ctrlKey?10:1)}function p8(){return navigator.maxTouchPoints||"ontouchstart"in this}function g8(r,e,t){var i=r.invertX(e[0][0])-t[0][0],n=r.invertX(e[1][0])-t[1][0],s=r.invertY(e[0][1])-t[0][1],o=r.invertY(e[1][1])-t[1][1];return r.translate(n>i?(i+n)/2:Math.min(0,i)||Math.max(0,n),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function v8(){var r=h8,e=f8,t=g8,i=m8,n=p8,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],a=250,l=SR,c=Tf("start","zoom","end"),d,u,h,f=500,m=150,p=0,g=10;function v(k){k.property("__zoom",Yw).on("wheel.zoom",O,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",w).filter(n).on("touchstart.zoom",X).on("touchmove.zoom",H).on("touchend.zoom touchcancel.zoom",Y).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(k,D,M,L){var J=k.selection?k.selection():k;J.property("__zoom",Yw),k!==J?x(k,D,M,L):J.interrupt().each(function(){I(this,arguments).event(L).start().zoom(null,typeof D=="function"?D.apply(this,arguments):D).end()})},v.scaleBy=function(k,D,M,L){v.scaleTo(k,function(){var J=this.__zoom.k,ce=typeof D=="function"?D.apply(this,arguments):D;return J*ce},M,L)},v.scaleTo=function(k,D,M,L){v.transform(k,function(){var J=e.apply(this,arguments),ce=this.__zoom,te=M==null?_(J):typeof M=="function"?M.apply(this,arguments):M,et=ce.invert(te),ot=typeof D=="function"?D.apply(this,arguments):D;return t(S(b(ce,ot),te,et),J,o)},M,L)},v.translateBy=function(k,D,M,L){v.transform(k,function(){return t(this.__zoom.translate(typeof D=="function"?D.apply(this,arguments):D,typeof M=="function"?M.apply(this,arguments):M),e.apply(this,arguments),o)},null,L)},v.translateTo=function(k,D,M,L,J){v.transform(k,function(){var ce=e.apply(this,arguments),te=this.__zoom,et=L==null?_(ce):typeof L=="function"?L.apply(this,arguments):L;return t(Uc.translate(et[0],et[1]).scale(te.k).translate(typeof D=="function"?-D.apply(this,arguments):-D,typeof M=="function"?-M.apply(this,arguments):-M),ce,o)},L,J)};function b(k,D){return D=Math.max(s[0],Math.min(s[1],D)),D===k.k?k:new ks(D,k.x,k.y)}function S(k,D,M){var L=D[0]-M[0]*k.k,J=D[1]-M[1]*k.k;return L===k.x&&J===k.y?k:new ks(k.k,L,J)}function _(k){return[(+k[0][0]+ +k[1][0])/2,(+k[0][1]+ +k[1][1])/2]}function x(k,D,M,L){k.on("start.zoom",function(){I(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){I(this,arguments).event(L).end()}).tween("zoom",function(){var J=this,ce=arguments,te=I(J,ce).event(L),et=e.apply(J,ce),ot=M==null?_(et):typeof M=="function"?M.apply(J,ce):M,Ot=Math.max(et[1][0]-et[0][0],et[1][1]-et[0][1]),gt=J.__zoom,je=typeof D=="function"?D.apply(J,ce):D,At=l(gt.invert(ot).concat(Ot/gt.k),je.invert(ot).concat(Ot/je.k));return function(It){if(It===1)It=je;else{var de=At(It),pe=Ot/de[2];It=new ks(pe,ot[0]-de[0]*pe,ot[1]-de[1]*pe)}te.zoom(null,It)}})}function I(k,D,M){return!M&&k.__zooming||new T(k,D)}function T(k,D){this.that=k,this.args=D,this.active=0,this.sourceEvent=null,this.extent=e.apply(k,D),this.taps=0}T.prototype={event:function(k){return k&&(this.sourceEvent=k),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(k,D){return this.mouse&&k!=="mouse"&&(this.mouse[1]=D.invert(this.mouse[0])),this.touch0&&k!=="touch"&&(this.touch0[1]=D.invert(this.touch0[0])),this.touch1&&k!=="touch"&&(this.touch1[1]=D.invert(this.touch1[0])),this.that.__zoom=D,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(k){var D=Zn(this.that).datum();c.call(k,this.that,new u8(k,{sourceEvent:this.sourceEvent,target:v,type:k,transform:this.that.__zoom,dispatch:c}),D)}};function O(k,...D){if(!r.apply(this,arguments))return;var M=I(this,D).event(k),L=this.__zoom,J=Math.max(s[0],Math.min(s[1],L.k*Math.pow(2,i.apply(this,arguments)))),ce=Ho(k);if(M.wheel)(M.mouse[0][0]!==ce[0]||M.mouse[0][1]!==ce[1])&&(M.mouse[1]=L.invert(M.mouse[0]=ce)),clearTimeout(M.wheel);else{if(L.k===J)return;M.mouse=[ce,L.invert(ce)],_h(this),M.start()}Sc(k),M.wheel=setTimeout(te,m),M.zoom("mouse",t(S(b(L,J),M.mouse[0],M.mouse[1]),M.extent,o));function te(){M.wheel=null,M.end()}}function E(k,...D){if(h||!r.apply(this,arguments))return;var M=k.currentTarget,L=I(this,D,!0).event(k),J=Zn(k.view).on("mousemove.zoom",ot,!0).on("mouseup.zoom",Ot,!0),ce=Ho(k,M),te=k.clientX,et=k.clientY;c8(k.view),Lg(k),L.mouse=[ce,this.__zoom.invert(ce)],_h(this),L.start();function ot(gt){if(Sc(gt),!L.moved){var je=gt.clientX-te,At=gt.clientY-et;L.moved=je*je+At*At>p}L.event(gt).zoom("mouse",t(S(L.that.__zoom,L.mouse[0]=Ho(gt,M),L.mouse[1]),L.extent,o))}function Ot(gt){J.on("mousemove.zoom mouseup.zoom",null),d8(gt.view,L.moved),Sc(gt),L.event(gt).end()}}function w(k,...D){if(r.apply(this,arguments)){var M=this.__zoom,L=Ho(k.changedTouches?k.changedTouches[0]:k,this),J=M.invert(L),ce=M.k*(k.shiftKey?.5:2),te=t(S(b(M,ce),L,J),e.apply(this,D),o);Sc(k),a>0?Zn(this).transition().duration(a).call(x,te,L,k):Zn(this).call(v.transform,te,L,k)}}function X(k,...D){if(r.apply(this,arguments)){var M=k.touches,L=M.length,J=I(this,D,k.changedTouches.length===L).event(k),ce,te,et,ot;for(Lg(k),te=0;tetypeof r=="function",ok=r=>Array.isArray(r),S8=r=>r instanceof Object,T8=r=>r instanceof Object?r.constructor.name!=="Function"&&r.constructor.name!=="Object":!1,Zw=r=>S8(r)&&!ok(r)&&!sk(r)&&!T8(r);function Hc(r,e,t){return sk(e)?e(r,t):e}function Rl(r){var e;let t;if(ok(r))t=r;else{const i=Ps(r),n=i==null?void 0:i.rgb();t=[(n==null?void 0:n.r)||0,(n==null?void 0:n.g)||0,(n==null?void 0:n.b)||0,(e=i==null?void 0:i.opacity)!==null&&e!==void 0?e:1]}return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function uo(r,e){let t=new Float32Array;return r({framebuffer:e})(()=>{t=r.read()}),t}function C8(r,e,t){return Math.min(Math.max(r,e),t)}class k8{constructor(){this.disableSimulation=Ut.disableSimulation,this.backgroundColor=b8,this.spaceSize=Ut.spaceSize,this.nodeColor=tk,this.nodeGreyoutOpacity=_8,this.nodeSize=ik,this.nodeSizeScale=Ut.nodeSizeScale,this.renderHighlightedNodeRing=!0,this.highlightedNodeRingColor=void 0,this.renderHoveredNodeRing=!0,this.hoveredNodeRingColor=Ut.hoveredNodeRingColor,this.focusedNodeRingColor=Ut.focusedNodeRingColor,this.linkColor=rk,this.linkGreyoutOpacity=y8,this.linkWidth=nk,this.linkWidthScale=Ut.linkWidthScale,this.renderLinks=Ut.renderLinks,this.curvedLinks=Ut.curvedLinks,this.curvedLinkSegments=Ut.curvedLinkSegments,this.curvedLinkWeight=Ut.curvedLinkWeight,this.curvedLinkControlPointDistance=Ut.curvedLinkControlPointDistance,this.linkArrows=Ut.arrowLinks,this.linkArrowsSizeScale=Ut.arrowSizeScale,this.linkVisibilityDistanceRange=Ut.linkVisibilityDistanceRange,this.linkVisibilityMinTransparency=Ut.linkVisibilityMinTransparency,this.useQuadtree=Ut.useQuadtree,this.simulation={decay:Ut.simulation.decay,gravity:Ut.simulation.gravity,center:Ut.simulation.center,repulsion:Ut.simulation.repulsion,repulsionTheta:Ut.simulation.repulsionTheta,repulsionQuadtreeLevels:Ut.simulation.repulsionQuadtreeLevels,linkSpring:Ut.simulation.linkSpring,linkDistance:Ut.simulation.linkDistance,linkDistRandomVariationRange:Ut.simulation.linkDistRandomVariationRange,repulsionFromMouse:Ut.simulation.repulsionFromMouse,friction:Ut.simulation.friction,onStart:void 0,onTick:void 0,onEnd:void 0,onPause:void 0,onRestart:void 0},this.events={onClick:void 0,onMouseMove:void 0,onNodeMouseOver:void 0,onNodeMouseOut:void 0,onZoomStart:void 0,onZoom:void 0,onZoomEnd:void 0},this.showFPSMonitor=Ut.showFPSMonitor,this.pixelRatio=Ut.pixelRatio,this.scaleNodesOnZoom=Ut.scaleNodesOnZoom,this.initialZoomLevel=void 0,this.disableZoom=Ut.disableZoom,this.fitViewOnInit=Ut.fitViewOnInit,this.fitViewDelay=Ut.fitViewDelay,this.fitViewByNodesInRect=void 0,this.randomSeed=void 0,this.nodeSamplingDistance=Ut.nodeSamplingDistance}init(e){Object.keys(e).forEach(t=>{this.deepMergeConfig(this.getConfig(),e,t)})}deepMergeConfig(e,t,i){Zw(e[i])&&Zw(t[i])?Object.keys(t[i]).forEach(n=>{this.deepMergeConfig(e[i],t[i],n)}):e[i]=t[i]}getConfig(){return this}}class ko{constructor(e,t,i,n,s){this.reglInstance=e,this.config=t,this.store=i,this.data=n,s&&(this.points=s)}}var E8=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +varying vec4 rgba;void main(){gl_FragColor=rgba;}`,A8=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform float pointsTextureSize;attribute vec2 indexes;varying vec4 rgba;void main(){vec4 pointPosition=texture2D(position,indexes/pointsTextureSize);rgba=vec4(pointPosition.xy,1.0,0.0);gl_Position=vec4(0.0,0.0,0.0,1.0);gl_PointSize=1.0;}`,O8=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform sampler2D centermass;uniform float center;uniform float alpha;varying vec2 index;void main(){vec4 pointPosition=texture2D(position,index);vec4 velocity=vec4(0.0);vec4 centermassValues=texture2D(centermass,vec2(0.0));vec2 centermassPosition=centermassValues.xy/centermassValues.b;vec2 distVector=centermassPosition-pointPosition.xy;float dist=sqrt(dot(distVector,distVector));if(dist>0.0){float angle=atan(distVector.y,distVector.x);float addV=alpha*center*dist*0.01;velocity.rg+=addV*vec2(cos(angle),sin(angle));}gl_FragColor=velocity;}`;function Sr(r){return{buffer:r.buffer(new Float32Array([-1,-1,1,-1,-1,1,1,1])),size:2}}function vl(r,e){const t=new Float32Array(e*e*2);for(let n=0;nthis.centermassFbo,primitive:"points",count:()=>n.nodes.length,attributes:{indexes:vl(e,i.pointsTextureSize)},uniforms:{position:()=>s==null?void 0:s.previousPositionFbo,pointsTextureSize:()=>i.pointsTextureSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.runCommand=e({frag:O8,vert:Lr,framebuffer:()=>s==null?void 0:s.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Sr(e)},uniforms:{position:()=>s==null?void 0:s.previousPositionFbo,centermass:()=>this.centermassFbo,center:()=>{var o;return(o=t.simulation)===null||o===void 0?void 0:o.center},alpha:()=>i.alpha}})}run(){var e,t,i;(e=this.clearCentermassCommand)===null||e===void 0||e.call(this),(t=this.calculateCentermassCommand)===null||t===void 0||t.call(this),(i=this.runCommand)===null||i===void 0||i.call(this)}destroy(){Hi(this.centermassFbo)}}var L8=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform float gravity;uniform float spaceSize;uniform float alpha;varying vec2 index;void main(){vec4 pointPosition=texture2D(position,index);vec4 velocity=vec4(0.0);vec2 centerPosition=vec2(spaceSize/2.0);vec2 distVector=centerPosition-pointPosition.rg;float dist=sqrt(dot(distVector,distVector));if(dist>0.0){float angle=atan(distVector.y,distVector.x);float addV=alpha*gravity*dist*0.1;velocity.rg+=addV*vec2(cos(angle),sin(angle));}gl_FragColor=velocity;}`;class P8 extends ko{initPrograms(){const{reglInstance:e,config:t,store:i,points:n}=this;this.runCommand=e({frag:L8,vert:Lr,framebuffer:()=>n==null?void 0:n.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Sr(e)},uniforms:{position:()=>n==null?void 0:n.previousPositionFbo,gravity:()=>{var s;return(s=t.simulation)===null||s===void 0?void 0:s.gravity},spaceSize:()=>i.adjustedSpaceSize,alpha:()=>i.alpha}})}run(){var e;(e=this.runCommand)===null||e===void 0||e.call(this)}}function D8(r){return` +#ifdef GL_ES +precision highp float; +#endif + +uniform sampler2D position; +uniform float linkSpring; +uniform float linkDistance; +uniform vec2 linkDistRandomVariationRange; + +uniform sampler2D linkFirstIndicesAndAmount; +uniform sampler2D linkIndices; +uniform sampler2D linkBiasAndStrength; +uniform sampler2D linkRandomDistanceFbo; + +uniform float pointsTextureSize; +uniform float linksTextureSize; +uniform float alpha; + +varying vec2 index; + +const float MAX_LINKS = ${r}.0; + +void main() { + vec4 pointPosition = texture2D(position, index); + vec4 velocity = vec4(0.0); + + vec4 linkFirstIJAndAmount = texture2D(linkFirstIndicesAndAmount, index); + float iCount = linkFirstIJAndAmount.r; + float jCount = linkFirstIJAndAmount.g; + float linkAmount = linkFirstIJAndAmount.b; + if (linkAmount > 0.0) { + for (float i = 0.0; i < MAX_LINKS; i += 1.0) { + if (i < linkAmount) { + if (iCount >= linksTextureSize) { + iCount = 0.0; + jCount += 1.0; + } + vec2 linkTextureIndex = (vec2(iCount, jCount) + 0.5) / linksTextureSize; + vec4 connectedPointIndex = texture2D(linkIndices, linkTextureIndex); + vec4 biasAndStrength = texture2D(linkBiasAndStrength, linkTextureIndex); + vec4 randomMinDistance = texture2D(linkRandomDistanceFbo, linkTextureIndex); + float bias = biasAndStrength.r; + float strength = biasAndStrength.g; + float randomMinLinkDist = randomMinDistance.r * (linkDistRandomVariationRange.g - linkDistRandomVariationRange.r) + linkDistRandomVariationRange.r; + randomMinLinkDist *= linkDistance; + + iCount += 1.0; + + vec4 connectedPointPosition = texture2D(position, (connectedPointIndex.rg + 0.5) / pointsTextureSize); + float x = connectedPointPosition.x - (pointPosition.x + velocity.x); + float y = connectedPointPosition.y - (pointPosition.y + velocity.y); + float l = sqrt(x * x + y * y); + l = max(l, randomMinLinkDist * 0.99); + l = (l - randomMinLinkDist) / l; + l *= linkSpring * alpha; + l *= strength; + l *= bias; + x *= l; + y *= l; + velocity.x += x; + velocity.y += y; + } + } + } + + gl_FragColor = vec4(velocity.rg, 0.0, 0.0); +} + `}var ad;(function(r){r.OUTGOING="outgoing",r.INCOMING="incoming"})(ad||(ad={}));class Kw extends ko{constructor(){super(...arguments),this.linkFirstIndicesAndAmount=new Float32Array,this.indices=new Float32Array,this.maxPointDegree=0}create(e){const{reglInstance:t,store:{pointsTextureSize:i,linksTextureSize:n},data:s}=this;if(!i||!n)return;this.linkFirstIndicesAndAmount=new Float32Array(i*i*4),this.indices=new Float32Array(n*n*4);const o=new Float32Array(n*n*4),a=new Float32Array(n*n*4),l=e===ad.INCOMING?s.groupedSourceToTargetLinks:s.groupedTargetToSourceLinks;this.maxPointDegree=0;let c=0;l.forEach((d,u)=>{this.linkFirstIndicesAndAmount[u*4+0]=c%n,this.linkFirstIndicesAndAmount[u*4+1]=Math.floor(c/n),this.linkFirstIndicesAndAmount[u*4+2]=d.size,d.forEach(h=>{var f,m;this.indices[c*4+0]=h%i,this.indices[c*4+1]=Math.floor(h/i);const p=(f=s.degree[s.getInputIndexBySortedIndex(h)])!==null&&f!==void 0?f:0,g=(m=s.degree[s.getInputIndexBySortedIndex(u)])!==null&&m!==void 0?m:0,v=p/(p+g);let b=1/Math.min(p,g);b=Math.sqrt(b),o[c*4+0]=v,o[c*4+1]=b,a[c*4]=this.store.getRandomFloat(0,1),c+=1}),this.maxPointDegree=Math.max(this.maxPointDegree,d.size)}),this.linkFirstIndicesAndAmountFbo=t.framebuffer({color:t.texture({data:this.linkFirstIndicesAndAmount,shape:[i,i,4],type:"float"}),depth:!1,stencil:!1}),this.indicesFbo=t.framebuffer({color:t.texture({data:this.indices,shape:[n,n,4],type:"float"}),depth:!1,stencil:!1}),this.biasAndStrengthFbo=t.framebuffer({color:t.texture({data:o,shape:[n,n,4],type:"float"}),depth:!1,stencil:!1}),this.randomDistanceFbo=t.framebuffer({color:t.texture({data:a,shape:[n,n,4],type:"float"}),depth:!1,stencil:!1})}initPrograms(){const{reglInstance:e,config:t,store:i,points:n}=this;this.runCommand=e({frag:()=>D8(this.maxPointDegree),vert:Lr,framebuffer:()=>n==null?void 0:n.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Sr(e)},uniforms:{position:()=>n==null?void 0:n.previousPositionFbo,linkSpring:()=>{var s;return(s=t.simulation)===null||s===void 0?void 0:s.linkSpring},linkDistance:()=>{var s;return(s=t.simulation)===null||s===void 0?void 0:s.linkDistance},linkDistRandomVariationRange:()=>{var s;return(s=t.simulation)===null||s===void 0?void 0:s.linkDistRandomVariationRange},linkFirstIndicesAndAmount:()=>this.linkFirstIndicesAndAmountFbo,linkIndices:()=>this.indicesFbo,linkBiasAndStrength:()=>this.biasAndStrengthFbo,linkRandomDistanceFbo:()=>this.randomDistanceFbo,pointsTextureSize:()=>i.pointsTextureSize,linksTextureSize:()=>i.linksTextureSize,alpha:()=>i.alpha}})}run(){var e;(e=this.runCommand)===null||e===void 0||e.call(this)}destroy(){Hi(this.linkFirstIndicesAndAmountFbo),Hi(this.indicesFbo),Hi(this.biasAndStrengthFbo),Hi(this.randomDistanceFbo)}}var ak=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +varying vec4 rgba;void main(){gl_FragColor=rgba;}`,lk=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform float pointsTextureSize;uniform float levelTextureSize;uniform float cellSize;attribute vec2 indexes;varying vec4 rgba;void main(){vec4 pointPosition=texture2D(position,indexes/pointsTextureSize);rgba=vec4(pointPosition.rg,1.0,0.0);float n=floor(pointPosition.x/cellSize);float m=floor(pointPosition.y/cellSize);vec2 levelPosition=2.0*(vec2(n,m)+0.5)/levelTextureSize-1.0;gl_Position=vec4(levelPosition,0.0,1.0);gl_PointSize=1.0;}`,M8=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform sampler2D levelFbo;uniform float level;uniform float levels;uniform float levelTextureSize;uniform float repulsion;uniform float alpha;uniform float spaceSize;uniform float theta;varying vec2 index;const float MAX_LEVELS_NUM=14.0;vec2 calcAdd(vec2 ij,vec2 pp){vec2 add=vec2(0.0);vec4 centermass=texture2D(levelFbo,ij);if(centermass.r>0.0&¢ermass.g>0.0&¢ermass.b>0.0){vec2 centermassPosition=vec2(centermass.rg/centermass.b);vec2 distVector=pp-centermassPosition;float l=dot(distVector,distVector);float dist=sqrt(l);if(l>0.0){float angle=atan(distVector.y,distVector.x);float c=alpha*repulsion*centermass.b;float distanceMin2=1.0;if(l0.0&¢ermass.g>0.0&¢ermass.b>0.0){vec2 centermassPosition=vec2(centermass.rg/centermass.b);vec2 distVector=pp-centermassPosition;float l=dot(distVector,distVector);float dist=sqrt(l);if(l>0.0){float angle=atan(distVector.y,distVector.x);float c=alpha*repulsion*centermass.b;float distanceMin2=1.0;if(la.levelFbo,primitive:"triangle strip",count:4,attributes:{quad:Sr(e)}}),this.calculateLevelsCommand=e({frag:ak,vert:lk,framebuffer:(o,a)=>a.levelFbo,primitive:"points",count:()=>n.nodes.length,attributes:{indexes:vl(e,i.pointsTextureSize)},uniforms:{position:()=>s==null?void 0:s.previousPositionFbo,pointsTextureSize:()=>i.pointsTextureSize,levelTextureSize:(o,a)=>a.levelTextureSize,cellSize:(o,a)=>a.cellSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.forceCommand=e({frag:M8,vert:Lr,framebuffer:()=>s==null?void 0:s.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Sr(e)},uniforms:{position:()=>s==null?void 0:s.previousPositionFbo,level:(o,a)=>a.level,levels:this.quadtreeLevels,levelFbo:(o,a)=>a.levelFbo,levelTextureSize:(o,a)=>a.levelTextureSize,alpha:()=>i.alpha,repulsion:()=>{var o;return(o=t.simulation)===null||o===void 0?void 0:o.repulsion},spaceSize:()=>i.adjustedSpaceSize,theta:()=>{var o;return(o=t.simulation)===null||o===void 0?void 0:o.repulsionTheta}},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.forceFromItsOwnCentermassCommand=e({frag:R8,vert:Lr,framebuffer:()=>s==null?void 0:s.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Sr(e)},uniforms:{position:()=>s==null?void 0:s.previousPositionFbo,randomValues:()=>this.randomValuesFbo,levelFbo:(o,a)=>a.levelFbo,levelTextureSize:(o,a)=>a.levelTextureSize,alpha:()=>i.alpha,repulsion:()=>{var o;return(o=t.simulation)===null||o===void 0?void 0:o.repulsion},spaceSize:()=>i.adjustedSpaceSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.clearVelocityCommand=e({frag:Fl,vert:Lr,framebuffer:()=>s==null?void 0:s.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Sr(e)}})}run(){var e,t,i,n,s;const{store:o}=this;for(let a=0;a{Hi(e)}),this.levelsFbos.clear()}}function N8(r,e){r=Math.min(r,e);const t=e-r,i=` + float dist = sqrt(l); + if (dist > 0.0) { + float c = alpha * repulsion * centermass.b; + addVelocity += calcAdd(vec2(x, y), l, c); + addVelocity += addVelocity * random.rg; + } + `;function n(s){if(s>=e)return i;{const o=Math.pow(2,s+1),a=new Array(s+1-t).fill(0).map((c,d)=>`pow(2.0, ${s-(d+t)}.0) * i${d+t}`).join("+"),l=new Array(s+1-t).fill(0).map((c,d)=>`pow(2.0, ${s-(d+t)}.0) * j${d+t}`).join("+");return` + for (float ij${s} = 0.0; ij${s} < 4.0; ij${s} += 1.0) { + float i${s} = 0.0; + float j${s} = 0.0; + if (ij${s} == 1.0 || ij${s} == 3.0) i${s} = 1.0; + if (ij${s} == 2.0 || ij${s} == 3.0) j${s} = 1.0; + float i = pow(2.0, ${r}.0) * n / width${s+1} + ${a}; + float j = pow(2.0, ${r}.0) * m / width${s+1} + ${l}; + float groupPosX = (i + 0.5) / ${o}.0; + float groupPosY = (j + 0.5) / ${o}.0; + + vec4 centermass = texture2D(level[${s}], vec2(groupPosX, groupPosY)); + if (centermass.r > 0.0 && centermass.g > 0.0 && centermass.b > 0.0) { + float x = centermass.r / centermass.b - pointPosition.r; + float y = centermass.g / centermass.b - pointPosition.g; + float l = x * x + y * y; + if ((width${s+1} * width${s+1}) / theta < l) { + ${i} + } else { + ${n(s+1)} + } + } + } + `}}return` +#ifdef GL_ES +precision highp float; +#endif + +uniform sampler2D position; +uniform sampler2D randomValues; +uniform float spaceSize; +uniform float repulsion; +uniform float theta; +uniform float alpha; +uniform sampler2D level[${e}]; +varying vec2 index; + +vec2 calcAdd(vec2 xy, float l, float c) { + float distanceMin2 = 1.0; + if (l < distanceMin2) l = sqrt(distanceMin2 * l); + float add = c / l; + return add * xy; +} + +void main() { + vec4 pointPosition = texture2D(position, index); + vec4 random = texture2D(randomValues, index); + + float width0 = spaceSize; + + vec2 velocity = vec2(0.0); + vec2 addVelocity = vec2(0.0); + + ${new Array(e).fill(0).map((s,o)=>`float width${o+1} = width${o} / 2.0;`).join(` +`)} + + for (float n = 0.0; n < pow(2.0, ${t}.0); n += 1.0) { + for (float m = 0.0; m < pow(2.0, ${t}.0); m += 1.0) { + ${n(t)} + } + } + + velocity -= addVelocity; + + gl_FragColor = vec4(velocity, 0.0, 0.0); +} +`}class z8 extends ko{constructor(){super(...arguments),this.levelsFbos=new Map,this.quadtreeLevels=0}create(){const{reglInstance:e,store:t}=this;if(!t.pointsTextureSize)return;this.quadtreeLevels=Math.log2(t.adjustedSpaceSize);for(let n=0;nc.levelFbo,primitive:"triangle strip",count:4,attributes:{quad:Sr(i)}}),this.calculateLevelsCommand=i({frag:ak,vert:lk,framebuffer:(l,c)=>c.levelFbo,primitive:"points",count:()=>o.nodes.length,attributes:{indexes:vl(i,s.pointsTextureSize)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,pointsTextureSize:()=>s.pointsTextureSize,levelTextureSize:(l,c)=>c.levelTextureSize,cellSize:(l,c)=>c.cellSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.quadtreeCommand=i({frag:N8((t=(e=n.simulation)===null||e===void 0?void 0:e.repulsionQuadtreeLevels)!==null&&t!==void 0?t:this.quadtreeLevels,this.quadtreeLevels),vert:Lr,framebuffer:()=>a==null?void 0:a.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Sr(i)},uniforms:Ui({position:()=>a==null?void 0:a.previousPositionFbo,randomValues:()=>this.randomValuesFbo,spaceSize:()=>s.adjustedSpaceSize,repulsion:()=>{var l;return(l=n.simulation)===null||l===void 0?void 0:l.repulsion},theta:()=>{var l;return(l=n.simulation)===null||l===void 0?void 0:l.repulsionTheta},alpha:()=>s.alpha},Object.fromEntries(this.levelsFbos))})}run(){var e,t,i;const{store:n}=this;for(let s=0;s{Hi(e)}),this.levelsFbos.clear()}}var B8=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform float repulsion;uniform vec2 mousePos;varying vec2 index;void main(){vec4 pointPosition=texture2D(position,index);vec4 velocity=vec4(0.0);vec2 mouse=mousePos;vec2 distVector=mouse-pointPosition.rg;float dist=sqrt(dot(distVector,distVector));dist=max(dist,10.0);float angle=atan(distVector.y,distVector.x);float addV=100.0*repulsion/(dist*dist);velocity.rg-=addV*vec2(cos(angle),sin(angle));gl_FragColor=velocity;}`;class j8 extends ko{initPrograms(){const{reglInstance:e,config:t,store:i,points:n}=this;this.runCommand=e({frag:B8,vert:Lr,framebuffer:()=>n==null?void 0:n.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:Sr(e)},uniforms:{position:()=>n==null?void 0:n.previousPositionFbo,mousePos:()=>i.mousePosition,repulsion:()=>{var s;return(s=t.simulation)===null||s===void 0?void 0:s.repulsionFromMouse}}})}run(){var e;(e=this.runCommand)===null||e===void 0||e.call(this)}}var G8=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ck={exports:{}};(function(r,e){(function(t,i){r.exports=i()})(G8,function(){var t=`
    + + 00 FPS + + + + + + + + + + + + + + +
    `,i=`#gl-bench { + position:absolute; + left:0; + top:0; + z-index:1000; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} + +#gl-bench div { + position: relative; + display: block; + margin: 4px; + padding: 0 7px 0 10px; + background: #6c6; + border-radius: 15px; + cursor: pointer; + opacity: 0.9; +} + +#gl-bench svg { + height: 60px; + margin: 0 -1px; +} + +#gl-bench text { + font-size: 12px; + font-family: Helvetica,Arial,sans-serif; + font-weight: 700; + dominant-baseline: middle; + text-anchor: middle; +} + +#gl-bench .gl-mem { + font-size: 9px; +} + +#gl-bench line { + stroke-width: 5; + stroke: #112211; + stroke-linecap: round; +} + +#gl-bench polyline { + fill: none; + stroke: #112211; + stroke-linecap: round; + stroke-linejoin: round; + stroke-width: 3.5; +} + +#gl-bench rect { + fill: #448844; +} + +#gl-bench .opacity { + stroke: #448844; +} +`;class n{constructor(o,a={}){this.css=i,this.svg=t,this.paramLogger=()=>{},this.chartLogger=()=>{},this.chartLen=20,this.chartHz=20,this.names=[],this.cpuAccums=[],this.gpuAccums=[],this.activeAccums=[],this.chart=new Array(this.chartLen),this.now=()=>performance&&performance.now?performance.now():Date.now(),this.updateUI=()=>{[].forEach.call(this.nodes["gl-gpu-svg"],h=>{h.style.display=this.trackGPU?"inline":"none"})},Object.assign(this,a),this.detected=0,this.finished=[],this.isFramebuffer=0,this.frameId=0;let l,c=0,d,u=h=>{++c<20?l=requestAnimationFrame(u):(this.detected=Math.ceil(1e3*c/(h-d)/70),cancelAnimationFrame(l)),d||(d=h)};if(requestAnimationFrame(u),o){const h=(m,p)=>le(this,null,function*(){return Promise.resolve(setTimeout(()=>{o.getError();const g=this.now()-m;p.forEach((v,b)=>{v&&(this.gpuAccums[b]+=g)})},0))}),f=(m,p,g)=>function(){const v=p.now();m.apply(g,arguments),p.trackGPU&&p.finished.push(h(v,p.activeAccums.slice(0)))};["drawArrays","drawElements","drawArraysInstanced","drawBuffers","drawElementsInstanced","drawRangeElements"].forEach(m=>{o[m]&&(o[m]=f(o[m],this,o))}),o.getExtension=((m,p)=>function(){let g=m.apply(o,arguments);return g&&["drawElementsInstancedANGLE","drawBuffersWEBGL"].forEach(v=>{g[v]&&(g[v]=f(g[v],p,g))}),g})(o.getExtension,this)}if(!this.withoutUI){this.dom||(this.dom=document.body);let h=document.createElement("div");h.id="gl-bench",this.dom.appendChild(h),this.dom.insertAdjacentHTML("afterbegin",'"),this.dom=h,this.dom.addEventListener("click",()=>{this.trackGPU=!this.trackGPU,this.updateUI()}),this.paramLogger=((f,m,p)=>{const g=["gl-cpu","gl-gpu","gl-mem","gl-fps","gl-gpu-svg","gl-chart"],v=Object.assign({},g);return g.forEach(b=>v[b]=m.getElementsByClassName(b)),this.nodes=v,(b,S,_,x,I,T,O)=>{v["gl-cpu"][b].style.strokeDasharray=(S*.27).toFixed(0)+" 100",v["gl-gpu"][b].style.strokeDasharray=(_*.27).toFixed(0)+" 100",v["gl-mem"][b].innerHTML=p[b]?p[b]:x?"mem: "+x.toFixed(0)+"mb":"",v["gl-fps"][b].innerHTML=I.toFixed(0)+" FPS",f(p[b],S,_,x,I,T,O)}})(this.paramLogger,this.dom,this.names),this.chartLogger=((f,m)=>{let p={"gl-chart":m.getElementsByClassName("gl-chart")};return(g,v,b)=>{let S="",_=v.length;for(let x=0;x<_;x++){let I=(b+x+1)%_;v[I]!=null&&(S=S+" "+(55*x/(_-1)).toFixed(1)+","+(45-v[I]*22/60/this.detected).toFixed(1))}p["gl-chart"][g].setAttribute("points",S),f(this.names[g],v,b)}})(this.chartLogger,this.dom)}}addUI(o){this.names.indexOf(o)==-1&&(this.names.push(o),this.dom&&(this.dom.insertAdjacentHTML("beforeend",this.svg),this.updateUI()),this.cpuAccums.push(0),this.gpuAccums.push(0),this.activeAccums.push(!1))}nextFrame(o){this.frameId++;const a=o||this.now();if(this.frameId<=1)this.paramFrame=this.frameId,this.paramTime=a;else{let l=a-this.paramTime;if(l>=1e3){const c=this.frameId-this.paramFrame,d=c/l*1e3;for(let u=0;u{this.gpuAccums[u]=0,this.finished=[]})}this.paramFrame=this.frameId,this.paramTime=a}}if(!this.detected||!this.chartFrame)this.chartFrame=this.frameId,this.chartTime=a,this.circularId=0;else{let l=a-this.chartTime,c=this.chartHz*l/1e3;for(;--c>0&&this.detected;){const u=(this.frameId-this.chartFrame)/l*1e3;this.chart[this.circularId%this.chartLen]=u;for(let h=0;h{this.idToNodeMap.set(n.id,n),this.inputIndexToIdMap.set(s,n.id),this.idToIndegreeMap.set(n.id,0),this.idToOutdegreeMap.set(n.id,0)}),this.completeLinks.clear(),t.forEach(n=>{const s=this.idToNodeMap.get(n.source),o=this.idToNodeMap.get(n.target);if(s!==void 0&&o!==void 0){this.completeLinks.add(n);const a=this.idToOutdegreeMap.get(s.id);a!==void 0&&this.idToOutdegreeMap.set(s.id,a+1);const l=this.idToIndegreeMap.get(o.id);l!==void 0&&this.idToIndegreeMap.set(o.id,l+1)}}),this.degree=new Array(e.length),e.forEach((n,s)=>{const o=this.idToOutdegreeMap.get(n.id),a=this.idToIndegreeMap.get(n.id);this.degree[s]=(o!=null?o:0)+(a!=null?a:0)}),this.sortedIndexToInputIndexMap.clear(),this.inputIndexToSortedIndexMap.clear(),Object.entries(this.degree).sort((n,s)=>n[1]-s[1]).forEach(([n],s)=>{const o=+n;this.sortedIndexToInputIndexMap.set(s,o),this.inputIndexToSortedIndexMap.set(o,s),this.idToSortedIndexMap.set(this.inputIndexToIdMap.get(o),s)}),this.groupedSourceToTargetLinks.clear(),this.groupedTargetToSourceLinks.clear(),t.forEach(n=>{const s=this.idToSortedIndexMap.get(n.source),o=this.idToSortedIndexMap.get(n.target);if(s!==void 0&&o!==void 0){this.groupedSourceToTargetLinks.get(s)===void 0&&this.groupedSourceToTargetLinks.set(s,new Set);const a=this.groupedSourceToTargetLinks.get(s);a==null||a.add(o),this.groupedTargetToSourceLinks.get(o)===void 0&&this.groupedTargetToSourceLinks.set(o,new Set);const l=this.groupedTargetToSourceLinks.get(o);l==null||l.add(s)}}),this._nodes=e,this._links=t}getNodeById(e){return this.idToNodeMap.get(e)}getNodeByIndex(e){return this._nodes[e]}getSortedIndexByInputIndex(e){return this.inputIndexToSortedIndexMap.get(e)}getInputIndexBySortedIndex(e){return this.sortedIndexToInputIndexMap.get(e)}getSortedIndexById(e){return e!==void 0?this.idToSortedIndexMap.get(e):void 0}getInputIndexById(e){if(e===void 0)return;const t=this.getSortedIndexById(e);if(t!==void 0)return this.getInputIndexBySortedIndex(t)}getAdjacentNodes(e){var t,i;const n=this.getSortedIndexById(e);if(n===void 0)return;const s=(t=this.groupedSourceToTargetLinks.get(n))!==null&&t!==void 0?t:[],o=(i=this.groupedTargetToSourceLinks.get(n))!==null&&i!==void 0?i:[];return[...new Set([...s,...o])].map(a=>this.getNodeByIndex(this.getInputIndexBySortedIndex(a)))}}var X8=`precision highp float; +#define GLSLIFY 1 +varying vec4 rgbaColor;varying vec2 pos;varying float arrowLength;varying float linkWidthArrowWidthRatio;varying float smoothWidthRatio;varying float useArrow;float map(float value,float min1,float max1,float min2,float max2){return min2+(value-min1)*(max2-min2)/(max1-min1);}void main(){float opacity=1.0;vec3 color=rgbaColor.rgb;float smoothDelta=smoothWidthRatio/2.0;if(useArrow>0.5){float end_arrow=0.5+arrowLength/2.0;float start_arrow=end_arrow-arrowLength;float arrowWidthDelta=linkWidthArrowWidthRatio/2.0;float linkOpacity=rgbaColor.a*smoothstep(0.5-arrowWidthDelta,0.5-arrowWidthDelta-smoothDelta,abs(pos.y));float arrowOpacity=1.0;if(pos.x>start_arrow&&pos.x0.5){linkWidth+=arrowExtraWidth;}smoothWidthRatio=smoothWidth/linkWidth;linkWidthArrowWidthRatio=arrowExtraWidth/linkWidth;float linkWidthPx=linkWidth/transform[0][0];vec3 rgbColor=color.rgb;float opacity=color.a*max(linkVisibilityMinTransparency,map(linkDistPx,linkVisibilityDistanceRange.g,linkVisibilityDistanceRange.r,0.0,1.0));if(greyoutStatusA.r>0.0||greyoutStatusB.r>0.0){opacity*=greyoutOpacity;}rgbaColor=vec4(rgbColor,opacity);float t=position.x;float w=curvedWeight;float tPrev=t-1.0/curvedLinkSegments;float tNext=t+1.0/curvedLinkSegments;vec2 pointCurr=conicParametricCurve(a,b,controlPoint,t,w);vec2 pointPrev=conicParametricCurve(a,b,controlPoint,max(0.0,tPrev),w);vec2 pointNext=conicParametricCurve(a,b,controlPoint,min(tNext,1.0),w);vec2 xBasisCurved=pointNext-pointPrev;vec2 yBasisCurved=normalize(vec2(-xBasisCurved.y,xBasisCurved.x));pointCurr+=yBasisCurved*linkWidthPx*position.y;vec2 p=2.0*pointCurr/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);gl_Position=vec4(final.rg,0,1);}`;const Y8=r=>{const e=HC().exponent(2).range([0,1]).domain([-1,1]),t=VF(0,r).map(n=>-.5+n/r);t.push(.5);const i=new Array(t.length*2);return t.forEach((n,s)=>{i[s*2]=[e(n*2),.5],i[s*2+1]=[e(n*2),-.5]}),i};class q8 extends ko{create(){this.updateColor(),this.updateWidth(),this.updateArrow(),this.updateCurveLineGeometry()}initPrograms(){const{reglInstance:e,config:t,store:i,data:n,points:s}=this,{pointsTextureSize:o}=i,a=[];n.completeLinks.forEach(c=>{const d=n.getSortedIndexById(c.target),u=n.getSortedIndexById(c.source),h=u%o,f=Math.floor(u/o),m=d%o,p=Math.floor(d/o);a.push([h,f]),a.push([m,p])});const l=e.buffer(a);this.drawCurveCommand=e({vert:W8,frag:X8,attributes:{position:{buffer:()=>this.curveLineBuffer,divisor:0},pointA:{buffer:()=>l,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*0,stride:Float32Array.BYTES_PER_ELEMENT*4},pointB:{buffer:()=>l,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*2,stride:Float32Array.BYTES_PER_ELEMENT*4},color:{buffer:()=>this.colorBuffer,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*0,stride:Float32Array.BYTES_PER_ELEMENT*4},width:{buffer:()=>this.widthBuffer,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*0,stride:Float32Array.BYTES_PER_ELEMENT*1},arrow:{buffer:()=>this.arrowBuffer,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*0,stride:Float32Array.BYTES_PER_ELEMENT*1}},uniforms:{positions:()=>s==null?void 0:s.currentPositionFbo,particleGreyoutStatus:()=>s==null?void 0:s.greyoutStatusFbo,transform:()=>i.transform,pointsTextureSize:()=>i.pointsTextureSize,nodeSizeScale:()=>t.nodeSizeScale,widthScale:()=>t.linkWidthScale,arrowSizeScale:()=>t.linkArrowsSizeScale,spaceSize:()=>i.adjustedSpaceSize,screenSize:()=>i.screenSize,ratio:()=>t.pixelRatio,linkVisibilityDistanceRange:()=>t.linkVisibilityDistanceRange,linkVisibilityMinTransparency:()=>t.linkVisibilityMinTransparency,greyoutOpacity:()=>t.linkGreyoutOpacity,scaleNodesOnZoom:()=>t.scaleNodesOnZoom,curvedWeight:()=>t.curvedLinkWeight,curvedLinkControlPointDistance:()=>t.curvedLinkControlPointDistance,curvedLinkSegments:()=>{var c;return t.curvedLinks?(c=t.curvedLinkSegments)!==null&&c!==void 0?c:Ut.curvedLinkSegments:1}},cull:{enable:!0,face:"back"},blend:{enable:!0,func:{dstRGB:"one minus src alpha",srcRGB:"src alpha",dstAlpha:"one minus src alpha",srcAlpha:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},count:()=>{var c,d;return(d=(c=this.curveLineGeometry)===null||c===void 0?void 0:c.length)!==null&&d!==void 0?d:0},instances:()=>n.linksNumber,primitive:"triangle strip"})}draw(){var e;!this.colorBuffer||!this.widthBuffer||!this.curveLineBuffer||(e=this.drawCurveCommand)===null||e===void 0||e.call(this)}updateColor(){const{reglInstance:e,config:t,data:i}=this,n=[];i.completeLinks.forEach(s=>{var o;const a=(o=Hc(s,t.linkColor))!==null&&o!==void 0?o:rk,l=Rl(a);n.push(l)}),this.colorBuffer=e.buffer(n)}updateWidth(){const{reglInstance:e,config:t,data:i}=this,n=[];i.completeLinks.forEach(s=>{const o=Hc(s,t.linkWidth);n.push([o!=null?o:nk])}),this.widthBuffer=e.buffer(n)}updateArrow(){const{reglInstance:e,config:t,data:i}=this,n=[];i.completeLinks.forEach(s=>{var o;const a=(o=Hc(s,t.linkArrows))!==null&&o!==void 0?o:Ut.arrowLinks;n.push([a?1:0])}),this.arrowBuffer=e.buffer(n)}updateCurveLineGeometry(){const{reglInstance:e,config:{curvedLinks:t,curvedLinkSegments:i}}=this;this.curveLineGeometry=Y8(t?i!=null?i:Ut.curvedLinkSegments:1),this.curveLineBuffer=e.buffer(this.curveLineGeometry)}destroy(){eh(this.colorBuffer),eh(this.widthBuffer),eh(this.arrowBuffer),eh(this.curveLineBuffer)}}function Z8(r,e,t,i){var n;if(t===0)return;const s=new Float32Array(t*t*4);for(let a=0;a0.0){alpha*=greyoutOpacity;}}`,$8=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform sampler2D particleSize;uniform float sizeScale;uniform float spaceSize;uniform vec2 screenSize;uniform float ratio;uniform mat3 transform;uniform vec2 selection[2];uniform bool scaleNodesOnZoom;uniform float maxPointSize;varying vec2 index;float pointSize(float size){float pSize;if(scaleNodesOnZoom){pSize=size*ratio*transform[0][0];}else{pSize=size*ratio*min(5.0,max(1.0,transform[0][0]*0.01));}return min(pSize,maxPointSize*ratio);}void main(){vec4 pointPosition=texture2D(position,index);vec2 p=2.0*pointPosition.rg/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);vec4 pSize=texture2D(particleSize,index);float size=pSize.r*sizeScale;float left=2.0*(selection[0].x-0.5*pointSize(size))/screenSize.x-1.0;float right=2.0*(selection[1].x+0.5*pointSize(size))/screenSize.x-1.0;float top=2.0*(selection[0].y-0.5*pointSize(size))/screenSize.y-1.0;float bottom=2.0*(selection[1].y+0.5*pointSize(size))/screenSize.y-1.0;gl_FragColor=vec4(0.0,0.0,pointPosition.rg);if(final.x>=left&&final.x<=right&&final.y>=top&&final.y<=bottom){gl_FragColor.r=1.0;}}`,ez=`precision mediump float; +#define GLSLIFY 1 +uniform vec4 color;uniform float width;varying vec2 pos;varying float particleOpacity;const float smoothing=1.05;void main(){vec2 cxy=pos;float r=dot(cxy,cxy);float opacity=smoothstep(r,r*smoothing,1.0);float stroke=smoothstep(width,width*smoothing,r);gl_FragColor=vec4(color.rgb,opacity*stroke*color.a*particleOpacity);}`,tz=`precision mediump float; +#define GLSLIFY 1 +attribute vec2 quad;uniform sampler2D positions;uniform sampler2D particleColor;uniform sampler2D particleGreyoutStatus;uniform sampler2D particleSize;uniform mat3 transform;uniform float pointsTextureSize;uniform float sizeScale;uniform float spaceSize;uniform vec2 screenSize;uniform bool scaleNodesOnZoom;uniform float pointIndex;uniform float maxPointSize;uniform vec4 color;uniform float greyoutOpacity;varying vec2 pos;varying float particleOpacity;float pointSize(float size){float pSize;if(scaleNodesOnZoom){pSize=size*transform[0][0];}else{pSize=size*min(5.0,max(1.0,transform[0][0]*0.01));}return min(pSize,maxPointSize);}const float relativeRingRadius=1.3;void main(){pos=quad;vec2 ij=vec2(mod(pointIndex,pointsTextureSize),floor(pointIndex/pointsTextureSize))+0.5;vec4 pointPosition=texture2D(positions,ij/pointsTextureSize);vec4 pSize=texture2D(particleSize,ij/pointsTextureSize);vec4 pColor=texture2D(particleColor,ij/pointsTextureSize);particleOpacity=pColor.a;vec4 greyoutStatus=texture2D(particleGreyoutStatus,ij/pointsTextureSize);if(greyoutStatus.r>0.0){particleOpacity*=greyoutOpacity;}float size=(pointSize(pSize.r*sizeScale)*relativeRingRadius)/transform[0][0];float radius=size*0.5;vec2 a=pointPosition.xy;vec2 b=pointPosition.xy+vec2(0.0,radius);vec2 xBasis=b-a;vec2 yBasis=normalize(vec2(-xBasis.y,xBasis.x));vec2 point=a+xBasis*quad.x+yBasis*radius*quad.y;vec2 p=2.0*point/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);gl_Position=vec4(final.rg,0,1);}`,iz=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +varying vec4 rgba;void main(){gl_FragColor=rgba;}`,rz=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform float pointsTextureSize;uniform sampler2D particleSize;uniform float sizeScale;uniform float spaceSize;uniform vec2 screenSize;uniform float ratio;uniform mat3 transform;uniform vec2 mousePosition;uniform bool scaleNodesOnZoom;uniform float maxPointSize;attribute vec2 indexes;varying vec4 rgba;float pointSize(float size){float pSize;if(scaleNodesOnZoom){pSize=size*ratio*transform[0][0];}else{pSize=size*ratio*min(5.0,max(1.0,transform[0][0]*0.01));}return min(pSize,maxPointSize*ratio);}float euclideanDistance(float x1,float x2,float y1,float y2){return sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));}void main(){vec4 pointPosition=texture2D(position,(indexes+0.5)/pointsTextureSize);vec2 p=2.0*pointPosition.rg/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);vec4 pSize=texture2D(particleSize,indexes/pointsTextureSize);float size=pSize.r*sizeScale;float pointRadius=0.5*pointSize(size);vec2 pointScreenPosition=(final.xy+1.0)*screenSize/2.0;rgba=vec4(0.0);gl_Position=vec4(0.5,0.5,0.0,1.0);if(euclideanDistance(pointScreenPosition.x,mousePosition.x,pointScreenPosition.y,mousePosition.y)this.currentPositionFbo,primitive:"triangle strip",count:4,attributes:{quad:Sr(e)},uniforms:{position:()=>this.previousPositionFbo,velocity:()=>this.velocityFbo,friction:()=>{var s;return(s=t.simulation)===null||s===void 0?void 0:s.friction},spaceSize:()=>i.adjustedSpaceSize}})),this.drawCommand=e({frag:J8,vert:Q8,primitive:"points",count:()=>n.nodes.length,attributes:{indexes:vl(e,i.pointsTextureSize)},uniforms:{positions:()=>this.currentPositionFbo,particleColor:()=>this.colorFbo,particleGreyoutStatus:()=>this.greyoutStatusFbo,particleSize:()=>this.sizeFbo,ratio:()=>t.pixelRatio,sizeScale:()=>t.nodeSizeScale,pointsTextureSize:()=>i.pointsTextureSize,transform:()=>i.transform,spaceSize:()=>i.adjustedSpaceSize,screenSize:()=>i.screenSize,greyoutOpacity:()=>t.nodeGreyoutOpacity,scaleNodesOnZoom:()=>t.scaleNodesOnZoom,maxPointSize:()=>i.maxPointSize},blend:{enable:!0,func:{dstRGB:"one minus src alpha",srcRGB:"src alpha",dstAlpha:"one minus src alpha",srcAlpha:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1}}),this.findPointsOnAreaSelectionCommand=e({frag:$8,vert:Lr,framebuffer:()=>this.selectedFbo,primitive:"triangle strip",count:4,attributes:{quad:Sr(e)},uniforms:{position:()=>this.currentPositionFbo,particleSize:()=>this.sizeFbo,spaceSize:()=>i.adjustedSpaceSize,screenSize:()=>i.screenSize,sizeScale:()=>t.nodeSizeScale,transform:()=>i.transform,ratio:()=>t.pixelRatio,"selection[0]":()=>i.selectedArea[0],"selection[1]":()=>i.selectedArea[1],scaleNodesOnZoom:()=>t.scaleNodesOnZoom,maxPointSize:()=>i.maxPointSize}}),this.clearHoveredFboCommand=e({frag:Fl,vert:Lr,framebuffer:this.hoveredFbo,primitive:"triangle strip",count:4,attributes:{quad:Sr(e)}}),this.findHoveredPointCommand=e({frag:iz,vert:rz,primitive:"points",count:()=>n.nodes.length,framebuffer:()=>this.hoveredFbo,attributes:{indexes:vl(e,i.pointsTextureSize)},uniforms:{position:()=>this.currentPositionFbo,particleSize:()=>this.sizeFbo,ratio:()=>t.pixelRatio,sizeScale:()=>t.nodeSizeScale,pointsTextureSize:()=>i.pointsTextureSize,transform:()=>i.transform,spaceSize:()=>i.adjustedSpaceSize,screenSize:()=>i.screenSize,scaleNodesOnZoom:()=>t.scaleNodesOnZoom,mousePosition:()=>i.screenMousePosition,maxPointSize:()=>i.maxPointSize},depth:{enable:!1,mask:!1}}),this.clearSampledNodesFboCommand=e({frag:Fl,vert:Lr,framebuffer:()=>this.sampledNodesFbo,primitive:"triangle strip",count:4,attributes:{quad:Sr(e)}}),this.fillSampledNodesFboCommand=e({frag:nz,vert:sz,primitive:"points",count:()=>n.nodes.length,framebuffer:()=>this.sampledNodesFbo,attributes:{indexes:vl(e,i.pointsTextureSize)},uniforms:{position:()=>this.currentPositionFbo,pointsTextureSize:()=>i.pointsTextureSize,transform:()=>i.transform,spaceSize:()=>i.adjustedSpaceSize,screenSize:()=>i.screenSize},depth:{enable:!1,mask:!1}}),this.drawHighlightedCommand=e({frag:ez,vert:tz,attributes:{quad:Sr(e)},primitive:"triangle strip",count:4,uniforms:{color:e.prop("color"),width:e.prop("width"),pointIndex:e.prop("pointIndex"),positions:()=>this.currentPositionFbo,particleColor:()=>this.colorFbo,particleSize:()=>this.sizeFbo,sizeScale:()=>t.nodeSizeScale,pointsTextureSize:()=>i.pointsTextureSize,transform:()=>i.transform,spaceSize:()=>i.adjustedSpaceSize,screenSize:()=>i.screenSize,scaleNodesOnZoom:()=>t.scaleNodesOnZoom,maxPointSize:()=>i.maxPointSize,particleGreyoutStatus:()=>this.greyoutStatusFbo,greyoutOpacity:()=>t.nodeGreyoutOpacity},blend:{enable:!0,func:{dstRGB:"one minus src alpha",srcRGB:"src alpha",dstAlpha:"one minus src alpha",srcAlpha:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1}}),this.trackPointsCommand=e({frag:uz,vert:Lr,framebuffer:()=>this.trackedPositionsFbo,primitive:"triangle strip",count:4,attributes:{quad:Sr(e)},uniforms:{position:()=>this.currentPositionFbo,trackedIndices:()=>this.trackedIndicesFbo,pointsTextureSize:()=>i.pointsTextureSize}})}updateColor(){const{reglInstance:e,config:t,store:{pointsTextureSize:i},data:n}=this;i&&(this.colorFbo=Z8(n,e,i,t.nodeColor))}updateGreyoutStatus(){const{reglInstance:e,store:t}=this;this.greyoutStatusFbo=K8(t.selectedIndices,e,t.pointsTextureSize)}updateSize(){const{reglInstance:e,config:t,store:{pointsTextureSize:i},data:n}=this;i&&(this.sizeByIndex=new Float32Array(n.nodes.length),this.sizeFbo=az(n,e,i,t.nodeSize,this.sizeByIndex))}updateSampledNodesGrid(){const{store:{screenSize:e},config:{nodeSamplingDistance:t},reglInstance:i}=this,n=t!=null?t:Math.min(...e)/2,s=Math.ceil(e[0]/n),o=Math.ceil(e[1]/n);Hi(this.sampledNodesFbo),this.sampledNodesFbo=i.framebuffer({shape:[s,o],depth:!1,stencil:!1,colorType:"float"})}trackPoints(){var e;!this.trackedIndicesFbo||!this.trackedPositionsFbo||(e=this.trackPointsCommand)===null||e===void 0||e.call(this)}draw(){var e,t,i;const{config:{renderHoveredNodeRing:n,renderHighlightedNodeRing:s},store:o}=this;(e=this.drawCommand)===null||e===void 0||e.call(this),(n!=null?n:s)&&o.hoveredNode&&((t=this.drawHighlightedCommand)===null||t===void 0||t.call(this,{width:.85,color:o.hoveredNodeRingColor,pointIndex:o.hoveredNode.index})),o.focusedNode&&((i=this.drawHighlightedCommand)===null||i===void 0||i.call(this,{width:.75,color:o.focusedNodeRingColor,pointIndex:o.focusedNode.index}))}updatePosition(){var e;(e=this.updatePositionCommand)===null||e===void 0||e.call(this),this.swapFbo()}findPointsOnAreaSelection(){var e;(e=this.findPointsOnAreaSelectionCommand)===null||e===void 0||e.call(this)}findHoveredPoint(){var e,t;(e=this.clearHoveredFboCommand)===null||e===void 0||e.call(this),(t=this.findHoveredPointCommand)===null||t===void 0||t.call(this)}getNodeRadiusByIndex(e){var t;return(t=this.sizeByIndex)===null||t===void 0?void 0:t[e]}trackNodesByIds(e){this.trackedIds=e.length?e:void 0,this.trackedPositionsById.clear();const t=e.map(i=>this.data.getSortedIndexById(i)).filter(i=>i!==void 0);Hi(this.trackedIndicesFbo),this.trackedIndicesFbo=void 0,Hi(this.trackedPositionsFbo),this.trackedPositionsFbo=void 0,t.length&&(this.trackedIndicesFbo=dz(t,this.store.pointsTextureSize,this.reglInstance),this.trackedPositionsFbo=cz(t,this.reglInstance)),this.trackPoints()}getTrackedPositions(){if(!this.trackedIds)return this.trackedPositionsById;const e=uo(this.reglInstance,this.trackedPositionsFbo);return this.trackedIds.forEach((t,i)=>{const n=e[i*4],s=e[i*4+1];n!==void 0&&s!==void 0&&this.trackedPositionsById.set(t,[n,s])}),this.trackedPositionsById}getSampledNodePositionsMap(){var e,t,i;const n=new Map;if(!this.sampledNodesFbo)return n;(e=this.clearSampledNodesFboCommand)===null||e===void 0||e.call(this),(t=this.fillSampledNodesFboCommand)===null||t===void 0||t.call(this);const s=uo(this.reglInstance,this.sampledNodesFbo);for(let o=0;og.x).filter(g=>g!==void 0);if(i.length===0)return;const n=e.map(g=>g.y).filter(g=>g!==void 0);if(n.length===0)return;const[s,o]=Jh(i);if(s===void 0||o===void 0)return;const[a,l]=Jh(n);if(a===void 0||l===void 0)return;const c=o-s,d=l-a,u=Math.max(c,d),h=(u-c)/2,f=(u-d)/2,m=sd().range([0,t!=null?t:Ut.spaceSize]).domain([s-h,o+h]),p=sd().range([0,t!=null?t:Ut.spaceSize]).domain([a-f,l+f]);e.forEach(g=>{g.x=m(g.x),g.y=p(g.y)})}}const I0=.001,L0=64;class fz{constructor(){this.pointsTextureSize=0,this.linksTextureSize=0,this.alpha=1,this.transform=w7(),this.backgroundColor=[0,0,0,0],this.screenSize=[0,0],this.mousePosition=[0,0],this.screenMousePosition=[0,0],this.selectedArea=[[0,0],[0,0]],this.isSimulationRunning=!1,this.simulationProgress=0,this.selectedIndices=null,this.maxPointSize=L0,this.hoveredNode=void 0,this.focusedNode=void 0,this.adjustedSpaceSize=Ut.spaceSize,this.hoveredNodeRingColor=[1,1,1,x8],this.focusedNodeRingColor=[1,1,1,w8],this.alphaTarget=0,this.scaleNodeX=sd(),this.scaleNodeY=sd(),this.random=new ek,this.alphaDecay=e=>1-Math.pow(I0,1/e)}addRandomSeed(e){this.random=this.random.clone(e)}getRandomFloat(e,t){return this.random.float(e,t)}adjustSpaceSize(e,t){e>=t?(this.adjustedSpaceSize=t/2,console.warn(`The \`spaceSize\` has been reduced to ${this.adjustedSpaceSize} due to WebGL limits`)):this.adjustedSpaceSize=e}updateScreenSize(e,t){const{adjustedSpaceSize:i}=this;this.screenSize=[e,t],this.scaleNodeX.domain([0,i]).range([(e-i)/2,(e+i)/2]),this.scaleNodeY.domain([i,0]).range([(t-i)/2,(t+i)/2])}scaleX(e){return this.scaleNodeX(e)}scaleY(e){return this.scaleNodeY(e)}setHoveredNodeRingColor(e){const t=Rl(e);this.hoveredNodeRingColor[0]=t[0],this.hoveredNodeRingColor[1]=t[1],this.hoveredNodeRingColor[2]=t[2]}setFocusedNodeRingColor(e){const t=Rl(e);this.focusedNodeRingColor[0]=t[0],this.focusedNodeRingColor[1]=t[1],this.focusedNodeRingColor[2]=t[2]}setFocusedNode(e,t){e&&t!==void 0?this.focusedNode={node:e,index:t}:this.focusedNode=void 0}addAlpha(e){return(this.alphaTarget-this.alpha)*this.alphaDecay(e)}}class mz{constructor(e,t){this.eventTransform=Uc,this.behavior=v8().scaleExtent([.001,1/0]).on("start",i=>{var n,s,o;this.isRunning=!0;const a=!!i.sourceEvent;(o=(s=(n=this.config)===null||n===void 0?void 0:n.events)===null||s===void 0?void 0:s.onZoomStart)===null||o===void 0||o.call(s,i,a)}).on("zoom",i=>{var n,s,o;this.eventTransform=i.transform;const{eventTransform:{x:a,y:l,k:c},store:{transform:d,screenSize:u}}=this,h=u[0],f=u[1];S7(d,h,f),Hw(d,d,[a,l]),Ig(d,d,[c,c]),Hw(d,d,[h/2,f/2]),Ig(d,d,[h/2,f/2]),Ig(d,d,[1,-1]);const m=!!i.sourceEvent;(o=(s=(n=this.config)===null||n===void 0?void 0:n.events)===null||s===void 0?void 0:s.onZoom)===null||o===void 0||o.call(s,i,m)}).on("end",i=>{var n,s,o;this.isRunning=!1;const a=!!i.sourceEvent;(o=(s=(n=this.config)===null||n===void 0?void 0:n.events)===null||s===void 0?void 0:s.onZoomEnd)===null||o===void 0||o.call(s,i,a)}),this.isRunning=!1,this.store=e,this.config=t}getTransform(e,t,i=.1){if(e.length===0)return this.eventTransform;const{store:{screenSize:n}}=this,s=n[0],o=n[1],a=Jh(e.map(v=>v[0])),l=Jh(e.map(v=>v[1]));a[0]=this.store.scaleX(a[0]),a[1]=this.store.scaleX(a[1]),l[0]=this.store.scaleY(l[0]),l[1]=this.store.scaleY(l[1]);const c=s*(1-i*2)/(a[1]-a[0]),d=o*(1-i*2)/(l[0]-l[1]),u=C8(t!=null?t:Math.min(c,d),...this.behavior.scaleExtent()),h=(a[1]+a[0])/2,f=(l[1]+l[0])/2,m=s/2-h*u,p=o/2-f*u;return Uc.translate(m,p).scale(u)}getDistanceToPoint(e){const{x:t,y:i,k:n}=this.eventTransform,s=this.getTransform([e],n),o=t-s.x,a=i-s.y;return Math.sqrt(o*o+a*a)}getMiddlePointTransform(e){const{store:{screenSize:t},eventTransform:{x:i,y:n,k:s}}=this,o=t[0],a=t[1],l=(o/2-i)/s,c=(a/2-n)/s,d=this.store.scaleX(e[0]),u=this.store.scaleY(e[1]),h=(l+d)/2,f=(c+u)/2,m=1,p=o/2-h*m,g=a/2-f*m;return Uc.translate(p,g).scale(m)}convertScreenToSpacePosition(e){const{eventTransform:{x:t,y:i,k:n},store:{screenSize:s}}=this,o=s[0],a=s[1],l=(e[0]-t)/n,c=(e[1]-i)/n,d=[l,a-c];return d[0]-=(o-this.store.adjustedSpaceSize)/2,d[1]-=(a-this.store.adjustedSpaceSize)/2,d}convertSpaceToScreenPosition(e){const t=this.eventTransform.applyX(this.store.scaleX(e[0])),i=this.eventTransform.applyY(this.store.scaleY(e[1]));return[t,i]}convertSpaceToScreenRadius(e){const{config:{scaleNodesOnZoom:t},store:{maxPointSize:i},eventTransform:{k:n}}=this;let s=e*2;return t?s*=n:s*=Math.min(5,Math.max(1,n*.01)),Math.min(s,i)/2}}class pz{constructor(e,t){var i,n;this.config=new k8,this.graph=new H8,this.requestAnimationFrameId=0,this.isRightClickMouse=!1,this.store=new fz,this.zoomInstance=new mz(this.store,this.config),this.hasParticleSystemDestroyed=!1,this._findHoveredPointExecutionCount=0,this._isMouseOnCanvas=!1,this._isFirstDataAfterInit=!0,t&&this.config.init(t);const s=e.clientWidth,o=e.clientHeight;e.width=s*this.config.pixelRatio,e.height=o*this.config.pixelRatio,e.style.width===""&&e.style.height===""&&Zn(e).style("width","100%").style("height","100%"),this.canvas=e,this.canvasD3Selection=Zn(e),this.canvasD3Selection.on("mouseenter.cosmos",()=>{this._isMouseOnCanvas=!0}).on("mouseleave.cosmos",()=>{this._isMouseOnCanvas=!1}),this.zoomInstance.behavior.on("start.detect",a=>{this.currentEvent=a}).on("zoom.detect",a=>{!!a.sourceEvent&&this.updateMousePosition(a.sourceEvent),this.currentEvent=a}).on("end.detect",a=>{this.currentEvent=a}),this.canvasD3Selection.call(this.zoomInstance.behavior).on("click",this.onClick.bind(this)).on("mousemove",this.onMouseMove.bind(this)).on("contextmenu",this.onRightClickMouse.bind(this)),this.config.disableZoom&&this.disableZoom(),this.setZoomLevel((i=this.config.initialZoomLevel)!==null&&i!==void 0?i:1),this.reglInstance=LF({canvas:this.canvas,attributes:{antialias:!1,preserveDrawingBuffer:!0},extensions:["OES_texture_float","ANGLE_instanced_arrays"]}),this.store.maxPointSize=((n=this.reglInstance.limits.pointSizeDims[1])!==null&&n!==void 0?n:L0)/this.config.pixelRatio,this.store.adjustSpaceSize(this.config.spaceSize,this.reglInstance.limits.maxTextureSize),this.store.updateScreenSize(s,o),this.points=new hz(this.reglInstance,this.config,this.store,this.graph),this.lines=new q8(this.reglInstance,this.config,this.store,this.graph,this.points),this.config.disableSimulation||(this.forceGravity=new P8(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceCenter=new I8(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceManyBody=this.config.useQuadtree?new z8(this.reglInstance,this.config,this.store,this.graph,this.points):new F8(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceLinkIncoming=new Kw(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceLinkOutgoing=new Kw(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceMouse=new j8(this.reglInstance,this.config,this.store,this.graph,this.points)),this.store.backgroundColor=Rl(this.config.backgroundColor),this.config.highlightedNodeRingColor?(this.store.setHoveredNodeRingColor(this.config.highlightedNodeRingColor),this.store.setFocusedNodeRingColor(this.config.highlightedNodeRingColor)):(this.config.hoveredNodeRingColor&&this.store.setHoveredNodeRingColor(this.config.hoveredNodeRingColor),this.config.focusedNodeRingColor&&this.store.setFocusedNodeRingColor(this.config.focusedNodeRingColor)),this.config.showFPSMonitor&&(this.fpsMonitor=new Jw(this.canvas)),this.config.randomSeed!==void 0&&this.store.addRandomSeed(this.config.randomSeed)}get progress(){return this.store.simulationProgress}get isSimulationRunning(){return this.store.isSimulationRunning}get maxPointSize(){return this.store.maxPointSize}setConfig(e){var t,i;const n=Ui({},this.config);this.config.init(e),n.linkColor!==this.config.linkColor&&this.lines.updateColor(),n.nodeColor!==this.config.nodeColor&&this.points.updateColor(),n.nodeSize!==this.config.nodeSize&&this.points.updateSize(),n.linkWidth!==this.config.linkWidth&&this.lines.updateWidth(),n.linkArrows!==this.config.linkArrows&&this.lines.updateArrow(),(n.curvedLinkSegments!==this.config.curvedLinkSegments||n.curvedLinks!==this.config.curvedLinks)&&this.lines.updateCurveLineGeometry(),n.backgroundColor!==this.config.backgroundColor&&(this.store.backgroundColor=Rl(this.config.backgroundColor)),n.highlightedNodeRingColor!==this.config.highlightedNodeRingColor&&(this.store.setHoveredNodeRingColor(this.config.highlightedNodeRingColor),this.store.setFocusedNodeRingColor(this.config.highlightedNodeRingColor)),n.hoveredNodeRingColor!==this.config.hoveredNodeRingColor&&this.store.setHoveredNodeRingColor(this.config.hoveredNodeRingColor),n.focusedNodeRingColor!==this.config.focusedNodeRingColor&&this.store.setFocusedNodeRingColor(this.config.focusedNodeRingColor),(n.spaceSize!==this.config.spaceSize||n.simulation.repulsionQuadtreeLevels!==this.config.simulation.repulsionQuadtreeLevels)&&(this.store.adjustSpaceSize(this.config.spaceSize,this.reglInstance.limits.maxTextureSize),this.resizeCanvas(!0),this.update(this.store.isSimulationRunning)),n.showFPSMonitor!==this.config.showFPSMonitor&&(this.config.showFPSMonitor?this.fpsMonitor=new Jw(this.canvas):((t=this.fpsMonitor)===null||t===void 0||t.destroy(),this.fpsMonitor=void 0)),n.pixelRatio!==this.config.pixelRatio&&(this.store.maxPointSize=((i=this.reglInstance.limits.pointSizeDims[1])!==null&&i!==void 0?i:L0)/this.config.pixelRatio),n.disableZoom!==this.config.disableZoom&&(this.config.disableZoom?this.disableZoom():this.enableZoom())}setData(e,t,i=!0){const{fitViewOnInit:n,fitViewDelay:s,fitViewByNodesInRect:o,initialZoomLevel:a}=this.config;if(!e.length&&!t.length){this.destroyParticleSystem(),this.reglInstance.clear({color:this.store.backgroundColor,depth:1,stencil:0});return}this.graph.setData(e,t),this._isFirstDataAfterInit&&n&&a===void 0&&(this._fitViewOnInitTimeoutID=window.setTimeout(()=>{o?this.setZoomTransformByNodePositions(o,void 0,void 0,0):this.fitView()},s)),this._isFirstDataAfterInit=!1,this.update(i)}zoomToNodeById(e,t=700,i=qw,n=!0){const s=this.graph.getNodeById(e);s&&this.zoomToNode(s,t,i,n)}zoomToNodeByIndex(e,t=700,i=qw,n=!0){const s=this.graph.getNodeByIndex(e);s&&this.zoomToNode(s,t,i,n)}zoom(e,t=0){this.setZoomLevel(e,t)}setZoomLevel(e,t=0){t===0?this.canvasD3Selection.call(this.zoomInstance.behavior.scaleTo,e):this.canvasD3Selection.transition().duration(t).call(this.zoomInstance.behavior.scaleTo,e)}getZoomLevel(){return this.zoomInstance.eventTransform.k}getNodePositions(){if(this.hasParticleSystemDestroyed)return{};const e=uo(this.reglInstance,this.points.currentPositionFbo);return this.graph.nodes.reduce((t,i)=>{const n=this.graph.getSortedIndexById(i.id),s=e[n*4+0],o=e[n*4+1];return s!==void 0&&o!==void 0&&(t[i.id]={x:s,y:o}),t},{})}getNodePositionsMap(){const e=new Map;if(this.hasParticleSystemDestroyed)return e;const t=uo(this.reglInstance,this.points.currentPositionFbo);return this.graph.nodes.reduce((i,n)=>{const s=this.graph.getSortedIndexById(n.id),o=t[s*4+0],a=t[s*4+1];return o!==void 0&&a!==void 0&&i.set(n.id,[o,a]),i},e)}getNodePositionsArray(){const e=[];if(this.hasParticleSystemDestroyed)return[];const t=uo(this.reglInstance,this.points.currentPositionFbo);e.length=this.graph.nodes.length;for(let i=0;in.get(o)).filter(o=>o!==void 0);this.setZoomTransformByNodePositions(s,t,void 0,i)}selectNodesInRange(e){if(e){const t=this.store.screenSize[1];this.store.selectedArea=[[e[0][0],t-e[1][1]],[e[1][0],t-e[0][1]]],this.points.findPointsOnAreaSelection();const i=uo(this.reglInstance,this.points.selectedFbo);this.store.selectedIndices=i.map((n,s)=>s%4===0&&n!==0?s/4:-1).filter(n=>n!==-1)}else this.store.selectedIndices=null;this.points.updateGreyoutStatus()}selectNodeById(e,t=!1){var i;if(t){const n=(i=this.graph.getAdjacentNodes(e))!==null&&i!==void 0?i:[];this.selectNodesByIds([e,...n.map(s=>s.id)])}else this.selectNodesByIds([e])}selectNodeByIndex(e,t=!1){const i=this.graph.getNodeByIndex(e);i&&this.selectNodeById(i.id,t)}selectNodesByIds(e){this.selectNodesByIndices(e==null?void 0:e.map(t=>this.graph.getSortedIndexById(t)))}selectNodesByIndices(e){e?e.length===0?this.store.selectedIndices=new Float32Array:this.store.selectedIndices=new Float32Array(e.filter(t=>t!==void 0)):this.store.selectedIndices=null,this.points.updateGreyoutStatus()}unselectNodes(){this.store.selectedIndices=null,this.points.updateGreyoutStatus()}getSelectedNodes(){const{selectedIndices:e}=this.store;if(!e)return null;const t=new Array(e.length);for(const[i,n]of e.entries())if(n!==void 0){const s=this.graph.getInputIndexBySortedIndex(n);s!==void 0&&(t[i]=this.graph.nodes[s])}return t}getAdjacentNodes(e){return this.graph.getAdjacentNodes(e)}setFocusedNodeById(e){e===void 0?this.store.setFocusedNode():this.store.setFocusedNode(this.graph.getNodeById(e),this.graph.getSortedIndexById(e))}setFocusedNodeByIndex(e){e===void 0?this.store.setFocusedNode():this.store.setFocusedNode(this.graph.getNodeByIndex(e),e)}spaceToScreenPosition(e){return this.zoomInstance.convertSpaceToScreenPosition(e)}spaceToScreenRadius(e){return this.zoomInstance.convertSpaceToScreenRadius(e)}getNodeRadiusByIndex(e){return this.points.getNodeRadiusByIndex(e)}getNodeRadiusById(e){const t=this.graph.getInputIndexById(e);if(t!==void 0)return this.points.getNodeRadiusByIndex(t)}trackNodePositionsByIds(e){this.points.trackNodesByIds(e)}trackNodePositionsByIndices(e){this.points.trackNodesByIds(e.map(t=>this.graph.getNodeByIndex(t)).filter(t=>t!==void 0).map(t=>t.id))}getTrackedNodePositionsMap(){return this.points.getTrackedPositions()}getSampledNodePositionsMap(){return this.points.getSampledNodePositionsMap()}start(e=1){var t,i;this.graph.nodes.length&&(this.store.isSimulationRunning=!0,this.store.alpha=e,this.store.simulationProgress=0,(i=(t=this.config.simulation).onStart)===null||i===void 0||i.call(t),this.stopFrames(),this.frame())}pause(){var e,t;this.store.isSimulationRunning=!1,(t=(e=this.config.simulation).onPause)===null||t===void 0||t.call(e)}restart(){var e,t;this.store.isSimulationRunning=!0,(t=(e=this.config.simulation).onRestart)===null||t===void 0||t.call(e)}step(){this.store.isSimulationRunning=!1,this.stopFrames(),this.frame()}destroy(){var e,t;window.clearTimeout(this._fitViewOnInitTimeoutID),this.stopFrames(),this.destroyParticleSystem(),(e=this.fpsMonitor)===null||e===void 0||e.destroy(),(t=document.getElementById("gl-bench-style"))===null||t===void 0||t.remove()}create(){var e,t,i,n;this.points.create(),this.lines.create(),(e=this.forceManyBody)===null||e===void 0||e.create(),(t=this.forceLinkIncoming)===null||t===void 0||t.create(ad.INCOMING),(i=this.forceLinkOutgoing)===null||i===void 0||i.create(ad.OUTGOING),(n=this.forceCenter)===null||n===void 0||n.create(),this.hasParticleSystemDestroyed=!1}destroyParticleSystem(){var e,t,i,n;this.hasParticleSystemDestroyed||(this.points.destroy(),this.lines.destroy(),(e=this.forceCenter)===null||e===void 0||e.destroy(),(t=this.forceLinkIncoming)===null||t===void 0||t.destroy(),(i=this.forceLinkOutgoing)===null||i===void 0||i.destroy(),(n=this.forceManyBody)===null||n===void 0||n.destroy(),this.reglInstance.destroy(),this.hasParticleSystemDestroyed=!0)}update(e){const{graph:t}=this;this.store.pointsTextureSize=Math.ceil(Math.sqrt(t.nodes.length)),this.store.linksTextureSize=Math.ceil(Math.sqrt(t.linksNumber*2)),this.destroyParticleSystem(),this.create(),this.initPrograms(),this.setFocusedNodeById(),this.store.hoveredNode=void 0,e?this.start():this.step()}initPrograms(){var e,t,i,n,s,o;this.points.initPrograms(),this.lines.initPrograms(),(e=this.forceGravity)===null||e===void 0||e.initPrograms(),(t=this.forceLinkIncoming)===null||t===void 0||t.initPrograms(),(i=this.forceLinkOutgoing)===null||i===void 0||i.initPrograms(),(n=this.forceMouse)===null||n===void 0||n.initPrograms(),(s=this.forceManyBody)===null||s===void 0||s.initPrograms(),(o=this.forceCenter)===null||o===void 0||o.initPrograms()}frame(){const{config:{simulation:e,renderLinks:t,disableSimulation:i},store:{alpha:n,isSimulationRunning:s}}=this;n{var a,l,c,d,u,h,f,m,p,g,v,b,S;(a=this.fpsMonitor)===null||a===void 0||a.begin(),this.resizeCanvas(),this.findHoveredPoint(),i||(this.isRightClickMouse&&(s||this.start(.1),(l=this.forceMouse)===null||l===void 0||l.run(),this.points.updatePosition()),s&&!this.zoomInstance.isRunning&&(e.gravity&&((c=this.forceGravity)===null||c===void 0||c.run(),this.points.updatePosition()),e.center&&((d=this.forceCenter)===null||d===void 0||d.run(),this.points.updatePosition()),(u=this.forceManyBody)===null||u===void 0||u.run(),this.points.updatePosition(),this.store.linksTextureSize&&((h=this.forceLinkIncoming)===null||h===void 0||h.run(),this.points.updatePosition(),(f=this.forceLinkOutgoing)===null||f===void 0||f.run(),this.points.updatePosition()),this.store.alpha+=this.store.addAlpha((m=this.config.simulation.decay)!==null&&m!==void 0?m:Ut.simulation.decay),this.isRightClickMouse&&(this.store.alpha=Math.max(this.store.alpha,.1)),this.store.simulationProgress=Math.sqrt(Math.min(1,I0/this.store.alpha)),(g=(p=this.config.simulation).onTick)===null||g===void 0||g.call(p,this.store.alpha,(v=this.store.hoveredNode)===null||v===void 0?void 0:v.node,this.store.hoveredNode?this.graph.getInputIndexBySortedIndex(this.store.hoveredNode.index):void 0,(b=this.store.hoveredNode)===null||b===void 0?void 0:b.position)),this.points.trackPoints()),this.reglInstance.clear({color:this.store.backgroundColor,depth:1,stencil:0}),t&&this.store.linksTextureSize&&this.lines.draw(),this.points.draw(),(S=this.fpsMonitor)===null||S===void 0||S.end(o),this.currentEvent=void 0,this.frame()}))}stopFrames(){this.requestAnimationFrameId&&window.cancelAnimationFrame(this.requestAnimationFrameId)}end(){var e,t;this.store.isSimulationRunning=!1,this.store.simulationProgress=1,(t=(e=this.config.simulation).onEnd)===null||t===void 0||t.call(e)}onClick(e){var t,i,n,s;(i=(t=this.config.events).onClick)===null||i===void 0||i.call(t,(n=this.store.hoveredNode)===null||n===void 0?void 0:n.node,this.store.hoveredNode?this.graph.getInputIndexBySortedIndex(this.store.hoveredNode.index):void 0,(s=this.store.hoveredNode)===null||s===void 0?void 0:s.position,e)}updateMousePosition(e){if(!e||e.offsetX===void 0||e.offsetY===void 0)return;const t=e.offsetX,i=e.offsetY;this.store.mousePosition=this.zoomInstance.convertScreenToSpacePosition([t,i]),this.store.screenMousePosition=[t,this.store.screenSize[1]-i]}onMouseMove(e){var t,i,n,s;this.currentEvent=e,this.updateMousePosition(e),this.isRightClickMouse=e.which===3,(i=(t=this.config.events).onMouseMove)===null||i===void 0||i.call(t,(n=this.store.hoveredNode)===null||n===void 0?void 0:n.node,this.store.hoveredNode?this.graph.getInputIndexBySortedIndex(this.store.hoveredNode.index):void 0,(s=this.store.hoveredNode)===null||s===void 0?void 0:s.position,this.currentEvent)}onRightClickMouse(e){e.preventDefault()}resizeCanvas(e=!1){const t=this.canvas.width,i=this.canvas.height,n=this.canvas.clientWidth,s=this.canvas.clientHeight;if(e||t!==n*this.config.pixelRatio||i!==s*this.config.pixelRatio){const[o,a]=this.store.screenSize,{k:l}=this.zoomInstance.eventTransform,c=this.zoomInstance.convertScreenToSpacePosition([o/2,a/2]);this.store.updateScreenSize(n,s),this.canvas.width=n*this.config.pixelRatio,this.canvas.height=s*this.config.pixelRatio,this.reglInstance.poll(),this.canvasD3Selection.call(this.zoomInstance.behavior.transform,this.zoomInstance.getTransform([c],l)),this.points.updateSampledNodesGrid()}}setZoomTransformByNodePositions(e,t=250,i,n){this.resizeCanvas();const s=this.zoomInstance.getTransform(e,i,n);this.canvasD3Selection.transition().ease(CF).duration(t).call(this.zoomInstance.behavior.transform,s)}zoomToNode(e,t,i,n){const{graph:s,store:{screenSize:o}}=this,a=uo(this.reglInstance,this.points.currentPositionFbo),l=s.getSortedIndexById(e.id);if(l===void 0)return;const c=a[l*4+0],d=a[l*4+1];if(c===void 0||d===void 0)return;const u=this.zoomInstance.getDistanceToPoint([c,d]),h=n?i:Math.max(this.getZoomLevel(),i);if(u{if(Tc)return;Tc=document.createElement("style"),Tc.innerHTML=` + :root { + --css-label-background-color: #1e2428; + --css-label-brightness: brightness(150%); + } + + .${P0} { + position: absolute; + top: 0; + left: 0; + + font-weight: 500; + cursor: pointer; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + filter: var(--css-label-brightness); + pointer-events: none; + background-color: var(--css-label-background-color); + font-weight: 700; + border-radius: 6px; + + transition: opacity 600ms; + opacity: 1; + } + + .${dk} { + opacity: 0 !important; + } +`;const r=document.head.getElementsByTagName("style")[0];r?document.head.insertBefore(Tc,r):document.head.appendChild(Tc)};class uk{constructor(e,t){this.element=document.createElement("div"),this.fontWidthHeightRatio=.6,this._x=0,this._y=0,this._estimatedWidth=0,this._estimatedHeight=0,this._visible=!1,this._prevVisible=!1,this._weight=0,this._customFontSize=th,this._customColor=void 0,this._customOpacity=void 0,this._shouldBeShown=!1,this._text="",this._customPadding={left:qa,top:Ya,right:qa,bottom:Ya},vz(),this._container=e,this._updateClasses(),t&&this.setText(t),this.resetFontSize(),this.resetPadding()}setText(e){this._text!==e&&(this._text=e,this.element.innerHTML=e,this._measureText())}setPosition(e,t){this._x=e,this._y=t}setStyle(e){if(this._customStyle!==e&&(this._customStyle=e,this.element.style.cssText=this._customStyle,this._customColor&&(this.element.style.color=this._customColor),this._customOpacity&&(this.element.style.opacity=String(this._customOpacity)),this._customPointerEvents&&(this.element.style.pointerEvents=this._customPointerEvents),this._customFontSize&&(this.element.style.fontSize=`${this._customFontSize}px`),this._customPadding)){const{top:t,right:i,bottom:n,left:s}=this._customPadding;this.element.style.padding=`${t}px ${i}px ${n}px ${s}px`}}setClassName(e){this._customClassName!==e&&(this._customClassName=e,this._updateClasses())}setFontSize(e=th){this._customFontSize!==e&&(this.element.style.fontSize=`${e}px`,this._customFontSize=e,this._measureText())}resetFontSize(){this.element.style.fontSize=`${th}px`,this._customFontSize=th,this._measureText()}setColor(e){this._customColor!==e&&(this.element.style.color=e,this._customColor=e)}resetColor(){this.element.style.removeProperty("color"),this._customColor=void 0}setOpacity(e){this._customOpacity!==e&&(this.element.style.opacity=String(e),this._customOpacity=e)}resetOpacity(){this.element.style.removeProperty("opacity"),this._customOpacity=void 0}setPointerEvents(e){this._customPointerEvents!==e&&(this.element.style.pointerEvents=`${e}`,this._customPointerEvents=e)}resetPointerEvents(){this.element.style.removeProperty("pointer-events"),this._customPointerEvents=void 0}setPadding(e={left:qa,top:Ya,right:qa,bottom:Ya}){(this._customPadding.left!==e.left||this._customPadding.top!==e.top||this._customPadding.right!==e.right||this._customPadding.bottom!==e.bottom)&&(this._customPadding=e,this.element.style.padding=`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`,this._measureText())}resetPadding(){const e={left:qa,top:Ya,right:qa,bottom:Ya};this.element.style.padding=`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`,this._customPadding=e,this._measureText()}setForceShow(e){this._shouldBeShown=e}getForceShow(){return this._shouldBeShown}draw(){const e=this.getVisibility();e!==this._prevVisible&&(this._prevVisible===!1?this._container.appendChild(this.element):this._container.removeChild(this.element),this._updateClasses(),this._prevVisible=e),e&&(this.element.style.transform=` + translate(-50%, -100%) + translate3d(${this._x}px, ${this._y}px, 0) + `)}overlaps(e){return gz({height:this._estimatedHeight,width:this._estimatedWidth,x:this._x,y:this._y},{height:e._estimatedHeight,width:e._estimatedWidth,x:e._x,y:e._y})}setVisibility(e=!0){this._visible=e}getVisibility(){return this._visible}isOnScreen(){return this._x>0&&this._y>0&&this._x{this.element.className=`${P0} ${this._customClassName||""}`}):this.element.className=`${P0} ${this._customClassName||""} ${dk}`}_measureText(){const{left:e,top:t,right:i,bottom:n}=this._customPadding;this._estimatedWidth=this._customFontSize*this.fontWidthHeightRatio*this.element.innerHTML.length+e+i,this._estimatedHeight=this._customFontSize+t+n}}const bh="css-label--labels-container",hk="css-label--labels-container-hidden";let Cc;const _z=()=>{if(Cc)return;Cc=document.createElement("style"),Cc.innerHTML=` + .${bh} { + transition: opacity 100ms; + position: absolute; + width: 100%; + height: 100%; + overflow: hidden; + top: 0%; + pointer-events: none; + opacity: 1; + } + .${hk} { + opacity: 0; + + div { + pointer-events: none; + } + } +`;const r=document.head.getElementsByTagName("style")[0];r?document.head.insertBefore(Cc,r):document.head.appendChild(Cc)};class yz{constructor(e,t){this._cssLabels=new Map,this._elementToData=new Map,_z(),this._container=e,e.addEventListener("click",this._onClick.bind(this)),this._container.className=bh,t!=null&&t.onLabelClick&&(this._onClickCallback=t.onLabelClick),t!=null&&t.padding&&(this._padding=t.padding),t!=null&&t.pointerEvents&&(this._pointerEvents=t.pointerEvents),t!=null&&t.dispatchWheelEventElement&&(this._dispatchWheelEventElement=t.dispatchWheelEventElement,this._container.addEventListener("wheel",this._onWheel.bind(this)))}setLabels(e){const t=new Map(this._cssLabels);e.forEach(i=>{const{x:n,y:s,fontSize:o,color:a,text:l,weight:c,opacity:d,shouldBeShown:u,style:h,className:f}=i;if(t.get(i.id))t.delete(i.id);else{const g=new uk(this._container,i.text);this._cssLabels.set(i.id,g),this._elementToData.set(g.element,i)}const p=this._cssLabels.get(i.id);p&&(p.setText(l),p.setPosition(n,s),h!==void 0&&p.setStyle(h),c!==void 0&&p.setWeight(c),o!==void 0&&p.setFontSize(o),a!==void 0&&p.setColor(a),this._padding!==void 0&&p.setPadding(this._padding),this._pointerEvents!==void 0&&p.setPointerEvents(this._pointerEvents),d!==void 0&&p.setOpacity(d),u!==void 0&&p.setForceShow(u),f!==void 0&&p.setClassName(f))});for(const[i]of t){const n=this._cssLabels.get(i);n&&(this._elementToData.delete(n.element),n.destroy()),this._cssLabels.delete(i)}}draw(e=!0){e&&this._intersectLabels(),this._cssLabels.forEach(t=>t.draw())}show(){this._container.className=bh}hide(){this._container.className=`${bh} ${hk}`}destroy(){this._container.removeEventListener("click",this._onClick.bind(this)),this._container.removeEventListener("wheel",this._onWheel.bind(this)),this._cssLabels.forEach(e=>e.destroy())}_onClick(e){var t;const i=this._elementToData.get(e.target);i&&((t=this._onClickCallback)===null||t===void 0||t.call(this,e,i))}_onWheel(e){var t;e.preventDefault();const i=new WheelEvent("wheel",e);(t=this._dispatchWheelEventElement)===null||t===void 0||t.dispatchEvent(i)}_intersectLabels(){const e=Array.from(this._cssLabels.values());e.forEach(t=>t.setVisibility(t.isOnScreen()));for(let t=0;ti.getWeight()?i.setVisibility(s.getForceShow()?!1:i.getForceShow()):s.setVisibility(i.getForceShow()?!1:s.getForceShow());continue}}}}}var Qw;(function(r){r.BORDER_BOX="border-box",r.CONTENT_BOX="content-box",r.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Qw||(Qw={}));var n_=function(r){return Object.freeze(r)},bz=function(){function r(e,t){this.inlineSize=e,this.blockSize=t,n_(this)}return r}(),xz=function(){function r(e,t,i,n){return this.x=e,this.y=t,this.width=i,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,n_(this)}return r.prototype.toJSON=function(){var e=this,t=e.x,i=e.y,n=e.top,s=e.right,o=e.bottom,a=e.left,l=e.width,c=e.height;return{x:t,y:i,top:n,right:s,bottom:o,left:a,width:l,height:c}},r.fromRect=function(e){return new r(e.x,e.y,e.width,e.height)},r}(),$w=typeof window!="undefined"?window:{};/msie|trident/i.test($w.navigator&&$w.navigator.userAgent);var Pg=function(r,e,t){return r===void 0&&(r=0),e===void 0&&(e=0),t===void 0&&(t=!1),new bz((t?e:r)||0,(t?r:e)||0)};n_({devicePixelContentBoxSize:Pg(),borderBoxSize:Pg(),contentBoxSize:Pg(),contentRect:new xz(0,0,0,0)});Ns(".%L");Ns(":%S");Ns("%I:%M");Ns("%I %p");Ns("%a %d");Ns("%b %d");Ns("%b");Ns("%Y");const wz=r=>typeof r=="function",Sz=r=>Array.isArray(r),Tz=r=>r instanceof Object,nf=r=>r.constructor.name!=="Function"&&r.constructor.name!=="Object",e2=r=>Tz(r)&&!Sz(r)&&!wz(r)&&!nf(r),sf=(r,e=new Map)=>{if(typeof r!="object"||r===null)return r;if(r instanceof Date)return new Date(r.getTime());if(r instanceof Array){const t=[];e.set(r,t);for(const i of r)t.push(e.has(i)?e.get(i):sf(i,e));return r}if(nf(r))return r;if(r instanceof Object){const t={};e.set(r,t);const i=r;return Object.keys(r).reduce((n,s)=>(n[s]=e.has(i[s])?e.get(i[s]):sf(i[s],e),n),t),t}return r},D0=(r,e,t=new Map)=>{const i=nf(r)?r:sf(r);return r===e?r:t.has(e)?t.get(e):(t.set(e,i),Object.keys(e).forEach(n=>{e2(r[n])&&e2(e[n])?i[n]=D0(r[n],e[n],t):nf(e)?i[n]=e:i[n]=sf(e[n])}),i)};var t2=[],kc=[];function Td(r,e){if(r&&typeof document!="undefined"){var t,i=e.prepend===!0?"prepend":"append",n=e.singleTag===!0,s=typeof e.container=="string"?document.querySelector(e.container):document.getElementsByTagName("head")[0];if(n){var o=t2.indexOf(s);o===-1&&(o=t2.push(s)-1,kc[o]={}),t=kc[o]&&kc[o][i]?kc[o][i]:kc[o][i]=a()}else t=a();r.charCodeAt(0)===65279&&(r=r.substring(1)),t.styleSheet?t.styleSheet.cssText+=r:t.appendChild(document.createTextNode(r))}function a(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),e.attributes)for(var c=Object.keys(e.attributes),d=0;d32){const e=[],t=r.ctx.length/32;for(let i=0;i{Pz(r,t,e[t])})}function Pz(r,e,t){e in r?r[e]=typeof r[e]=="boolean"&&t===""||t:a_(r,e,t)}function of(r){return/-/.test(r)?Lz:M0}function Dz(r){return Array.from(r.childNodes)}function s2(r,e){return new r(e)}let ld;function Xc(r){ld=r}function Yl(){if(!ld)throw new Error("Function called outside component initialization");return ld}function Mz(r){Yl().$$.on_destroy.push(r)}function Rz(r,e){return Yl().$$.context.set(r,e),e}function pk(r){return Yl().$$.context.get(r)}const sl=[],oa=[];let _l=[];const o2=[],Fz=Promise.resolve();let R0=!1;function Nz(){R0||(R0=!0,Fz.then(gk))}function F0(r){_l.push(r)}const Dg=new Set;let Za=0;function gk(){if(Za!==0)return;const r=ld;do{try{for(;Zar.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),_l=e}const xh=new Set;let ia;function vk(){ia={r:0,c:[],p:ia}}function _k(){ia.r||zs(ia.c),ia=ia.p}function ss(r,e){r&&r.i&&(xh.delete(r),r.i(e))}function Ms(r,e,t,i){if(r&&r.o){if(xh.has(r))return;xh.add(r),ia.c.push(()=>{xh.delete(r),i&&(t&&r.d(1),i())}),r.o(e)}else i&&i()}function kd(r,e){const t={},i={},n={$$scope:1};let s=r.length;for(;s--;){const o=r[s],a=e[s];if(a){for(const l in o)l in a||(i[l]=1);for(const l in a)n[l]||(t[l]=a[l],n[l]=1);r[s]=a}else for(const l in o)n[l]=1}for(const o in i)o in t||(t[o]=void 0);return t}function a2(r){return typeof r=="object"&&r!==null?r:{}}function l2(r){r&&r.c()}function N0(r,e,t,i){const{fragment:n,after_update:s}=r.$$;n&&n.m(e,t),i||F0(()=>{const o=r.$$.on_mount.map(fk).filter(xa);r.$$.on_destroy?r.$$.on_destroy.push(...o):zs(o),r.$$.on_mount=[]}),s.forEach(F0)}function z0(r,e){const t=r.$$;t.fragment!==null&&(Bz(t.after_update),zs(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function l_(r,e,t,i,n,s,o,a=[-1]){const l=ld;Xc(r);const c=r.$$={fragment:null,ctx:[],props:s,update:Nl,not_equal:n,bound:r2(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:r2(),dirty:a,skip_bound:!1,root:e.target||l.$$.root};let d=!1;if(c.ctx=t?t(r,e.props||{},(u,h,...f)=>{const m=f.length?f[0]:h;return c.ctx&&n(c.ctx[u],c.ctx[u]=m)&&(!c.skip_bound&&c.bound[u]&&c.bound[u](m),d&&function(p,g){p.$$.dirty[0]===-1&&(sl.push(p),Nz(),p.$$.dirty.fill(0)),p.$$.dirty[g/31|0]|=1<{const n=i.indexOf(t);n!==-1&&i.splice(n,1)}}$set(e){this.$$set&&!Ez(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function af(r){return Object.entries(r).filter(([e,t])=>e!==""&&t).map(([e])=>e).join(" ")}const c2=/^[a-z]+(?::(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/,jz=/^[^$]+(?:\$(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/;function d_(r){let e,t=[];function i(n){const s=r.$$.callbacks[n.type];s&&s.slice().forEach(o=>o.call(this,n))}return r.$on=(n,s)=>{let o=n,a=()=>{};return e?a=e(o,s):t.push([o,s]),o.match(c2)&&console&&console.warn('Event modifiers in SMUI now use "$" instead of ":", so that all events can be bound with modifiers. Please update your event binding: ',o),()=>{a()}},n=>{const s=[],o={};e=(a,l)=>{let c=a,d=l,u=!1;const h=c.match(c2),f=c.match(jz),m=h||f;if(c.match(/^SMUI:\w+:/)){const b=c.split(":");let S="";for(let _=0;_x.slice(0,1).toUpperCase()+x.slice(1)).join("");console.warn(`The event ${c.split("$")[0]} has been renamed to ${S.split("$")[0]}.`),c=S}if(m){const b=c.split(h?":":"$");c=b[0];const S=b.slice(1).reduce((_,x)=>(_[x]=!0,_),{});S.passive&&(u=u||{},u.passive=!0),S.nonpassive&&(u=u||{},u.passive=!1),S.capture&&(u=u||{},u.capture=!0),S.once&&(u=u||{},u.once=!0),S.preventDefault&&(p=d,d=function(_){return _.preventDefault(),p.call(this,_)}),S.stopPropagation&&(d=function(_){return function(x){return x.stopPropagation(),_.call(this,x)}}(d)),S.stopImmediatePropagation&&(d=function(_){return function(x){return x.stopImmediatePropagation(),_.call(this,x)}}(d)),S.self&&(d=function(_,x){return function(I){if(I.target===_)return x.call(this,I)}}(n,d)),S.trusted&&(d=function(_){return function(x){if(x.isTrusted)return _.call(this,x)}}(d))}var p;const g=d2(n,c,d,u),v=()=>{g();const b=s.indexOf(v);b>-1&&s.splice(b,1)};return s.push(v),c in o||(o[c]=d2(n,c,i)),v};for(let a=0;a{for(let a=0;ar.removeEventListener(e,t,i)}function Bf(r,e){let t=[];if(e)for(let i=0;i1?t.push(s(r,n[1])):t.push(s(r))}return{update(i){if((i&&i.length||0)!=t.length)throw new Error("You must not change the length of an actions array.");if(i)for(let n=0;n1?s.update(o[1]):s.update()}}},destroy(){for(let i=0;i{o[d]=null}),_k(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),ss(t,1),t.m(i.parentNode,i))},i(l){n||(ss(t),n=!0)},o(l){Ms(t),n=!1},d(l){o[e].d(l),l&&Bs(i)}}}function Xz(r,e,t){let i;const n=["use","tag","getElement"];let s=zl(e,n),{$$slots:o={},$$scope:a}=e,{use:l=[]}=e,{tag:c}=e;const d=d_(Yl());let u;return r.$$set=h=>{e=xn(xn({},e),s_(h)),t(5,s=zl(e,n)),"use"in h&&t(0,l=h.use),"tag"in h&&t(1,c=h.tag),"$$scope"in h&&t(7,a=h.$$scope)},r.$$.update=()=>{2&r.$$.dirty&&t(3,i=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].indexOf(c)>-1)},[l,c,u,i,d,s,function(){return u},a,o,function(h){oa[h?"unshift":"push"](()=>{u=h,t(2,u)})},function(h){oa[h?"unshift":"push"](()=>{u=h,t(2,u)})},function(h){oa[h?"unshift":"push"](()=>{u=h,t(2,u)})}]}let yk=class extends c_{constructor(e){super(),l_(this,e,Xz,Hz,Cd,{use:0,tag:1,getElement:6})}get getElement(){return this.$$.ctx[6]}};var B0=function(r,e){return B0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},B0(r,e)};function js(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}B0(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var er=function(){return er=Object.assign||function(r){for(var e,t=1,i=arguments.length;t=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function u2(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var i,n,s=t.call(r),o=[];try{for(;(e===void 0||e-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(a){n={error:a}}finally{try{i&&!i.done&&(t=s.return)&&t.call(s)}finally{if(n)throw n.error}}return o}function Wz(r,e,t){if(arguments.length===2)for(var i,n=0,s=e.length;nd&&!u(m[g].index)){v=g;break}return v!==-1?(h.sortedIndexCursor=v,m[h.sortedIndexCursor].index):-1}(s,o,l,e):function(c,d,u){var h=u.typeaheadBuffer[0],f=c.get(h);if(!f)return-1;var m=f[u.sortedIndexCursor];if(m.text.lastIndexOf(u.typeaheadBuffer,0)===0&&!d(m.index))return m.index;for(var p=(u.sortedIndexCursor+1)%f.length,g=-1;p!==u.sortedIndexCursor;){var v=f[p],b=v.text.lastIndexOf(u.typeaheadBuffer,0)===0,S=!d(v.index);if(b&&S){g=p;break}p=(p+1)%f.length}return g!==-1?(u.sortedIndexCursor=g,f[u.sortedIndexCursor].index):-1}(s,l,e),t===-1||a||n(t),t}function bk(r){return r.typeaheadBuffer.length>0}function xk(r){r.typeaheadBuffer=""}function h2(r,e){var t=r.event,i=r.isTargetListItem,n=r.focusedItemIndex,s=r.focusItemAtIndex,o=r.sortedIndexByFirstChar,a=r.isItemAtIndexDisabled,l=Ir(t)==="ArrowLeft",c=Ir(t)==="ArrowUp",d=Ir(t)==="ArrowRight",u=Ir(t)==="ArrowDown",h=Ir(t)==="Home",f=Ir(t)==="End",m=Ir(t)==="Enter",p=Ir(t)==="Spacebar";return t.altKey||t.ctrlKey||t.metaKey||l||c||d||u||h||f||m?-1:p||t.key.length!==1?p?(i&&gn(t),i&&bk(e)?j0({focusItemAtIndex:s,focusedItemIndex:n,nextChar:" ",sortedIndexByFirstChar:o,skipFocus:!1,isItemAtIndexDisabled:a},e):-1):-1:(gn(t),j0({focusItemAtIndex:s,focusedItemIndex:n,nextChar:t.key.toLowerCase(),sortedIndexByFirstChar:o,skipFocus:!1,isItemAtIndexDisabled:a},e))}/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var dB=["Alt","Control","Meta","Shift"];function f2(r){var e=new Set(r?dB.filter(function(t){return r.getModifierState(t)}):[]);return function(t){return t.every(function(i){return e.has(i)})&&t.length===e.size}}(function(r){function e(t){var i=r.call(this,er(er({},e.defaultAdapter),t))||this;return i.wrapFocus=!1,i.isVertical=!0,i.isSingleSelectionList=!1,i.areDisabledItemsFocusable=!0,i.selectedIndex=Ki.UNSET_INDEX,i.focusedItemIndex=Ki.UNSET_INDEX,i.useActivatedClass=!1,i.useSelectedAttr=!1,i.ariaCurrentAttrValue=null,i.isCheckboxList=!1,i.isRadioList=!1,i.lastSelectedIndex=null,i.hasTypeahead=!1,i.typeaheadState=lB(),i.sortedIndexByFirstChar=new Map,i}return js(e,r),Object.defineProperty(e,"strings",{get:function(){return so},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return $t},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Ki},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},listItemAtIndexHasClass:function(){return!1},notifyAction:function(){},notifySelectionChange:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function(){return""}}},enumerable:!1,configurable:!0}),e.prototype.layout=function(){this.adapter.getListItemCount()!==0&&(this.adapter.hasCheckboxAtIndex(0)?this.isCheckboxList=!0:this.adapter.hasRadioAtIndex(0)?this.isRadioList=!0:this.maybeInitializeSingleSelection(),this.hasTypeahead&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex()))},e.prototype.getFocusedItemIndex=function(){return this.focusedItemIndex},e.prototype.setWrapFocus=function(t){this.wrapFocus=t},e.prototype.setVerticalOrientation=function(t){this.isVertical=t},e.prototype.setSingleSelection=function(t){this.isSingleSelectionList=t,t&&(this.maybeInitializeSingleSelection(),this.selectedIndex=this.getSelectedIndexFromDOM())},e.prototype.setDisabledItemsFocusable=function(t){this.areDisabledItemsFocusable=t},e.prototype.maybeInitializeSingleSelection=function(){var t=this.getSelectedIndexFromDOM();t!==Ki.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(t,$t.LIST_ITEM_ACTIVATED_CLASS)&&this.setUseActivatedClass(!0),this.isSingleSelectionList=!0,this.selectedIndex=t)},e.prototype.getSelectedIndexFromDOM=function(){for(var t=Ki.UNSET_INDEX,i=this.adapter.getListItemCount(),n=0;n=0&&(this.focusedItemIndex=t,this.adapter.setAttributeForElementIndex(t,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(t,"0"))},e.prototype.handleFocusOut=function(t){var i=this;t>=0&&(this.adapter.setAttributeForElementIndex(t,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(t,"-1")),setTimeout(function(){i.adapter.isFocusInsideList()||i.setTabindexToFirstSelectedOrFocusedItem()},0)},e.prototype.isIndexDisabled=function(t){return this.adapter.listItemAtIndexHasClass(t,$t.LIST_ITEM_DISABLED_CLASS)},e.prototype.handleKeydown=function(t,i,n){var s,o=this,a=Ir(t)==="ArrowLeft",l=Ir(t)==="ArrowUp",c=Ir(t)==="ArrowRight",d=Ir(t)==="ArrowDown",u=Ir(t)==="Home",h=Ir(t)==="End",f=Ir(t)==="Enter",m=Ir(t)==="Spacebar",p=this.isVertical&&d||!this.isVertical&&c,g=this.isVertical&&l||!this.isVertical&&a,v=t.key==="A"||t.key==="a",b=f2(t);if(this.adapter.isRootFocused()){if((g||h)&&b([])?(t.preventDefault(),this.focusLastElement()):(p||u)&&b([])?(t.preventDefault(),this.focusFirstElement()):g&&b(["Shift"])&&this.isCheckboxList?(t.preventDefault(),(x=this.focusLastElement())!==-1&&this.setSelectedIndexOnAction(x,!1)):p&&b(["Shift"])&&this.isCheckboxList&&(t.preventDefault(),(x=this.focusFirstElement())!==-1&&this.setSelectedIndexOnAction(x,!1)),this.hasTypeahead){var S={event:t,focusItemAtIndex:function(T){o.focusItemAtIndex(T)},focusedItemIndex:-1,isTargetListItem:i,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(T){return o.isIndexDisabled(T)}};h2(S,this.typeaheadState)}}else{var _=this.adapter.getFocusedElementIndex();if(!(_===-1&&(_=n)<0)){if(p&&b([]))gn(t),this.focusNextElement(_);else if(g&&b([]))gn(t),this.focusPrevElement(_);else if(p&&b(["Shift"])&&this.isCheckboxList)gn(t),(x=this.focusNextElement(_))!==-1&&this.setSelectedIndexOnAction(x,!1);else if(g&&b(["Shift"])&&this.isCheckboxList){var x;gn(t),(x=this.focusPrevElement(_))!==-1&&this.setSelectedIndexOnAction(x,!1)}else if(u&&b([]))gn(t),this.focusFirstElement();else if(h&&b([]))gn(t),this.focusLastElement();else if(u&&b(["Control","Shift"])&&this.isCheckboxList){if(gn(t),this.isIndexDisabled(_))return;this.focusFirstElement(),this.toggleCheckboxRange(0,_,_)}else if(h&&b(["Control","Shift"])&&this.isCheckboxList){if(gn(t),this.isIndexDisabled(_))return;this.focusLastElement(),this.toggleCheckboxRange(_,this.adapter.getListItemCount()-1,_)}else if(v&&b(["Control"])&&this.isCheckboxList)t.preventDefault(),this.checkboxListToggleAll(this.selectedIndex===Ki.UNSET_INDEX?[]:this.selectedIndex,!0);else if((f||m)&&b([])){if(i){if((I=t.target)&&I.tagName==="A"&&f||(gn(t),this.isIndexDisabled(_)))return;this.isTypeaheadInProgress()||(this.isSelectableList()&&this.setSelectedIndexOnAction(_,!1),this.adapter.notifyAction(_))}}else if((f||m)&&b(["Shift"])&&this.isCheckboxList){var I;if((I=t.target)&&I.tagName==="A"&&f||(gn(t),this.isIndexDisabled(_)))return;this.isTypeaheadInProgress()||(this.toggleCheckboxRange((s=this.lastSelectedIndex)!==null&&s!==void 0?s:_,_,_),this.adapter.notifyAction(_))}this.hasTypeahead&&(S={event:t,focusItemAtIndex:function(T){o.focusItemAtIndex(T)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:i,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(T){return o.isIndexDisabled(T)}},h2(S,this.typeaheadState))}}},e.prototype.handleClick=function(t,i,n){var s,o=f2(n);t!==Ki.UNSET_INDEX&&(this.isIndexDisabled(t)||(o([])?(this.isSelectableList()&&this.setSelectedIndexOnAction(t,i),this.adapter.notifyAction(t)):this.isCheckboxList&&o(["Shift"])&&(this.toggleCheckboxRange((s=this.lastSelectedIndex)!==null&&s!==void 0?s:t,t,t),this.adapter.notifyAction(t))))},e.prototype.focusNextElement=function(t){var i=this.adapter.getListItemCount(),n=t,s=null;do{if(++n>=i){if(!this.wrapFocus)return t;n=0}if(n===s)return-1;s=s!=null?s:n}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(n));return this.focusItemAtIndex(n),n},e.prototype.focusPrevElement=function(t){var i=this.adapter.getListItemCount(),n=t,s=null;do{if(--n<0){if(!this.wrapFocus)return t;n=i-1}if(n===s)return-1;s=s!=null?s:n}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(n));return this.focusItemAtIndex(n),n},e.prototype.focusFirstElement=function(){return this.focusNextElement(-1)},e.prototype.focusLastElement=function(){return this.focusPrevElement(this.adapter.getListItemCount())},e.prototype.focusInitialElement=function(){var t=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(t),t},e.prototype.setEnabled=function(t,i){this.isIndexValid(t,!1)&&(i?(this.adapter.removeClassForElementIndex(t,$t.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,so.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(t,$t.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,so.ARIA_DISABLED,"true")))},e.prototype.setSingleSelectionAtIndex=function(t,i){if(i===void 0&&(i={}),this.selectedIndex!==t||i.forceUpdate){var n=$t.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass&&(n=$t.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex!==Ki.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex,n),this.setAriaForSingleSelectionAtIndex(t),this.setTabindexAtIndex(t),t!==Ki.UNSET_INDEX&&this.adapter.addClassForElementIndex(t,n),this.selectedIndex=t,i.isUserInteraction&&!i.forceUpdate&&this.adapter.notifySelectionChange([t])}},e.prototype.setAriaForSingleSelectionAtIndex=function(t){this.selectedIndex===Ki.UNSET_INDEX&&(this.ariaCurrentAttrValue=this.adapter.getAttributeForElementIndex(t,so.ARIA_CURRENT));var i=this.ariaCurrentAttrValue!==null,n=i?so.ARIA_CURRENT:so.ARIA_SELECTED;if(this.selectedIndex!==Ki.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,n,"false"),t!==Ki.UNSET_INDEX){var s=i?this.ariaCurrentAttrValue:"true";this.adapter.setAttributeForElementIndex(t,n,s)}},e.prototype.getSelectionAttribute=function(){return this.useSelectedAttr?so.ARIA_SELECTED:so.ARIA_CHECKED},e.prototype.setRadioAtIndex=function(t,i){i===void 0&&(i={});var n=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(t,!0),(this.selectedIndex!==t||i.forceUpdate)&&(this.selectedIndex!==Ki.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,n,"false"),this.adapter.setAttributeForElementIndex(t,n,"true"),this.selectedIndex=t,i.isUserInteraction&&!i.forceUpdate&&this.adapter.notifySelectionChange([t]))},e.prototype.setCheckboxAtIndex=function(t,i){i===void 0&&(i={});for(var n=this.selectedIndex,s=i.isUserInteraction?new Set(n===Ki.UNSET_INDEX?[]:n):null,o=this.getSelectionAttribute(),a=[],l=0;l=0;d!==c&&a.push(l),this.adapter.setCheckedCheckboxOrRadioAtIndex(l,d),this.adapter.setAttributeForElementIndex(l,o,d?"true":"false")}this.selectedIndex=t,i.isUserInteraction&&a.length&&this.adapter.notifySelectionChange(a)},e.prototype.toggleCheckboxRange=function(t,i,n){this.lastSelectedIndex=n;for(var s=new Set(this.selectedIndex===Ki.UNSET_INDEX?[]:this.selectedIndex),o=!(s!=null&&s.has(n)),a=u2([t,i].sort(),2),l=a[0],c=a[1],d=this.getSelectionAttribute(),u=[],h=l;h<=c;h++)this.isIndexDisabled(h)||o!==s.has(h)&&(u.push(h),this.adapter.setCheckedCheckboxOrRadioAtIndex(h,o),this.adapter.setAttributeForElementIndex(h,d,""+o),o?s.add(h):s.delete(h));u.length&&(this.selectedIndex=Wz([],u2(s)),this.adapter.notifySelectionChange(u))},e.prototype.setTabindexAtIndex=function(t){this.focusedItemIndex===Ki.UNSET_INDEX&&t!==0?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==t&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),this.selectedIndex instanceof Array||this.selectedIndex===t||this.adapter.setAttributeForElementIndex(this.selectedIndex,"tabindex","-1"),t!==Ki.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(t,"tabindex","0")},e.prototype.isSelectableList=function(){return this.isSingleSelectionList||this.isCheckboxList||this.isRadioList},e.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var t=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(t)},e.prototype.getFirstSelectedOrFocusedItemIndex=function(){return this.isSelectableList()?typeof this.selectedIndex=="number"&&this.selectedIndex!==Ki.UNSET_INDEX?this.selectedIndex:this.selectedIndex instanceof Array&&this.selectedIndex.length>0?this.selectedIndex.reduce(function(t,i){return Math.min(t,i)}):0:Math.max(this.focusedItemIndex,0)},e.prototype.isIndexValid=function(t,i){var n=this;if(i===void 0&&(i=!0),t instanceof Array){if(!this.isCheckboxList&&i)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return t.length===0||t.some(function(s){return n.isIndexInRange(s)})}if(typeof t=="number"){if(this.isCheckboxList&&i)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange(t)||this.isSingleSelectionList&&t===Ki.UNSET_INDEX}return!1},e.prototype.isIndexInRange=function(t){var i=this.adapter.getListItemCount();return t>=0&&t-1)&&s.push(o);this.setCheckboxAtIndex(s,{isUserInteraction:i})}},e.prototype.typeaheadMatchItem=function(t,i,n){var s=this;n===void 0&&(n=!1);var o={focusItemAtIndex:function(a){s.focusItemAtIndex(a)},focusedItemIndex:i||this.focusedItemIndex,nextChar:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:n,isItemAtIndexDisabled:function(a){return s.isIndexDisabled(a)}};return j0(o,this.typeaheadState)},e.prototype.typeaheadInitSortedIndex=function(){return cB(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},e.prototype.clearTypeaheadBuffer=function(){xk(this.typeaheadState)},e})(Gs);/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var uB={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},hB={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},m2={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};function fB(r,e,t){if(!r)return{x:0,y:0};var i,n,s=e.x,o=e.y,a=s+t.left,l=o+t.top;if(r.type==="touchstart"){var c=r;i=c.changedTouches[0].pageX-a,n=c.changedTouches[0].pageY-l}else{var d=r;i=d.pageX-a,n=d.pageY-l}return{x:i,y:n}}/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var p2=["touchstart","pointerdown","mousedown","keydown"],g2=["touchend","pointerup","mouseup","contextmenu"],ih=[];(function(r){function e(t){var i=r.call(this,er(er({},e.defaultAdapter),t))||this;return i.activationAnimationHasEnded=!1,i.activationTimer=0,i.fgDeactivationRemovalTimer=0,i.fgScale="0",i.frame={width:0,height:0},i.initialSize=0,i.layoutFrame=0,i.maxRadius=0,i.unboundedCoords={left:0,top:0},i.activationState=i.defaultActivationState(),i.activationTimerCallback=function(){i.activationAnimationHasEnded=!0,i.runDeactivationUXLogicIfReady()},i.activateHandler=function(n){i.activateImpl(n)},i.deactivateHandler=function(){i.deactivateImpl()},i.focusHandler=function(){i.handleFocus()},i.blurHandler=function(){i.handleBlur()},i.resizeHandler=function(){i.layout()},i}return js(e,r),Object.defineProperty(e,"cssClasses",{get:function(){return uB},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return hB},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return m2},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this,i=this.supportsPressRipple();if(this.registerRootHandlers(i),i){var n=e.cssClasses,s=n.ROOT,o=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter.addClass(s),t.adapter.isUnbounded()&&(t.adapter.addClass(o),t.layoutInternal())})}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var i=e.cssClasses,n=i.ROOT,s=i.UNBOUNDED;requestAnimationFrame(function(){t.adapter.removeClass(n),t.adapter.removeClass(s),t.removeCssVars()})}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(t){this.activateImpl(t)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame(function(){t.layoutInternal(),t.layoutFrame=0})},e.prototype.setUnbounded=function(t){var i=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame(function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)})},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame(function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)})},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(t){var i,n;if(t){try{for(var s=Fn(p2),o=s.next();!o.done;o=s.next()){var a=o.value;this.adapter.registerInteractionHandler(a,this.activateHandler)}}catch(l){i={error:l}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(t){var i,n;if(t.type==="keydown")this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var s=Fn(g2),o=s.next();!o.done;o=s.next()){var a=o.value;this.adapter.registerDocumentInteractionHandler(a,this.deactivateHandler)}}catch(l){i={error:l}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}},e.prototype.deregisterRootHandlers=function(){var t,i;try{for(var n=Fn(p2),s=n.next();!s.done;s=n.next()){var o=s.value;this.adapter.deregisterInteractionHandler(o,this.activateHandler)}}catch(a){t={error:a}}finally{try{s&&!s.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var t,i;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var n=Fn(g2),s=n.next();!s.done;s=n.next()){var o=s.value;this.adapter.deregisterDocumentInteractionHandler(o,this.deactivateHandler)}}catch(a){t={error:a}}finally{try{s&&!s.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},e.prototype.removeCssVars=function(){var t=this,i=e.strings;Object.keys(i).forEach(function(n){n.indexOf("VAR_")===0&&t.adapter.updateCssVariable(i[n],null)})},e.prototype.activateImpl=function(t){var i=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState;if(!n.isActivated){var s=this.previousActivationEvent;s&&t!==void 0&&s.type!==t.type||(n.isActivated=!0,n.isProgrammatic=t===void 0,n.activationEvent=t,n.wasActivatedByPointer=!n.isProgrammatic&&t!==void 0&&(t.type==="mousedown"||t.type==="touchstart"||t.type==="pointerdown"),t!==void 0&&ih.length>0&&ih.some(function(o){return i.adapter.containsEventTarget(o)})?this.resetActivationState():(t!==void 0&&(ih.push(t.target),this.registerDeactivationHandlers(t)),n.wasElementMadeActive=this.checkElementMadeActive(t),n.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame(function(){ih=[],n.wasElementMadeActive||t===void 0||t.key!==" "&&t.keyCode!==32||(n.wasElementMadeActive=i.checkElementMadeActive(t),n.wasElementMadeActive&&i.animateActivation()),n.wasElementMadeActive||(i.activationState=i.defaultActivationState())})))}}},e.prototype.checkElementMadeActive=function(t){return t===void 0||t.type!=="keydown"||this.adapter.isSurfaceActive()},e.prototype.animateActivation=function(){var t=this,i=e.strings,n=i.VAR_FG_TRANSLATE_START,s=i.VAR_FG_TRANSLATE_END,o=e.cssClasses,a=o.FG_DEACTIVATION,l=o.FG_ACTIVATION,c=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var d="",u="";if(!this.adapter.isUnbounded()){var h=this.getFgTranslationCoordinates(),f=h.startPoint,m=h.endPoint;d=f.x+"px, "+f.y+"px",u=m.x+"px, "+m.y+"px"}this.adapter.updateCssVariable(n,d),this.adapter.updateCssVariable(s,u),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(l),this.activationTimer=setTimeout(function(){t.activationTimerCallback()},c)},e.prototype.getFgTranslationCoordinates=function(){var t,i=this.activationState,n=i.activationEvent;return{startPoint:t={x:(t=i.wasActivatedByPointer?fB(n,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},e.prototype.runDeactivationUXLogicIfReady=function(){var t=this,i=e.cssClasses.FG_DEACTIVATION,n=this.activationState,s=n.hasDeactivationUXRun,o=n.isActivated;(s||!o)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(i),this.fgDeactivationRemovalTimer=setTimeout(function(){t.adapter.removeClass(i)},m2.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout(function(){return t.previousActivationEvent=void 0},e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var t=this,i=this.activationState;if(i.isActivated){var n=er({},i);i.isProgrammatic?(requestAnimationFrame(function(){t.animateDeactivation(n)}),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame(function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(n),t.resetActivationState()}))}},e.prototype.animateDeactivation=function(t){var i=t.wasActivatedByPointer,n=t.wasElementMadeActive;(i||n)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var i=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?i:Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2))+e.numbers.PADDING;var n=Math.floor(i*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&n%2!=0?this.initialSize=n-1:this.initialSize=n,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var t=e.strings,i=t.VAR_FG_SIZE,n=t.VAR_LEFT,s=t.VAR_TOP,o=t.VAR_FG_SCALE;this.adapter.updateCssVariable(i,this.initialSize+"px"),this.adapter.updateCssVariable(o,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(n,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(s,this.unboundedCoords.top+"px"))},e})(Gs);function mB(r){let e;const t=r[11].default,i=Mf(t,r,r[13],null);return{c(){i&&i.c()},m(n,s){i&&i.m(n,s),e=!0},p(n,s){i&&i.p&&(!e||8192&s)&&Ff(i,t,n,n[13],e?Rf(t,n[13],s,null):Nf(n[13]),null)},i(n){e||(ss(i,n),e=!0)},o(n){Ms(i,n),e=!1},d(n){i&&i.d(n)}}}function pB(r){let e,t,i;const n=[{tag:r[3]},{use:[r[8],...r[0]]},{class:af(Ui({[r[1]]:!0,[r[6]]:!0},r[5]))},r[7],r[9]];var s=r[2];function o(a){let l={$$slots:{default:[mB]},$$scope:{ctx:a}};for(let c=0;c{z0(d,1)}),_k()}s?(e=s2(s,o(a)),a[12](e),l2(e.$$.fragment),ss(e.$$.fragment,1),N0(e,t.parentNode,t)):e=null}else s&&e.$set(c)},i(a){i||(e&&ss(e.$$.fragment,a),i=!0)},o(a){e&&Ms(e.$$.fragment,a),i=!1},d(a){r[12](null),a&&Bs(t),e&&z0(e,a)}}}const Ss={component:yk,tag:"div",class:"",classMap:{},contexts:{},props:{}};function gB(r,e,t){const i=["use","class","component","tag","getElement"];let n,s=zl(e,i),{$$slots:o={},$$scope:a}=e,{use:l=[]}=e,{class:c=""}=e;const d=Ss.class,u={},h=[],f=Ss.contexts,m=Ss.props;let{component:p=Ss.component}=e,{tag:g=p===yk?Ss.tag:void 0}=e;Object.entries(Ss.classMap).forEach(([b,S])=>{const _=pk(S);_&&"subscribe"in _&&h.push(_.subscribe(x=>{t(5,u[b]=x,u)}))});const v=d_(Yl());for(let b in f)f.hasOwnProperty(b)&&Rz(b,f[b]);return Mz(()=>{for(const b of h)b()}),r.$$set=b=>{e=xn(xn({},e),s_(b)),t(9,s=zl(e,i)),"use"in b&&t(0,l=b.use),"class"in b&&t(1,c=b.class),"component"in b&&t(2,p=b.component),"tag"in b&&t(3,g=b.tag),"$$scope"in b&&t(13,a=b.$$scope)},[l,c,p,g,n,u,d,m,v,s,function(){return n.getElement()},o,function(b){oa[b?"unshift":"push"](()=>{n=b,t(4,n)})},a]}class vB extends c_{constructor(e){super(),l_(this,e,gB,pB,Cd,{use:0,class:1,component:2,tag:3,getElement:10})}get getElement(){return this.$$.ctx[10]}}const v2=Object.assign({},Ss);function cs(r){return new Proxy(vB,{construct:function(e,t){return Object.assign(Ss,v2,r),new e(...t)},get:function(e,t){return Object.assign(Ss,v2,r),e[t]}})}cs({class:"mdc-deprecated-list-item__text",tag:"span"});cs({class:"mdc-deprecated-list-item__primary-text",tag:"span"});cs({class:"mdc-deprecated-list-item__secondary-text",tag:"span"});cs({class:"mdc-deprecated-list-item__meta",tag:"span"});cs({class:"mdc-deprecated-list-group",tag:"div"});cs({class:"mdc-deprecated-list-group__subheader",tag:"h3"});/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var _B={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"};/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */(function(r){function e(t){var i=r.call(this,er(er({},e.defaultAdapter),t))||this;return i.shakeAnimationEndHandler=function(){i.handleShakeAnimationEnd()},i}return js(e,r),Object.defineProperty(e,"cssClasses",{get:function(){return _B},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.getWidth=function(){return this.adapter.getWidth()},e.prototype.shake=function(t){var i=e.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.float=function(t){var i=e.cssClasses,n=i.LABEL_FLOAT_ABOVE,s=i.LABEL_SHAKE;t?this.adapter.addClass(n):(this.adapter.removeClass(n),this.adapter.removeClass(s))},e.prototype.setRequired=function(t){var i=e.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.handleShakeAnimationEnd=function(){var t=e.cssClasses.LABEL_SHAKE;this.adapter.removeClass(t)},e})(Gs);/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var Xo={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"};/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */(function(r){function e(t){var i=r.call(this,er(er({},e.defaultAdapter),t))||this;return i.transitionEndHandler=function(n){i.handleTransitionEnd(n)},i}return js(e,r),Object.defineProperty(e,"cssClasses",{get:function(){return Xo},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},e.prototype.activate=function(){this.adapter.removeClass(Xo.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(Xo.LINE_RIPPLE_ACTIVE)},e.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},e.prototype.deactivate=function(){this.adapter.addClass(Xo.LINE_RIPPLE_DEACTIVATING)},e.prototype.handleTransitionEnd=function(t){var i=this.adapter.hasClass(Xo.LINE_RIPPLE_DEACTIVATING);t.propertyName==="opacity"&&i&&(this.adapter.removeClass(Xo.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(Xo.LINE_RIPPLE_DEACTIVATING))},e})(Gs);/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var yB={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},_2={NOTCH_ELEMENT_PADDING:8},bB={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"};/** + * @license + * Copyright 2017 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */(function(r){function e(t){return r.call(this,er(er({},e.defaultAdapter),t))||this}return js(e,r),Object.defineProperty(e,"strings",{get:function(){return yB},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return bB},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return _2},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.notch=function(t){var i=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=_2.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(t),this.adapter.addClass(i)},e.prototype.closeNotch=function(){var t=e.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(t),this.adapter.removeNotchWidthProperty()},e})(Gs);cs({class:"mdc-text-field-helper-line",tag:"div"});cs({class:"mdc-text-field__affix mdc-text-field__affix--prefix",tag:"span"});cs({class:"mdc-text-field__affix mdc-text-field__affix--suffix",tag:"span"});/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var Fg={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},xB={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},y2={LABEL_SCALE:.75},wB=["pattern","min","max","required","step","minlength","maxlength"],SB=["color","date","datetime-local","month","range","time","week"];/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var b2=["mousedown","touchstart"],x2=["click","keydown"];(function(r){function e(t,i){i===void 0&&(i={});var n=r.call(this,er(er({},e.defaultAdapter),t))||this;return n.isFocused=!1,n.receivedUserInput=!1,n.valid=!0,n.useNativeValidation=!0,n.validateOnValueChange=!0,n.helperText=i.helperText,n.characterCounter=i.characterCounter,n.leadingIcon=i.leadingIcon,n.trailingIcon=i.trailingIcon,n.inputFocusHandler=function(){n.activateFocus()},n.inputBlurHandler=function(){n.deactivateFocus()},n.inputInputHandler=function(){n.handleInput()},n.setPointerXOffset=function(s){n.setTransformOrigin(s)},n.textFieldInteractionHandler=function(){n.handleTextFieldInteraction()},n.validationAttributeChangeHandler=function(s){n.handleValidationAttributeChange(s)},n}return js(e,r),Object.defineProperty(e,"cssClasses",{get:function(){return xB},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Fg},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return y2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return SB.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver(function(){})},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t,i,n,s;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var o=Fn(b2),a=o.next();!a.done;a=o.next()){var l=a.value;this.adapter.registerInputInteractionHandler(l,this.setPointerXOffset)}}catch(u){t={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}try{for(var c=Fn(x2),d=c.next();!d.done;d=c.next())l=d.value,this.adapter.registerTextFieldInteractionHandler(l,this.textFieldInteractionHandler)}catch(u){n={error:u}}finally{try{d&&!d.done&&(s=c.return)&&s.call(c)}finally{if(n)throw n.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},e.prototype.destroy=function(){var t,i,n,s;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var o=Fn(b2),a=o.next();!a.done;a=o.next()){var l=a.value;this.adapter.deregisterInputInteractionHandler(l,this.setPointerXOffset)}}catch(u){t={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}try{for(var c=Fn(x2),d=c.next();!d.done;d=c.next())l=d.value,this.adapter.deregisterTextFieldInteractionHandler(l,this.textFieldInteractionHandler)}catch(u){n={error:u}}finally{try{d&&!d.done&&(s=c.return)&&s.call(c)}finally{if(n)throw n.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},e.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},e.prototype.handleValidationAttributeChange=function(t){var i=this;t.some(function(n){return wB.indexOf(n)>-1&&(i.styleValidity(!0),i.adapter.setLabelRequired(i.getNativeInput().required),!0)}),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},e.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var i=this.adapter.getLabelWidth()*y2.LABEL_SCALE;this.adapter.notchOutline(i)}else this.adapter.closeOutline()},e.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},e.prototype.setTransformOrigin=function(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var i=t.touches,n=i?i[0]:t,s=n.target.getBoundingClientRect(),o=n.clientX-s.left;this.adapter.setLineRippleTransformOrigin(o)}},e.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},e.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},e.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity(t),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},e.prototype.getValue=function(){return this.getNativeInput().value},e.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var i=this.isValid();this.styleValidity(i)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},e.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},e.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var i=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(i)},e.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},e.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},e.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},e.prototype.isDisabled=function(){return this.getNativeInput().disabled},e.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},e.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},e.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},e.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},e.prototype.setcharacterCounter=function(t){if(this.characterCounter){var i=this.getNativeInput().maxLength;if(i===-1)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,i)}},e.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},e.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},e.prototype.styleValidity=function(t){var i=e.cssClasses.INVALID;if(t?this.adapter.removeClass(i):this.adapter.addClass(i),this.helperText){if(this.helperText.setValidity(t),!this.helperText.isValidation())return;var n=this.helperText.isVisible(),s=this.helperText.getId();n&&s?this.adapter.setInputAttr(Fg.ARIA_DESCRIBEDBY,s):this.adapter.removeInputAttr(Fg.ARIA_DESCRIBEDBY)}},e.prototype.styleFocused=function(t){var i=e.cssClasses.FOCUSED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.styleDisabled=function(t){var i=e.cssClasses,n=i.DISABLED,s=i.INVALID;t?(this.adapter.addClass(n),this.adapter.removeClass(s)):this.adapter.removeClass(n),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},e.prototype.styleFloating=function(t){var i=e.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},e})(Gs);/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var w2={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},TB={ROOT:"mdc-text-field__icon"};/** + * @license + * Copyright 2017 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var S2=["click","keydown"];(function(r){function e(t){var i=r.call(this,er(er({},e.defaultAdapter),t))||this;return i.savedTabIndex=null,i.interactionHandler=function(n){i.handleInteraction(n)},i}return js(e,r),Object.defineProperty(e,"strings",{get:function(){return w2},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return TB},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t,i;this.savedTabIndex=this.adapter.getAttr("tabindex");try{for(var n=Fn(S2),s=n.next();!s.done;s=n.next()){var o=s.value;this.adapter.registerInteractionHandler(o,this.interactionHandler)}}catch(a){t={error:a}}finally{try{s&&!s.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},e.prototype.destroy=function(){var t,i;try{for(var n=Fn(S2),s=n.next();!s.done;s=n.next()){var o=s.value;this.adapter.deregisterInteractionHandler(o,this.interactionHandler)}}catch(a){t={error:a}}finally{try{s&&!s.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},e.prototype.setDisabled=function(t){this.savedTabIndex&&(t?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex),this.adapter.setAttr("role",w2.ICON_ROLE)))},e.prototype.setAriaLabel=function(t){this.adapter.setAttr("aria-label",t)},e.prototype.setContent=function(t){this.adapter.setContent(t)},e.prototype.handleInteraction=function(t){var i=t.key==="Enter"||t.keyCode===13;(t.type==="click"||i)&&(t.preventDefault(),this.adapter.notifyIconAction())},e})(Gs);/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var Ji,Wc,CB={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},kB={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",OPENING_EVENT:"MDCMenuSurface:opening",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},Ec={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30};(function(r){r[r.BOTTOM=1]="BOTTOM",r[r.CENTER=2]="CENTER",r[r.RIGHT=4]="RIGHT",r[r.FLIP_RTL=8]="FLIP_RTL"})(Ji||(Ji={})),function(r){r[r.TOP_LEFT=0]="TOP_LEFT",r[r.TOP_RIGHT=4]="TOP_RIGHT",r[r.BOTTOM_LEFT=1]="BOTTOM_LEFT",r[r.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",r[r.TOP_START=8]="TOP_START",r[r.TOP_END=12]="TOP_END",r[r.BOTTOM_START=9]="BOTTOM_START",r[r.BOTTOM_END=13]="BOTTOM_END"}(Wc||(Wc={}));/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var EB=function(r){function e(t){var i=r.call(this,er(er({},e.defaultAdapter),t))||this;return i.isSurfaceOpen=!1,i.isQuickOpen=!1,i.isHoistedElement=!1,i.isFixedPosition=!1,i.isHorizontallyCenteredOnViewport=!1,i.maxHeight=0,i.openBottomBias=0,i.openAnimationEndTimerId=0,i.closeAnimationEndTimerId=0,i.animationRequestId=0,i.anchorCorner=Wc.TOP_START,i.originCorner=Wc.TOP_START,i.anchorMargin={top:0,right:0,bottom:0,left:0},i.position={x:0,y:0},i}return js(e,r),Object.defineProperty(e,"cssClasses",{get:function(){return CB},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return kB},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Ec},enumerable:!1,configurable:!0}),Object.defineProperty(e,"Corner",{get:function(){return Wc},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyClosing:function(){},notifyOpen:function(){},notifyOpening:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=e.cssClasses,i=t.ROOT,n=t.OPEN;if(!this.adapter.hasClass(i))throw new Error(i+" class required in root element.");this.adapter.hasClass(n)&&(this.isSurfaceOpen=!0)},e.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},e.prototype.setAnchorCorner=function(t){this.anchorCorner=t},e.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^Ji.RIGHT},e.prototype.setAnchorMargin=function(t){this.anchorMargin.top=t.top||0,this.anchorMargin.right=t.right||0,this.anchorMargin.bottom=t.bottom||0,this.anchorMargin.left=t.left||0},e.prototype.setIsHoisted=function(t){this.isHoistedElement=t},e.prototype.setFixedPosition=function(t){this.isFixedPosition=t},e.prototype.isFixed=function(){return this.isFixedPosition},e.prototype.setAbsolutePosition=function(t,i){this.position.x=this.isFinite(t)?t:0,this.position.y=this.isFinite(i)?i:0},e.prototype.setIsHorizontallyCenteredOnViewport=function(t){this.isHorizontallyCenteredOnViewport=t},e.prototype.setQuickOpen=function(t){this.isQuickOpen=t},e.prototype.setMaxHeight=function(t){this.maxHeight=t},e.prototype.setOpenBottomBias=function(t){this.openBottomBias=t},e.prototype.isOpen=function(){return this.isSurfaceOpen},e.prototype.open=function(){var t=this;this.isSurfaceOpen||(this.adapter.notifyOpening(),this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(e.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame(function(){t.dimensions=t.adapter.getInnerDimensions(),t.autoposition(),t.adapter.addClass(e.cssClasses.OPEN),t.openAnimationEndTimerId=setTimeout(function(){t.openAnimationEndTimerId=0,t.adapter.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter.notifyOpen()},Ec.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},e.prototype.close=function(t){var i=this;if(t===void 0&&(t=!1),this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen)return this.isSurfaceOpen=!1,t||this.maybeRestoreFocus(),this.adapter.removeClass(e.cssClasses.OPEN),this.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),void this.adapter.notifyClose();this.adapter.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){i.adapter.removeClass(e.cssClasses.OPEN),i.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),i.closeAnimationEndTimerId=setTimeout(function(){i.closeAnimationEndTimerId=0,i.adapter.removeClass(e.cssClasses.ANIMATING_CLOSED),i.adapter.notifyClose()},Ec.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,t||this.maybeRestoreFocus()}},e.prototype.handleBodyClick=function(t){var i=t.target;this.adapter.isElementInContainer(i)||this.close()},e.prototype.handleKeydown=function(t){var i=t.keyCode;(t.key==="Escape"||i===27)&&this.close()},e.prototype.autoposition=function(){var t;this.measurements=this.getAutoLayoutmeasurements();var i=this.getoriginCorner(),n=this.getMenuSurfaceMaxHeight(i),s=this.hasBit(i,Ji.BOTTOM)?"bottom":"top",o=this.hasBit(i,Ji.RIGHT)?"right":"left",a=this.getHorizontalOriginOffset(i),l=this.getVerticalOriginOffset(i),c=this.measurements,d=c.anchorSize,u=c.surfaceSize,h=((t={})[o]=a,t[s]=l,t);d.width/u.width>Ec.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(o="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(h),this.adapter.setTransformOrigin(o+" "+s),this.adapter.setPosition(h),this.adapter.setMaxHeight(n?n+"px":""),this.hasBit(i,Ji.BOTTOM)||this.adapter.addClass(e.cssClasses.IS_OPEN_BELOW)},e.prototype.getAutoLayoutmeasurements=function(){var t=this.adapter.getAnchorDimensions(),i=this.adapter.getBodyDimensions(),n=this.adapter.getWindowDimensions(),s=this.adapter.getWindowScroll();return t||(t={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:t,bodySize:i,surfaceSize:this.dimensions,viewportDistance:{top:t.top,right:n.width-t.right,bottom:n.height-t.bottom,left:t.left},viewportSize:n,windowScroll:s}},e.prototype.getoriginCorner=function(){var t,i,n=this.originCorner,s=this.measurements,o=s.viewportDistance,a=s.anchorSize,l=s.surfaceSize,c=e.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,Ji.BOTTOM)?(t=o.top-c+this.anchorMargin.bottom,i=o.bottom-c-this.anchorMargin.bottom):(t=o.top-c+this.anchorMargin.top,i=o.bottom-c+a.height-this.anchorMargin.top),!(i-l.height>0)&&t>i+this.openBottomBias&&(n=this.setBit(n,Ji.BOTTOM));var d,u,h=this.adapter.isRtl(),f=this.hasBit(this.anchorCorner,Ji.FLIP_RTL),m=this.hasBit(this.anchorCorner,Ji.RIGHT)||this.hasBit(n,Ji.RIGHT),p=!1;(p=h&&f?!m:m)?(d=o.left+a.width+this.anchorMargin.right,u=o.right-this.anchorMargin.right):(d=o.left+this.anchorMargin.left,u=o.right+a.width-this.anchorMargin.left);var g=d-l.width>0,v=u-l.width>0,b=this.hasBit(n,Ji.FLIP_RTL)&&this.hasBit(n,Ji.RIGHT);return v&&b&&h||!g&&b?n=this.unsetBit(n,Ji.RIGHT):(g&&p&&h||g&&!p&&m||!v&&d>=u)&&(n=this.setBit(n,Ji.RIGHT)),n},e.prototype.getMenuSurfaceMaxHeight=function(t){if(this.maxHeight>0)return this.maxHeight;var i=this.measurements.viewportDistance,n=0,s=this.hasBit(t,Ji.BOTTOM),o=this.hasBit(this.anchorCorner,Ji.BOTTOM),a=e.numbers.MARGIN_TO_EDGE;return s?(n=i.top+this.anchorMargin.top-a,o||(n+=this.measurements.anchorSize.height)):(n=i.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-a,o&&(n-=this.measurements.anchorSize.height)),n},e.prototype.getHorizontalOriginOffset=function(t){var i=this.measurements.anchorSize,n=this.hasBit(t,Ji.RIGHT),s=this.hasBit(this.anchorCorner,Ji.RIGHT);if(n){var o=s?i.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?o-(this.measurements.viewportSize.width-this.measurements.bodySize.width):o}return s?i.width-this.anchorMargin.right:this.anchorMargin.left},e.prototype.getVerticalOriginOffset=function(t){var i=this.measurements.anchorSize,n=this.hasBit(t,Ji.BOTTOM),s=this.hasBit(this.anchorCorner,Ji.BOTTOM);return n?s?i.height-this.anchorMargin.top:-this.anchorMargin.bottom:s?i.height+this.anchorMargin.bottom:this.anchorMargin.top},e.prototype.adjustPositionForHoistedElement=function(t){var i,n,s=this.measurements,o=s.windowScroll,a=s.viewportDistance,l=s.surfaceSize,c=s.viewportSize,d=Object.keys(t);try{for(var u=Fn(d),h=u.next();!h.done;h=u.next()){var f=h.value,m=t[f]||0;!this.isHorizontallyCenteredOnViewport||f!=="left"&&f!=="right"?(m+=a[f],this.isFixedPosition||(f==="top"?m+=o.y:f==="bottom"?m-=o.y:f==="left"?m+=o.x:m-=o.x),t[f]=m):t[f]=(c.width-l.width)/2}}catch(p){i={error:p}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(i)throw i.error}}},e.prototype.maybeRestoreFocus=function(){var t=this,i=this.adapter.isFocused(),n=this.adapter.getOwnerDocument?this.adapter.getOwnerDocument():document,s=n.activeElement&&this.adapter.isElementInContainer(n.activeElement);(i||s)&&setTimeout(function(){t.adapter.restoreFocus()},Ec.TOUCH_EVENT_WAIT_MS)},e.prototype.hasBit=function(t,i){return!!(t&i)},e.prototype.setBit=function(t,i){return t|i},e.prototype.unsetBit=function(t,i){return t^i},e.prototype.isFinite=function(t){return typeof t=="number"&&isFinite(t)},e}(Gs);/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var cl,Ng={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},Qa={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list,.mdc-deprecated-list",SELECTED_EVENT:"MDCMenu:selected",SKIP_RESTORE_FOCUS:"data-menu-item-skip-restore-focus"},AB={FOCUS_ROOT_INDEX:-1};(function(r){r[r.NONE=0]="NONE",r[r.LIST_ROOT=1]="LIST_ROOT",r[r.FIRST_ITEM=2]="FIRST_ITEM",r[r.LAST_ITEM=3]="LAST_ITEM"})(cl||(cl={}));/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */(function(r){function e(t){var i=r.call(this,er(er({},e.defaultAdapter),t))||this;return i.closeAnimationEndTimerId=0,i.defaultFocusState=cl.LIST_ROOT,i.selectedIndex=-1,i}return js(e,r),Object.defineProperty(e,"cssClasses",{get:function(){return Ng},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Qa},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return AB},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},getAttributeFromElementAtIndex:function(){return null},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},e.prototype.handleKeydown=function(t){var i=t.key,n=t.keyCode;(i==="Tab"||n===9)&&this.adapter.closeSurface(!0)},e.prototype.handleItemAction=function(t){var i=this,n=this.adapter.getElementIndex(t);if(!(n<0)){this.adapter.notifySelected({index:n});var s=this.adapter.getAttributeFromElementAtIndex(n,Qa.SKIP_RESTORE_FOCUS)==="true";this.adapter.closeSurface(s),this.closeAnimationEndTimerId=setTimeout(function(){var o=i.adapter.getElementIndex(t);o>=0&&i.adapter.isSelectableItemAtIndex(o)&&i.setSelectedIndex(o)},EB.numbers.TRANSITION_CLOSE_DURATION)}},e.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case cl.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case cl.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case cl.NONE:break;default:this.adapter.focusListRoot()}},e.prototype.setDefaultFocusState=function(t){this.defaultFocusState=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex},e.prototype.setSelectedIndex=function(t){if(this.validatedIndex(t),!this.adapter.isSelectableItemAtIndex(t))throw new Error("MDCMenuFoundation: No selection group at specified index.");var i=this.adapter.getSelectedSiblingOfItemAtIndex(t);i>=0&&(this.adapter.removeAttributeFromElementAtIndex(i,Qa.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(i,Ng.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(t,Ng.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(t,Qa.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=t},e.prototype.setEnabled=function(t,i){this.validatedIndex(t),i?(this.adapter.removeClassFromElementAtIndex(t,$t.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,Qa.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(t,$t.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,Qa.ARIA_DISABLED_ATTR,"true"))},e.prototype.validatedIndex=function(t){var i=this.adapter.getMenuItemCount();if(!(t>=0&&t{e=xn(xn({},e),s_(h)),t(5,n=zl(e,i)),"use"in h&&t(0,c=h.use),"class"in h&&t(1,d=h.class),"$$scope"in h&&t(7,o=h.$$scope)},[c,d,l,a,u,n,function(){return l},o,s,function(h){oa[h?"unshift":"push"](()=>{l=h,t(2,l)})}]}class LB extends c_{constructor(e){super(),l_(this,e,IB,OB,Cd,{use:0,class:1,getElement:6})}get getElement(){return this.$$.ctx[6]}}cs({class:"mdc-menu__selection-group-icon",component:LB});var PB='.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;cursor:text;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);left:0;letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.15rem;overflow:hidden;position:absolute;text-align:left;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);-webkit-transform-origin:left top;transform-origin:left top;transition:transform .15s cubic-bezier(.4,0,.2,1),color .15s cubic-bezier(.4,0,.2,1);white-space:nowrap;will-change:transform}.mdc-floating-label[dir=rtl],[dir=rtl] .mdc-floating-label{left:auto;right:0;text-align:right;-webkit-transform-origin:right top;transform-origin:right top}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:after{content:"*";margin-left:1px;margin-right:0}.mdc-floating-label--required[dir=rtl]:after,[dir=rtl] .mdc-floating-label--required:after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard .25s 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(0) translateY(-106%) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-106%) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-106%) scale(.75)}to{transform:translateX(0) translateY(-106%) scale(.75)}}.smui-floating-label--remove-transition{transition:unset!important}.smui-floating-label--force-size{position:absolute!important;transform:unset!important}.mdc-line-ripple:after,.mdc-line-ripple:before{border-bottom-style:solid;bottom:0;content:"";left:0;position:absolute;width:100%}.mdc-line-ripple:before{border-bottom-width:1px;z-index:1}.mdc-line-ripple:after{border-bottom-width:2px;opacity:0;transform:scaleX(0);transition:transform .18s cubic-bezier(.4,0,.2,1),opacity .18s cubic-bezier(.4,0,.2,1);z-index:2}.mdc-line-ripple--active:after{opacity:1;transform:scaleX(1)}.mdc-line-ripple--deactivating:after{opacity:0}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);line-height:1.5rem;list-style-type:none;margin:0;padding:8px 0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item__secondary-text{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.mdc-deprecated-list-item__graphic{background-color:transparent;color:rgba(0,0,0,.38);color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.mdc-deprecated-list-item__meta{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-hint-on-background,rgba(0,0,0,.38))}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__text{opacity:.38}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__secondary-text,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__text{color:#000;color:var(--mdc-theme-on-surface,#000)}.mdc-deprecated-list-item--activated,.mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-deprecated-list-item--selected,.mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.mdc-deprecated-list--dense{font-size:.812rem;padding-bottom:4px;padding-top:4px}.mdc-deprecated-list-item__wrapper{display:block}.mdc-deprecated-list-item{align-items:center;display:flex;height:48px;justify-content:flex-start;overflow:hidden;padding:0 16px;position:relative}.mdc-deprecated-list-item:focus{outline:none}.mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-deprecated-list-item:not(.mdc-deprecated-list-item--selected):focus:before{border:1px solid transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-deprecated-list-item:not(.mdc-deprecated-list-item--selected):focus:before{border-color:CanvasText}}.mdc-deprecated-list-item.mdc-deprecated-list-item--selected:before{border:3px double transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-deprecated-list-item.mdc-deprecated-list-item--selected:before{border-color:CanvasText}}.mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item{height:56px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item{height:56px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item{height:56px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-item{height:72px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--video-list .mdc-deprecated-list-item{height:72px;padding-left:0;padding-right:16px}.mdc-deprecated-list--video-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-item{padding-left:16px;padding-right:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{height:20px;margin-left:0;margin-right:16px;width:20px}.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list-item__graphic{fill:currentColor;align-items:center;flex-shrink:0;height:24px;justify-content:center;margin-left:0;margin-right:32px;object-fit:cover;width:24px}.mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list-item__graphic{margin-left:32px;margin-right:0}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic{height:24px;margin-left:0;margin-right:32px;width:24px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic{margin-left:32px;margin-right:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__graphic{border-radius:50%;height:40px;margin-left:0;margin-right:16px;width:40px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__graphic{height:40px;margin-left:0;margin-right:16px;width:40px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list--image-list .mdc-deprecated-list-item__graphic{height:56px;margin-left:0;margin-right:16px;width:56px}.mdc-deprecated-list--image-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list--video-list .mdc-deprecated-list-item__graphic{height:56px;margin-left:0;margin-right:16px;width:100px}.mdc-deprecated-list--video-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list .mdc-deprecated-list-item__graphic{display:inline-flex}.mdc-deprecated-list-item__meta{margin-left:auto;margin-right:0}.mdc-deprecated-list-item__meta:not(.material-icons){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit)}.mdc-deprecated-list-item[dir=rtl] .mdc-deprecated-list-item__meta,[dir=rtl] .mdc-deprecated-list-item .mdc-deprecated-list-item__meta{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdc-deprecated-list-item__primary-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-deprecated-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--image-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--video-list .mdc-deprecated-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--image-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--video-list .mdc-deprecated-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--image-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--video-list .mdc-deprecated-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__primary-text:before{content:"";display:inline-block;height:24px;vertical-align:0;width:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size,.875rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing,.0178571429em);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height,1.25rem);line-height:normal;margin-top:0;overflow:hidden;text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);white-space:nowrap}.mdc-deprecated-list-item__secondary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}.mdc-deprecated-list--dense .mdc-deprecated-list-item{height:40px}.mdc-deprecated-list--two-line .mdc-deprecated-list-item__text{align-self:flex-start}.mdc-deprecated-list--two-line .mdc-deprecated-list-item{height:64px}.mdc-deprecated-list--two-line.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--icon-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--image-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--video-list .mdc-deprecated-list-item{height:72px}.mdc-deprecated-list--two-line.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic{align-self:flex-start;margin-top:16px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--dense .mdc-deprecated-list-item{height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{height:36px;margin-left:0;margin-right:16px;width:36px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item{cursor:pointer}a.mdc-deprecated-list-item{color:inherit;text-decoration:none}.mdc-deprecated-list-divider{border:none;border-bottom:1px solid;border-bottom-color:rgba(0,0,0,.12);height:0;margin:0}.mdc-deprecated-list-divider--padded{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list-divider--padded[dir=rtl],[dir=rtl] .mdc-deprecated-list-divider--padded{margin-left:0;margin-right:16px}.mdc-deprecated-list-divider--inset{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list-divider--inset[dir=rtl],[dir=rtl] .mdc-deprecated-list-divider--inset{margin-left:0;margin-right:72px}.mdc-deprecated-list-divider--inset.mdc-deprecated-list-divider--padded{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list-divider--inset.mdc-deprecated-list-divider--padded[dir=rtl],[dir=rtl] .mdc-deprecated-list-divider--inset.mdc-deprecated-list-divider--padded{margin-left:0;margin-right:72px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:16px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:16px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:72px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:72px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:72px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:72px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:72px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:72px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading{margin-left:88px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:88px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:88px;margin-right:0;width:calc(100% - 104px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:88px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading{margin-left:116px;margin-right:0;width:calc(100% - 116px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:116px}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:116px;margin-right:0;width:calc(100% - 132px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:116px}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:0;width:100%}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:0}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:0}.mdc-deprecated-list-group .mdc-deprecated-list{padding:0}.mdc-deprecated-list-group__subheader{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);margin:.75rem 16px;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-list-item__primary-text{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.mdc-list-item__secondary-text{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.mdc-list-item__overline-text{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-hint-on-background,rgba(0,0,0,.38))}.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--with-trailing-icon .mdc-list-item__end{background-color:transparent;color:rgba(0,0,0,.38);color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.mdc-list-item__end{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-hint-on-background,rgba(0,0,0,.38))}.mdc-list-item--disabled .mdc-list-item__content,.mdc-list-item--disabled .mdc-list-item__end,.mdc-list-item--disabled .mdc-list-item__start{opacity:.38}.mdc-list-item--disabled .mdc-list-item__overline-text,.mdc-list-item--disabled .mdc-list-item__primary-text,.mdc-list-item--disabled .mdc-list-item__secondary-text,.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--disabled.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:#000;color:var(--mdc-theme-on-surface,#000)}.mdc-list-item--activated .mdc-list-item__primary-text,.mdc-list-item--activated.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--selected .mdc-list-item__primary-text,.mdc-list-item--selected.mdc-list-item--with-leading-icon .mdc-list-item__start{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.mdc-deprecated-list-group__subheader{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-list-divider:after{border-bottom:1px solid #fff;content:"";display:block}}.mdc-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);line-height:1.5rem;list-style-type:none;margin:0;padding:8px 0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-list:focus{outline:none}.mdc-list-item__wrapper{display:block}.mdc-list-item{align-items:center;align-items:stretch;cursor:pointer;display:flex;justify-content:flex-start;overflow:hidden;padding:0;position:relative}.mdc-list-item:focus{outline:none}.mdc-list-item.mdc-list-item--with-one-line{height:48px}.mdc-list-item.mdc-list-item--with-two-lines{height:64px}.mdc-list-item.mdc-list-item--with-three-lines{height:88px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__start,.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end,.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--disabled,.mdc-list-item.mdc-list-item--non-interactive{cursor:auto}.mdc-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-list-item:not(.mdc-list-item--selected):focus:before{border:1px solid transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-list-item:not(.mdc-list-item--selected):focus:before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected:before{border:3px double transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-list-item.mdc-list-item--selected:before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected:focus:before{border:3px solid transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-list-item.mdc-list-item--selected:focus:before{border-color:CanvasText}}a.mdc-list-item{color:inherit;text-decoration:none}.mdc-list-item__start{fill:currentColor}.mdc-list-item__end,.mdc-list-item__start{flex-shrink:0;pointer-events:none}.mdc-list-item__content{align-self:center;flex:1;overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap}.mdc-list-item--with-three-lines .mdc-list-item__content,.mdc-list-item--with-two-lines .mdc-list-item__content{align-self:stretch}.mdc-list-item__content[for]{pointer-events:none}.mdc-list-item__primary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);overflow:hidden;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);white-space:nowrap}.mdc-list-item--with-three-lines .mdc-list-item__primary-text,.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-three-lines .mdc-list-item__primary-text:before,.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-three-lines .mdc-list-item__primary-text:after,.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size,.875rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing,.0178571429em);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height,1.25rem);line-height:normal;margin-top:0;overflow:hidden;text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);white-space:nowrap}.mdc-list-item__secondary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-list-item--with-three-lines .mdc-list-item__secondary-text{line-height:20px;white-space:normal}.mdc-list-item--with-overline .mdc-list-item__secondary-text{line-height:auto;white-space:nowrap}.mdc-list-item__overline-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-overline-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-overline-font-size,.75rem);font-weight:500;font-weight:var(--mdc-typography-overline-font-weight,500);letter-spacing:.1666666667em;letter-spacing:var(--mdc-typography-overline-letter-spacing,.1666666667em);line-height:2rem;line-height:var(--mdc-typography-overline-line-height,2rem);overflow:hidden;text-decoration:none;text-decoration:var(--mdc-typography-overline-text-decoration,none);text-overflow:ellipsis;text-transform:uppercase;text-transform:var(--mdc-typography-overline-text-transform,uppercase);white-space:nowrap}.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:24px;vertical-align:0;width:0}.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-avatar.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-avatar .mdc-list-item__start,.mdc-list-item--with-leading-avatar .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-avatar .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-avatar .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-avatar .mdc-list-item__start{border-radius:50%}.mdc-list-item--with-leading-icon .mdc-list-item__start{height:24px;width:24px}.mdc-list-item--with-leading-icon.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-icon.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-icon.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:16px;margin-right:32px}.mdc-list-item--with-leading-icon .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:32px;margin-right:16px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-thumbnail.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-thumbnail.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-thumbnail.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-thumbnail .mdc-list-item__start,.mdc-list-item--with-leading-thumbnail .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-thumbnail .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-thumbnail .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-image.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-image.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-image.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-image .mdc-list-item__start,.mdc-list-item--with-leading-image .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-image .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-image .mdc-list-item__start{height:56px;width:56px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-one-line,.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-video.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-video.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-video.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-video .mdc-list-item__start{margin-left:0;margin-right:16px}.mdc-list-item--with-leading-video .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-video .mdc-list-item__start{margin-left:16px;margin-right:0}.mdc-list-item--with-leading-video .mdc-list-item__start{height:56px;width:100px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-one-line,.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-checkbox.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-checkbox.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-checkbox.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:8px;margin-right:24px}.mdc-list-item--with-leading-checkbox .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-checkbox .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-radio.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-radio.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-radio.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-radio .mdc-list-item__start{margin-left:8px;margin-right:24px}.mdc-list-item--with-leading-radio .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-radio .mdc-list-item__start{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-radio .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-switch.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-switch.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-switch.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-switch .mdc-list-item__start,.mdc-list-item--with-leading-switch .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-switch .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-switch .mdc-list-item__start{height:20px;width:36px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-icon.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--with-trailing-icon .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-icon .mdc-list-item__end{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-icon .mdc-list-item__end{height:24px;width:24px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end,.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:flex-start}.mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-meta.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:28px;margin-right:16px}.mdc-list-item--with-trailing-meta .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:16px;margin-right:28px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-trailing-meta .mdc-list-item__end{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit)}.mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-checkbox.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:24px;margin-right:8px}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{height:40px;width:40px}.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-radio.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-radio.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-radio .mdc-list-item__end{margin-left:24px;margin-right:8px}.mdc-list-item--with-trailing-radio .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-radio .mdc-list-item__end{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-radio .mdc-list-item__end{height:40px;width:40px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-switch.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-switch.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-switch.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-switch .mdc-list-item__end,.mdc-list-item--with-trailing-switch .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-switch .mdc-list-item__end{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-switch .mdc-list-item__end{height:20px;width:36px}.mdc-list-item--with-trailing-switch.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-list-item,.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item{padding-left:16px;padding-right:16px}.mdc-list-group .mdc-deprecated-list{padding:0}.mdc-list-group__subheader{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);margin:.75rem 16px;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-list-divider{background-clip:content-box;background-color:rgba(0,0,0,.12);height:1px;padding:0}.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,.mdc-list-divider.mdc-list-divider--with-leading-inset{padding-left:16px;padding-right:auto}.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,.mdc-list-divider.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider.mdc-list-divider--with-leading-inset{padding-left:auto;padding-right:16px}.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider.mdc-list-divider--with-trailing-inset[dir=rtl],[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider.mdc-list-divider--with-trailing-inset{padding-left:16px;padding-right:auto}.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset{padding-left:0;padding-right:auto}.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset[dir=rtl],[dir=rtl] .mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset{padding-left:auto;padding-right:0}.mdc-list-divider[dir=rtl],[dir=rtl] .mdc-list-divider{padding:0}@keyframes mdc-ripple-fg-radius-in{0%{animation-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-opacity-in{0%{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity,0)}}@keyframes mdc-ripple-fg-opacity-out{0%{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0)}to{opacity:0}}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--unbounded .mdc-deprecated-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-activation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-deactivation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:hover .mdc-deprecated-list-item__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:hover .mdc-list-item__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-deprecated-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-deprecated-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:hover .mdc-deprecated-list-item__ripple:before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before{opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple:after{opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:hover .mdc-list-item__ripple:before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.24)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple:before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before{opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple:after{opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-list-item__ripple:before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.2)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-deprecated-list-item--disabled{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--unbounded .mdc-deprecated-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-activation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-deactivation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,.mdc-deprecated-list-item--disabled:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before,.mdc-deprecated-list-item--disabled:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}:not(.mdc-list-item--disabled).mdc-list-item{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item:hover .mdc-list-item__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-list-item--disabled).mdc-list-item:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}:not(.mdc-list-item--disabled).mdc-list-item--activated .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}:not(.mdc-list-item--disabled).mdc-list-item--activated .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item--activated .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-list-item--disabled).mdc-list-item--activated.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--activated:hover .mdc-list-item__ripple:before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}:not(.mdc-list-item--disabled).mdc-list-item--activated.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--activated:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--activated:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-list-item--disabled).mdc-list-item--activated:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.24)}:not(.mdc-list-item--disabled).mdc-list-item--selected .mdc-list-item__ripple:before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}:not(.mdc-list-item--disabled).mdc-list-item--selected .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item--selected .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-list-item--disabled).mdc-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--selected:hover .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}:not(.mdc-list-item--disabled).mdc-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-list-item--disabled).mdc-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.2)}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-list-item--disabled{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-list-item--disabled .mdc-list-item__ripple:after,.mdc-list-item--disabled .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-list-item--disabled .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-list-item--disabled .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-list-item--disabled.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-list-item--disabled.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-list-item--disabled.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-list-item--disabled .mdc-list-item__ripple:after,.mdc-list-item--disabled .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-list-item--disabled .mdc-list-item__ripple:after,.mdc-list-item--disabled .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-list-item--disabled.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,.mdc-list-item--disabled:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-list-item--disabled .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:none;overflow:hidden;position:relative;will-change:transform,opacity}.mdc-ripple-surface:after,.mdc-ripple-surface:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-ripple-surface:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface:after,.mdc-ripple-surface:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-ripple-surface.mdc-ripple-upgraded:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]:after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]:before,.mdc-ripple-upgraded--unbounded:after,.mdc-ripple-upgraded--unbounded:before{height:100%;left:0;top:0;width:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded:after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded:before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded:after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded:before{height:var(--mdc-ripple-fg-size,100%);left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0);width:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded:after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface:after,.mdc-ripple-surface:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover:before,.mdc-ripple-surface:hover:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused:before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-ripple-surface:not(.mdc-ripple-upgraded):after{transition:opacity .15s linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}.smui-ripple-surface--primary:after,.smui-ripple-surface--primary:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.smui-ripple-surface--primary.mdc-ripple-surface--hover:before,.smui-ripple-surface--primary:hover:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.smui-ripple-surface--primary.mdc-ripple-upgraded--background-focused:before,.smui-ripple-surface--primary:not(.mdc-ripple-upgraded):focus:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.smui-ripple-surface--primary:not(.mdc-ripple-upgraded):after{transition:opacity .15s linear}.smui-ripple-surface--primary:not(.mdc-ripple-upgraded):active:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}.smui-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}.smui-ripple-surface--secondary:after,.smui-ripple-surface--secondary:before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.smui-ripple-surface--secondary.mdc-ripple-surface--hover:before,.smui-ripple-surface--secondary:hover:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.smui-ripple-surface--secondary.mdc-ripple-upgraded--background-focused:before,.smui-ripple-surface--secondary:not(.mdc-ripple-upgraded):focus:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.smui-ripple-surface--secondary:not(.mdc-ripple-upgraded):after{transition:opacity .15s linear}.smui-ripple-surface--secondary:not(.mdc-ripple-upgraded):active:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}.smui-ripple-surface--secondary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}.smui-list--three-line .mdc-deprecated-list-item__text{align-self:flex-start}.smui-list--three-line .mdc-deprecated-list-item{height:88px}.smui-list--three-line.mdc-deprecated-list--dense .mdc-deprecated-list-item{height:76px}.mdc-deprecated-list-item.smui-menu-item--non-interactive{cursor:auto}.mdc-elevation-overlay{background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff);border-radius:inherit;opacity:0;opacity:var(--mdc-elevation-overlay-opacity,0);pointer-events:none;position:absolute;transition:opacity .28s cubic-bezier(.4,0,.2,1)}.mdc-menu{min-width:112px;min-width:var(--mdc-menu-min-width,112px)}.mdc-menu .mdc-deprecated-list-item__graphic,.mdc-menu .mdc-deprecated-list-item__meta{color:rgba(0,0,0,.87)}.mdc-menu .mdc-menu-item--submenu-open .mdc-deprecated-list-item__ripple:before,.mdc-menu .mdc-menu-item--submenu-open .mdc-list-item__ripple:before{opacity:.04}.mdc-menu .mdc-deprecated-list{color:rgba(0,0,0,.87)}.mdc-menu .mdc-deprecated-list,.mdc-menu .mdc-list{position:relative}.mdc-menu .mdc-deprecated-list .mdc-elevation-overlay,.mdc-menu .mdc-list .mdc-elevation-overlay{height:100%;left:0;top:0;width:100%}.mdc-menu .mdc-deprecated-list-divider{margin:8px 0}.mdc-menu .mdc-deprecated-list-item{user-select:none}.mdc-menu .mdc-deprecated-list-item--disabled{cursor:auto}.mdc-menu a.mdc-deprecated-list-item .mdc-deprecated-list-item__graphic,.mdc-menu a.mdc-deprecated-list-item .mdc-deprecated-list-item__text{pointer-events:none}.mdc-menu__selection-group{fill:currentColor;padding:0}.mdc-menu__selection-group .mdc-deprecated-list-item{padding-left:56px;padding-right:16px}.mdc-menu__selection-group .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-menu__selection-group .mdc-deprecated-list-item{padding-left:16px;padding-right:56px}.mdc-menu__selection-group .mdc-menu__selection-group-icon{display:none;left:16px;position:absolute;right:auto;top:50%;transform:translateY(-50%)}.mdc-menu__selection-group .mdc-menu__selection-group-icon[dir=rtl],[dir=rtl] .mdc-menu__selection-group .mdc-menu__selection-group-icon{left:auto;right:16px}.mdc-menu-item--selected .mdc-menu__selection-group-icon{display:inline}.mdc-menu-surface{transform-origin-left:top left;transform-origin-right:top right;background-color:#fff;background-color:var(--mdc-theme-surface,#fff);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-sizing:border-box;color:#000;color:var(--mdc-theme-on-surface,#000);display:none;margin:0;max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height,calc(100vh - 32px));max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width,calc(100vw - 32px));opacity:0;overflow:auto;padding:0;position:absolute;transform:scale(1);transform-origin:top left;transition:opacity .03s linear,transform .12s cubic-bezier(0,0,.2,1),height .25s cubic-bezier(0,0,.2,1);will-change:transform,opacity;z-index:8}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;opacity:0;transform:scale(.8)}.mdc-menu-surface--open{display:inline-block;opacity:1;transform:scale(1)}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity 75ms linear}.mdc-menu-surface[dir=rtl],[dir=rtl] .mdc-menu-surface{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{overflow:visible;position:relative}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}.smui-menu-surface--static{display:inline-block;opacity:1;position:static;transform:scale(1);z-index:0}.mdc-menu__selection-group .mdc-list-item__graphic.mdc-menu__selection-group-icon{display:none}.mdc-menu-item--selected .mdc-list-item__graphic.mdc-menu__selection-group-icon{display:inline}.mdc-notched-outline{box-sizing:border-box;display:flex;height:100%;left:0;max-width:100%;pointer-events:none;position:absolute;right:0;text-align:left;top:0;width:100%}.mdc-notched-outline[dir=rtl],[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-bottom:1px solid;border-top:1px solid;box-sizing:border-box;height:100%;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}.mdc-notched-outline__leading[dir=rtl],.mdc-notched-outline__trailing,[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{flex-grow:1}.mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;max-width:calc(100% - 24px);width:auto}.mdc-notched-outline .mdc-floating-label{display:inline-block;max-width:100%;position:relative}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{border-top:none;padding-left:0;padding-right:8px}.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl],[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-text-field--filled{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple:after,.mdc-text-field--filled .mdc-text-field__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-text-field--filled .mdc-text-field__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-text-field--filled .mdc-text-field__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-text-field--filled .mdc-text-field__ripple:after,.mdc-text-field--filled .mdc-text-field__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-text-field__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-text-field{align-items:baseline;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px);box-sizing:border-box;display:inline-flex;overflow:hidden;padding:0 16px;position:relative;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0,0,0,.87)}@media{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0,0,0,.54)}}@media{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0,0,0,.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary,#6200ee)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading,.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0,0,0,.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix,.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0,0,0,.6)}.mdc-text-field .mdc-floating-label{pointer-events:none;top:50%;transform:translateY(-50%)}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;appearance:none;background:none;border:none;border-radius:0;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);height:28px;letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);min-width:0;padding:0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);transition:opacity .15s cubic-bezier(.4,0,.2,1) 0ms;width:100%}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media{.mdc-text-field__input::placeholder{opacity:0;transition:opacity 67ms cubic-bezier(.4,0,.2,1) 0ms}}@media{.mdc-text-field__input:-ms-input-placeholder{opacity:0;transition:opacity 67ms cubic-bezier(.4,0,.2,1) 0ms}}@media{.mdc-text-field--focused .mdc-text-field__input::placeholder,.mdc-text-field--no-label .mdc-text-field__input::placeholder{opacity:1;transition-delay:40ms;transition-duration:.11s}}@media{.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder{opacity:1;transition-delay:40ms;transition-duration:.11s}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);height:28px;letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);opacity:0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);transition:opacity .15s cubic-bezier(.4,0,.2,1) 0ms;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens:none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}.mdc-text-field__affix--prefix[dir=rtl],[dir=rtl] .mdc-text-field__affix--prefix{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl],.mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix[dir=rtl],[dir=rtl] .mdc-text-field__affix--suffix{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl],[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple:after,.mdc-text-field--filled .mdc-text-field__ripple:before{background-color:rgba(0,0,0,.87);background-color:var(--mdc-ripple-color,rgba(0,0,0,.87))}.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple:before,.mdc-text-field--filled:hover .mdc-text-field__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple:before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-text-field--filled:before{content:"";display:inline-block;height:40px;vertical-align:0;width:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#f5f5f5}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.87)}.mdc-text-field--filled .mdc-line-ripple:after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary,#6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}.mdc-text-field--filled .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--no-label:before{display:none}@supports(-webkit-hyphens:none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem;transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem;transform:translateY(-34.75px) scale(.75)}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined .25s 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(0) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-34.75px) scale(.75)}to{transform:translateX(0) translateY(-34.75px) scale(.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0,0,0,.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0,0,0,.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary,#6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:0;border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-bottom-left-radius:0;border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px)}@supports(top:max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-shape-small,4px))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-bottom-left-radius:0;border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:0;border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0}@supports(top:max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-shape-small,4px))}.mdc-text-field--outlined,.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px,var(--mdc-shape-small,4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px,var(--mdc-shape-small,4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:max(16px,var(--mdc-shape-small,4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple:after,.mdc-text-field--outlined .mdc-text-field__ripple:before{background-color:transparent;background-color:var(--mdc-ripple-color,transparent)}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}.mdc-text-field--outlined .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--outlined .mdc-text-field__input{background-color:transparent;border:none!important;display:flex}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{align-items:center;flex-direction:column;height:auto;padding:0;transition:none;width:auto}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{box-sizing:border-box;flex-grow:1;height:auto;line-height:1.5rem;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;padding:0 16px;resize:none}.mdc-text-field--textarea.mdc-text-field--filled:before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled .25s 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(0) translateY(-10.25px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-10.25px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-10.25px) scale(.75)}to{transform:translateX(0) translateY(-10.25px) scale(.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-bottom:9px;margin-top:23px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-bottom:16px;margin-top:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem;transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem;transform:translateY(-24.75px) scale(.75)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined .25s 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(0) translateY(-24.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-24.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-24.75px) scale(.75)}to{transform:translateX(0) translateY(-24.75px) scale(.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-bottom:16px;margin-top:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter:after{content:"";display:inline-block;height:16px;vertical-align:-16px;width:0}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter:before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input{transform:translateX(1px) translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{left:48px;max-width:calc(100% - 48px);right:auto}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{left:auto;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(133.33333% - 85.33333px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:auto}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:auto;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(32px) scale(.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon .25s 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(-32px) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(.75)}to{transform:translateX(-32px) translateY(-34.75px) scale(.75)}}.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon .25s 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(32px) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% + 32px)) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% + 32px)) translateY(-34.75px) scale(.75)}to{transform:translateX(32px) translateY(-34.75px) scale(.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--with-trailing-icon{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(133.33333% - 85.33333px)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(133.33333% - 128px)}.mdc-text-field-helper-line{box-sizing:border-box;display:flex;justify-content:space-between}.mdc-text-field+.mdc-text-field-helper-line{padding-left:16px;padding-right:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98,0,238,.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:after,.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0,0,0,.38)}@media{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0,0,0,.38)}}@media{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0,0,0,.38)}}.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading,.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0,0,0,.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix,.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0,0,0,.06)}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled .mdc-text-field__affix--prefix,.mdc-text-field--disabled .mdc-text-field__affix--suffix,.mdc-text-field--disabled .mdc-text-field__icon--leading,.mdc-text-field--disabled .mdc-text-field__icon--trailing,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}.mdc-text-field--disabled .mdc-line-ripple:before{border-bottom-color:GrayText}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors:active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl],[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input{text-align:left}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input{direction:ltr}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading{order:1}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix{order:2}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input{order:3}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix{order:4}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing{order:5}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-right:12px}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px}.smui-text-field--standard{height:56px;padding:0}.smui-text-field--standard:before{content:"";display:inline-block;height:40px;vertical-align:0;width:0}.smui-text-field--standard:not(.mdc-text-field--disabled){background-color:transparent}.smui-text-field--standard:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.42)}.smui-text-field--standard:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.87)}.smui-text-field--standard .mdc-line-ripple:after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary,#6200ee)}.smui-text-field--standard .mdc-floating-label{left:0;right:auto}.smui-text-field--standard .mdc-floating-label[dir=rtl],[dir=rtl] .smui-text-field--standard .mdc-floating-label{left:auto;right:0}.smui-text-field--standard .mdc-floating-label--float-above{transform:translateY(-106%) scale(.75)}.smui-text-field--standard.mdc-text-field--no-label .mdc-text-field__input{height:100%}.smui-text-field--standard.mdc-text-field--no-label .mdc-floating-label,.smui-text-field--standard.mdc-text-field--no-label:before{display:none}@supports(-webkit-hyphens:none){.smui-text-field--standard.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label{left:32px;max-width:calc(100% - 32px);right:auto}.mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label{left:auto;right:32px}.mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label--float-above{max-width:calc(133.33333% - 64px)}.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label{max-width:calc(100% - 36px)}.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label--float-above{max-width:calc(133.33333% - 48px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label{max-width:calc(100% - 68px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label--float-above{max-width:calc(133.33333% - 90.66667px)}.mdc-text-field+.mdc-text-field-helper-line{padding-left:0;padding-right:0}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);line-height:normal;margin-left:auto;margin-right:0;margin-top:0;padding-left:16px;padding-right:0;text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);white-space:nowrap}.mdc-text-field-character-counter:before{content:"";display:inline-block;height:16px;vertical-align:0;width:0}.mdc-text-field-character-counter[dir=rtl],[dir=rtl] .mdc-text-field-character-counter{margin-left:0;margin-right:auto;padding-left:0;padding-right:16px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);line-height:normal;margin:0;opacity:0;text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);transition:opacity .15s cubic-bezier(.4,0,.2,1) 0ms;will-change:opacity}.mdc-text-field-helper-text:before{content:"";display:inline-block;height:16px;vertical-align:0;width:0}.mdc-text-field-helper-text--persistent{opacity:1;transition:none;will-change:auto}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex="-1"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}.mdc-text-field__icon--leading[dir=rtl],[dir=rtl] .mdc-text-field__icon--leading{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{margin-left:0;margin-right:0;padding:12px}.mdc-text-field__icon--trailing[dir=rtl],[dir=rtl] .mdc-text-field__icon--trailing{margin-left:0;margin-right:0}.smui-text-field--standard .mdc-text-field__icon--leading{margin-left:0;margin-right:8px}.smui-text-field--standard .mdc-text-field__icon--leading[dir=rtl],[dir=rtl] .smui-text-field--standard .mdc-text-field__icon--leading{margin-left:8px;margin-right:0}.smui-text-field--standard .mdc-text-field__icon--trailing{margin-left:0;margin-right:0;padding:12px 0 12px 12px}.smui-text-field--standard .mdc-text-field__icon--trailing[dir=rtl],[dir=rtl] .smui-text-field--standard .mdc-text-field__icon--trailing{margin-left:0;margin-right:0;padding-left:0;padding-right:12px}';Td(PB,{});var DB=":root *{--scrollbar-background:hsla(0,0%,100%,.1);scrollbar-track-color:transparent;scrollbar-face-color:var(--scrollbar-background);scrollbar-color:var(--scrollbar-background) transparent;scrollbar-width:thin;text-underline-offset:.5px}:root ::-webkit-scrollbar{border-radius:.3rem;height:5px;width:5px}:root ::-webkit-scrollbar-track{border-radius:.3rem}:root ::-webkit-scrollbar-corner{background:none!important}:root ::-webkit-scrollbar-thumb{background-color:var(--scrollbar-background);border:3px solid var(--scrollbar-background);border-radius:20px;transition:background-color .5s}";Td(DB,{});var MB=":root{--cosmograph-search-text-color:#fff;--cosmograph-search-list-background:#222;--cosmograph-search-font-family:inherit;--cosmograph-search-input-background:#222;--cosmograph-search-mark-background:hsla(0,0%,100%,.2);--cosmograph-search-accessor-background:hsla(0,0%,100%,.2);--cosmograph-search-interactive-background:hsla(0,0%,100%,.4);--cosmograph-search-hover-color:hsla(0,0%,100%,.05)}.search-icon.svelte-1xknafk.svelte-1xknafk{color:var(--cosmograph-search-text-color)!important;opacity:.6}.search.svelte-1xknafk .cosmograph-search-accessor{align-content:center;background-color:var(--cosmograph-search-accessor-background);border-radius:10px;color:var(--cosmograph-search-text-color);cursor:pointer;display:flex;display:block;font-size:12px;font-style:normal;justify-content:center;line-height:1;margin-right:.5rem;overflow:hidden;padding:5px 8px;text-overflow:ellipsis;transition:background .15s linear;white-space:nowrap;z-index:1}.search.svelte-1xknafk .cosmograph-search-accessor.active,.search.svelte-1xknafk .cosmograph-search-accessor:hover{background-color:var(--cosmograph-search-interactive-background)}.search.svelte-1xknafk .disabled{cursor:default;pointer-events:none}.search.svelte-1xknafk.svelte-1xknafk{background:var(--cosmograph-search-input-background);display:flex;flex-direction:column;font-family:var(--cosmograph-search-font-family),sans-serif;text-align:left;width:100%}.search.svelte-1xknafk mark{background:var(--cosmograph-search-mark-background);border-radius:2px;color:var(--cosmograph-search-text-color);padding:1px 0}.search.svelte-1xknafk .cosmograph-search-match{-webkit-box-orient:vertical;cursor:pointer;display:-webkit-box;line-height:1.35;overflow:hidden;padding:calc(var(--margin-v)*1px) calc(var(--margin-h)*1px);text-overflow:ellipsis;white-space:normal}.search.svelte-1xknafk .cosmograph-search-match:hover{background:var(--cosmograph-search-hover-color)}.search.svelte-1xknafk .cosmograph-search-result{display:inline;font-size:12px;font-weight:600;text-transform:uppercase}.search.svelte-1xknafk .cosmograph-search-result>span{font-weight:400;letter-spacing:1;margin-left:4px}.search.svelte-1xknafk .cosmograph-search-result>span>t{margin-right:4px}.search.svelte-1xknafk .mdc-menu-surface{background-color:var(--cosmograph-search-list-background)!important;max-height:none!important}.search.svelte-1xknafk .openListUpwards.svelte-1xknafk .mdc-menu-surface{bottom:55px!important;top:unset!important}.search.svelte-1xknafk .mdc-text-field__input{caret-color:var(--cosmograph-search-text-color)!important;height:100%;letter-spacing:-.01em;line-height:2;line-height:2!important;padding-top:15px!important}.search.svelte-1xknafk .mdc-floating-label,.search.svelte-1xknafk .mdc-text-field__input{color:var(--cosmograph-search-text-color)!important;font-family:var(--cosmograph-search-font-family),sans-serif!important}.search.svelte-1xknafk .mdc-floating-label{opacity:.65;pointer-events:none!important}.search.svelte-1xknafk .mdc-line-ripple:after,.search.svelte-1xknafk .mdc-line-ripple:before{border-bottom-color:var(--cosmograph-search-text-color)!important;opacity:.1}.search.svelte-1xknafk .mdc-deprecated-list{background:var(--cosmograph-search-list-background);color:var(--cosmograph-search-text-color)!important;font-size:14px!important;padding-top:4px!important}.search.svelte-1xknafk .mdc-deprecated-list-item{height:28px!important}.search.svelte-1xknafk .mdc-text-field__icon--leading{margin-right:10px!important}.search.svelte-1xknafk .mdc-floating-label--float-above{left:26px!important;pointer-events:none!important}.search.svelte-1xknafk .mdc-text-field__icon--trailing{cursor:default!important;max-width:35%}.search.svelte-1xknafk .cosmograph-search-first-field{font-size:12.5px;font-weight:400;opacity:.8;text-transform:uppercase}";Td(MB,{});const RB='',FB=r=>{let e;return r?e=r:typeof fetch=="undefined"?e=(...t)=>kl(()=>le(void 0,null,function*(){const{default:i}=yield Promise.resolve().then(()=>ql);return{default:i}}),void 0).then(({default:i})=>i(...t)):e=fetch,(...t)=>e(...t)};class u_ extends Error{constructor(e,t="FunctionsError",i){super(e),this.name=t,this.context=i}}class NB extends u_{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class zB extends u_{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class BB extends u_{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var G0;(function(r){r.Any="any",r.ApNortheast1="ap-northeast-1",r.ApNortheast2="ap-northeast-2",r.ApSouth1="ap-south-1",r.ApSoutheast1="ap-southeast-1",r.ApSoutheast2="ap-southeast-2",r.CaCentral1="ca-central-1",r.EuCentral1="eu-central-1",r.EuWest1="eu-west-1",r.EuWest2="eu-west-2",r.EuWest3="eu-west-3",r.SaEast1="sa-east-1",r.UsEast1="us-east-1",r.UsWest1="us-west-1",r.UsWest2="us-west-2"})(G0||(G0={}));var jB=function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class GB{constructor(e,{headers:t={},customFetch:i,region:n=G0.Any}={}){this.url=e,this.headers=t,this.region=n,this.fetch=FB(i)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,t={}){var i;return jB(this,void 0,void 0,function*(){try{const{headers:n,method:s,body:o}=t;let a={},{region:l}=t;l||(l=this.region),l&&l!=="any"&&(a["x-region"]=l);let c;o&&(n&&!Object.prototype.hasOwnProperty.call(n,"Content-Type")||!n)&&(typeof Blob!="undefined"&&o instanceof Blob||o instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",c=o):typeof o=="string"?(a["Content-Type"]="text/plain",c=o):typeof FormData!="undefined"&&o instanceof FormData?c=o:(a["Content-Type"]="application/json",c=JSON.stringify(o)));const d=yield this.fetch(`${this.url}/${e}`,{method:s||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),n),body:c}).catch(m=>{throw new NB(m)}),u=d.headers.get("x-relay-error");if(u&&u==="true")throw new zB(d);if(!d.ok)throw new BB(d);let h=((i=d.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),f;return h==="application/json"?f=yield d.json():h==="application/octet-stream"?f=yield d.blob():h==="text/event-stream"?f=d:h==="multipart/form-data"?f=yield d.formData():f=yield d.text(),{data:f,error:null}}catch(n){return{data:null,error:n}}})}}var yn={},h_={},jf={},Ed={},Gf={},Vf={},VB=function(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global;throw new Error("unable to locate global object")},Bl=VB();const UB=Bl.fetch,wk=Bl.fetch.bind(Bl),Sk=Bl.Headers,HB=Bl.Request,XB=Bl.Response,ql=Object.freeze(Object.defineProperty({__proto__:null,Headers:Sk,Request:HB,Response:XB,default:wk,fetch:UB},Symbol.toStringTag,{value:"Module"})),WB=ET(ql);var f_={};Object.defineProperty(f_,"__esModule",{value:!0});class YB extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}}f_.default=YB;var Tk=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vf,"__esModule",{value:!0});const qB=Tk(WB),ZB=Tk(f_);let KB=class{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:typeof fetch=="undefined"?this.fetch=qB.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Object.assign({},this.headers),this.headers[e]=t,this}then(e,t){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const i=this.fetch;let n=i(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(s=>le(this,null,function*(){var o,a,l;let c=null,d=null,u=null,h=s.status,f=s.statusText;if(s.ok){if(this.method!=="HEAD"){const v=yield s.text();v===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?d=v:d=JSON.parse(v))}const p=(o=this.headers.Prefer)===null||o===void 0?void 0:o.match(/count=(exact|planned|estimated)/),g=(a=s.headers.get("content-range"))===null||a===void 0?void 0:a.split("/");p&&g&&g.length>1&&(u=parseInt(g[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(d)&&(d.length>1?(c={code:"PGRST116",details:`Results contain ${d.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},d=null,u=null,h=406,f="Not Acceptable"):d.length===1?d=d[0]:d=null)}else{const p=yield s.text();try{c=JSON.parse(p),Array.isArray(c)&&s.status===404&&(d=[],c=null,h=200,f="OK")}catch(g){s.status===404&&p===""?(h=204,f="No Content"):c={message:p}}if(c&&this.isMaybeSingle&&(!((l=c==null?void 0:c.details)===null||l===void 0)&&l.includes("0 rows"))&&(c=null,h=200,f="OK"),c&&this.shouldThrowOnError)throw new ZB.default(c)}return{error:c,data:d,count:u,status:h,statusText:f}}));return this.shouldThrowOnError||(n=n.catch(s=>{var o,a,l;return{error:{message:`${(o=s==null?void 0:s.name)!==null&&o!==void 0?o:"FetchError"}: ${s==null?void 0:s.message}`,details:`${(a=s==null?void 0:s.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(l=s==null?void 0:s.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),n.then(e,t)}};Vf.default=KB;var JB=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gf,"__esModule",{value:!0});const QB=JB(Vf);let $B=class extends QB.default{select(e){let t=!1;const i=(e!=null?e:"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",i),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:t=!0,nullsFirst:i,foreignTable:n,referencedTable:s=n}={}){const o=s?`${s}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${a?`${a},`:""}${e}.${t?"asc":"desc"}${i===void 0?"":i?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:i=t}={}){const n=typeof i=="undefined"?"limit":`${i}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:i,referencedTable:n=i}={}){const s=typeof n=="undefined"?"offset":`${n}.offset`,o=typeof n=="undefined"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(o,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:t=!1,settings:i=!1,buffers:n=!1,wal:s=!1,format:o="text"}={}){var a;const l=[e?"analyze":null,t?"verbose":null,i?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(a=this.headers.Accept)!==null&&a!==void 0?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${o}; for="${c}"; options=${l};`,o==="json"?this:this}rollback(){var e;return((e=this.headers.Prefer)!==null&&e!==void 0?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};Gf.default=$B;var ej=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ed,"__esModule",{value:!0});const tj=ej(Gf);let ij=class extends tj.default{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}in(e,t){const i=Array.from(new Set(t)).map(n=>typeof n=="string"&&new RegExp("[,()]").test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${i})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:i,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const o=i===void 0?"":`(${i})`;return this.url.searchParams.append(e,`${s}fts${o}.${t}`),this}match(e){return Object.entries(e).forEach(([t,i])=>{this.url.searchParams.append(t,`eq.${i}`)}),this}not(e,t,i){return this.url.searchParams.append(e,`not.${t}.${i}`),this}or(e,{foreignTable:t,referencedTable:i=t}={}){const n=i?`${i}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,i){return this.url.searchParams.append(e,`${t}.${i}`),this}};Ed.default=ij;var rj=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(jf,"__esModule",{value:!0});const Ac=rj(Ed);let nj=class{constructor(e,{headers:t={},schema:i,fetch:n}){this.url=e,this.headers=t,this.schema=i,this.fetch=n}select(e,{head:t=!1,count:i}={}){const n=t?"HEAD":"GET";let s=!1;const o=(e!=null?e:"*").split("").map(a=>/\s/.test(a)&&!s?"":(a==='"'&&(s=!s),a)).join("");return this.url.searchParams.set("select",o),i&&(this.headers.Prefer=`count=${i}`),new Ac.default({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:t,defaultToNull:i=!0}={}){const n="POST",s=[];if(this.headers.Prefer&&s.push(this.headers.Prefer),t&&s.push(`count=${t}`),i||s.push("missing=default"),this.headers.Prefer=s.join(","),Array.isArray(e)){const o=e.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(o.length>0){const a=[...new Set(o)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new Ac.default({method:n,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:t,ignoreDuplicates:i=!1,count:n,defaultToNull:s=!0}={}){const o="POST",a=[`resolution=${i?"ignore":"merge"}-duplicates`];if(t!==void 0&&this.url.searchParams.set("on_conflict",t),this.headers.Prefer&&a.push(this.headers.Prefer),n&&a.push(`count=${n}`),s||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(e)){const l=e.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(l.length>0){const c=[...new Set(l)].map(d=>`"${d}"`);this.url.searchParams.set("columns",c.join(","))}}return new Ac.default({method:o,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:t}={}){const i="PATCH",n=[];return this.headers.Prefer&&n.push(this.headers.Prefer),t&&n.push(`count=${t}`),this.headers.Prefer=n.join(","),new Ac.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){const t="DELETE",i=[];return e&&i.push(`count=${e}`),this.headers.Prefer&&i.unshift(this.headers.Prefer),this.headers.Prefer=i.join(","),new Ac.default({method:t,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};jf.default=nj;var Uf={},Hf={};Object.defineProperty(Hf,"__esModule",{value:!0});Hf.version=void 0;Hf.version="0.0.0-automated";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.DEFAULT_HEADERS=void 0;const sj=Hf;Uf.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${sj.version}`};var Ck=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(h_,"__esModule",{value:!0});const oj=Ck(jf),aj=Ck(Ed),lj=Uf;let cj=class kk{constructor(e,{headers:t={},schema:i,fetch:n}={}){this.url=e,this.headers=Object.assign(Object.assign({},lj.DEFAULT_HEADERS),t),this.schemaName=i,this.fetch=n}from(e){const t=new URL(`${this.url}/${e}`);return new oj.default(t,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new kk(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,t={},{head:i=!1,get:n=!1,count:s}={}){let o;const a=new URL(`${this.url}/rpc/${e}`);let l;i||n?(o=i?"HEAD":"GET",Object.entries(t).filter(([d,u])=>u!==void 0).map(([d,u])=>[d,Array.isArray(u)?`{${u.join(",")}}`:`${u}`]).forEach(([d,u])=>{a.searchParams.append(d,u)})):(o="POST",l=t);const c=Object.assign({},this.headers);return s&&(c.Prefer=`count=${s}`),new aj.default({method:o,url:a,headers:c,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}};h_.default=cj;var Ad=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(yn,"__esModule",{value:!0});yn.PostgrestBuilder=yn.PostgrestTransformBuilder=yn.PostgrestFilterBuilder=yn.PostgrestQueryBuilder=yn.PostgrestClient=void 0;const Ek=Ad(h_);yn.PostgrestClient=Ek.default;const Ak=Ad(jf);yn.PostgrestQueryBuilder=Ak.default;const Ok=Ad(Ed);yn.PostgrestFilterBuilder=Ok.default;const Ik=Ad(Gf);yn.PostgrestTransformBuilder=Ik.default;const Lk=Ad(Vf);yn.PostgrestBuilder=Lk.default;var dj=yn.default={PostgrestClient:Ek.default,PostgrestQueryBuilder:Ak.default,PostgrestFilterBuilder:Ok.default,PostgrestTransformBuilder:Ik.default,PostgrestBuilder:Lk.default};const{PostgrestClient:uj,PostgrestQueryBuilder:zG,PostgrestFilterBuilder:BG,PostgrestTransformBuilder:jG,PostgrestBuilder:GG}=dj,hj="2.10.2",fj={"X-Client-Info":`realtime-js/${hj}`},mj="1.0.0",Pk=1e4,pj=1e3;var yl;(function(r){r[r.connecting=0]="connecting",r[r.open=1]="open",r[r.closing=2]="closing",r[r.closed=3]="closed"})(yl||(yl={}));var on;(function(r){r.closed="closed",r.errored="errored",r.joined="joined",r.joining="joining",r.leaving="leaving"})(on||(on={}));var In;(function(r){r.close="phx_close",r.error="phx_error",r.join="phx_join",r.reply="phx_reply",r.leave="phx_leave",r.access_token="access_token"})(In||(In={}));var V0;(function(r){r.websocket="websocket"})(V0||(V0={}));var Jo;(function(r){r.Connecting="connecting",r.Open="open",r.Closing="closing",r.Closed="closed"})(Jo||(Jo={}));class gj{constructor(){this.HEADER_LENGTH=1}decode(e,t){return e.constructor===ArrayBuffer?t(this._binaryDecode(e)):t(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const t=new DataView(e),i=new TextDecoder;return this._decodeBroadcast(e,t,i)}_decodeBroadcast(e,t,i){const n=t.getUint8(1),s=t.getUint8(2);let o=this.HEADER_LENGTH+2;const a=i.decode(e.slice(o,o+n));o=o+n;const l=i.decode(e.slice(o,o+s));o=o+s;const c=JSON.parse(i.decode(e.slice(o,e.byteLength)));return{ref:null,topic:a,event:l,payload:c}}}class Dk{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Ai;(function(r){r.abstime="abstime",r.bool="bool",r.date="date",r.daterange="daterange",r.float4="float4",r.float8="float8",r.int2="int2",r.int4="int4",r.int4range="int4range",r.int8="int8",r.int8range="int8range",r.json="json",r.jsonb="jsonb",r.money="money",r.numeric="numeric",r.oid="oid",r.reltime="reltime",r.text="text",r.time="time",r.timestamp="timestamp",r.timestamptz="timestamptz",r.timetz="timetz",r.tsrange="tsrange",r.tstzrange="tstzrange"})(Ai||(Ai={}));const T2=(r,e,t={})=>{var i;const n=(i=t.skipTypes)!==null&&i!==void 0?i:[];return Object.keys(e).reduce((s,o)=>(s[o]=vj(o,r,e,n),s),{})},vj=(r,e,t,i)=>{const n=e.find(a=>a.name===r),s=n==null?void 0:n.type,o=t[r];return s&&!i.includes(s)?Mk(s,o):U0(o)},Mk=(r,e)=>{if(r.charAt(0)==="_"){const t=r.slice(1,r.length);return xj(e,t)}switch(r){case Ai.bool:return _j(e);case Ai.float4:case Ai.float8:case Ai.int2:case Ai.int4:case Ai.int8:case Ai.numeric:case Ai.oid:return yj(e);case Ai.json:case Ai.jsonb:return bj(e);case Ai.timestamp:return wj(e);case Ai.abstime:case Ai.date:case Ai.daterange:case Ai.int4range:case Ai.int8range:case Ai.money:case Ai.reltime:case Ai.text:case Ai.time:case Ai.timestamptz:case Ai.timetz:case Ai.tsrange:case Ai.tstzrange:return U0(e);default:return U0(e)}},U0=r=>r,_j=r=>{switch(r){case"t":return!0;case"f":return!1;default:return r}},yj=r=>{if(typeof r=="string"){const e=parseFloat(r);if(!Number.isNaN(e))return e}return r},bj=r=>{if(typeof r=="string")try{return JSON.parse(r)}catch(e){return console.log(`JSON parse error: ${e}`),r}return r},xj=(r,e)=>{if(typeof r!="string")return r;const t=r.length-1,i=r[t];if(r[0]==="{"&&i==="}"){let s;const o=r.slice(1,t);try{s=JSON.parse("["+o+"]")}catch(a){s=o?o.split(","):[]}return s.map(a=>Mk(e,a))}return r},wj=r=>typeof r=="string"?r.replace(" ","T"):r,Rk=r=>{let e=r;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")};class zg{constructor(e,t,i={},n=Pk){this.channel=e,this.event=t,this.payload=i,this.timeout=n,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){var i;return this._hasReceived(e)&&t((i=this.receivedResp)===null||i===void 0?void 0:i.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=t=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=t,this._matchReceive(t)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:t}){this.recHooks.filter(i=>i.status===e).forEach(i=>i.callback(t))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var C2;(function(r){r.SYNC="sync",r.JOIN="join",r.LEAVE="leave"})(C2||(C2={}));class Yc{constructor(e,t){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const i=(t==null?void 0:t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(i.state,{},n=>{const{onJoin:s,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Yc.syncState(this.state,n,s,o),this.pendingDiffs.forEach(l=>{this.state=Yc.syncDiff(this.state,l,s,o)}),this.pendingDiffs=[],a()}),this.channel._on(i.diff,{},n=>{const{onJoin:s,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(n):(this.state=Yc.syncDiff(this.state,n,s,o),a())}),this.onJoin((n,s,o)=>{this.channel._trigger("presence",{event:"join",key:n,currentPresences:s,newPresences:o})}),this.onLeave((n,s,o)=>{this.channel._trigger("presence",{event:"leave",key:n,currentPresences:s,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,t,i,n){const s=this.cloneDeep(e),o=this.transformState(t),a={},l={};return this.map(s,(c,d)=>{o[c]||(l[c]=d)}),this.map(o,(c,d)=>{const u=s[c];if(u){const h=d.map(g=>g.presence_ref),f=u.map(g=>g.presence_ref),m=d.filter(g=>f.indexOf(g.presence_ref)<0),p=u.filter(g=>h.indexOf(g.presence_ref)<0);m.length>0&&(a[c]=m),p.length>0&&(l[c]=p)}else a[c]=d}),this.syncDiff(s,{joins:a,leaves:l},i,n)}static syncDiff(e,t,i,n){const{joins:s,leaves:o}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return i||(i=()=>{}),n||(n=()=>{}),this.map(s,(a,l)=>{var c;const d=(c=e[a])!==null&&c!==void 0?c:[];if(e[a]=this.cloneDeep(l),d.length>0){const u=e[a].map(f=>f.presence_ref),h=d.filter(f=>u.indexOf(f.presence_ref)<0);e[a].unshift(...h)}i(a,d,l)}),this.map(o,(a,l)=>{let c=e[a];if(!c)return;const d=l.map(u=>u.presence_ref);c=c.filter(u=>d.indexOf(u.presence_ref)<0),e[a]=c,n(a,c,l),c.length===0&&delete e[a]}),e}static map(e,t){return Object.getOwnPropertyNames(e).map(i=>t(i,e[i]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((t,i)=>{const n=e[i];return"metas"in n?t[i]=n.metas.map(s=>(s.presence_ref=s.phx_ref,delete s.phx_ref,delete s.phx_ref_prev,s)):t[i]=n,t},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var k2;(function(r){r.ALL="*",r.INSERT="INSERT",r.UPDATE="UPDATE",r.DELETE="DELETE"})(k2||(k2={}));var E2;(function(r){r.BROADCAST="broadcast",r.PRESENCE="presence",r.POSTGRES_CHANGES="postgres_changes"})(E2||(E2={}));var A2;(function(r){r.SUBSCRIBED="SUBSCRIBED",r.TIMED_OUT="TIMED_OUT",r.CLOSED="CLOSED",r.CHANNEL_ERROR="CHANNEL_ERROR"})(A2||(A2={}));class m_{constructor(e,t={config:{}},i){this.topic=e,this.params=t,this.socket=i,this.bindings={},this.state=on.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},t.config),this.timeout=this.socket.timeout,this.joinPush=new zg(this,In.join,this.params,this.timeout),this.rejoinTimer=new Dk(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=on.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=on.closed,this.socket._remove(this)}),this._onError(n=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,n),this.state=on.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=on.errored,this.rejoinTimer.scheduleTimeout())}),this._on(In.reply,{},(n,s)=>{this._trigger(this._replyEventName(s),n)}),this.presence=new Yc(this),this.broadcastEndpointURL=Rk(this.socket.endPoint)+"/api/broadcast"}subscribe(e,t=this.timeout){var i,n;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:s,presence:o,private:a}}=this.params;this._onError(d=>e&&e("CHANNEL_ERROR",d)),this._onClose(()=>e&&e("CLOSED"));const l={},c={broadcast:s,presence:o,postgres_changes:(n=(i=this.bindings.postgres_changes)===null||i===void 0?void 0:i.map(d=>d.filter))!==null&&n!==void 0?n:[],private:a};this.socket.accessToken&&(l.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:c},l)),this.joinedOnce=!0,this._rejoin(t),this.joinPush.receive("ok",({postgres_changes:d})=>{var u;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),d===void 0){e&&e("SUBSCRIBED");return}else{const h=this.bindings.postgres_changes,f=(u=h==null?void 0:h.length)!==null&&u!==void 0?u:0,m=[];for(let p=0;p{e&&e("CHANNEL_ERROR",new Error(JSON.stringify(Object.values(d).join(", ")||"error")))}).receive("timeout",()=>{e&&e("TIMED_OUT")})}return this}presenceState(){return this.presence.state}track(i){return le(this,arguments,function*(e,t={}){return yield this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)})}untrack(){return le(this,arguments,function*(e={}){return yield this.send({type:"presence",event:"untrack"},e)})}on(e,t,i){return this._on(e,t,i)}send(i){return le(this,arguments,function*(e,t={}){var n,s;if(!this._canPush()&&e.type==="broadcast"){const{event:o,payload:a}=e,l={method:"POST",headers:{Authorization:this.socket.accessToken?`Bearer ${this.socket.accessToken}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:a}]})};try{const c=yield this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=t.timeout)!==null&&n!==void 0?n:this.timeout);return yield(s=c.body)===null||s===void 0?void 0:s.cancel(),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var a,l,c;const d=this._push(e.type,e,t.timeout||this.timeout);e.type==="broadcast"&&!(!((c=(l=(a=this.params)===null||a===void 0?void 0:a.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&o("ok"),d.receive("ok",()=>o("ok")),d.receive("error",()=>o("error")),d.receive("timeout",()=>o("timed out"))})})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=on.leaving;const t=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(In.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(i=>{const n=new zg(this,In.leave,{},e);n.receive("ok",()=>{t(),i("ok")}).receive("timeout",()=>{t(),i("timed out")}).receive("error",()=>{i("error")}),n.send(),this._canPush()||n.trigger("ok",{})})}_fetchWithTimeout(e,t,i){return le(this,null,function*(){const n=new AbortController,s=setTimeout(()=>n.abort(),i),o=yield this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}));return clearTimeout(s),o})}_push(e,t,i=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let n=new zg(this,e,t,i);return this._canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}_onMessage(e,t,i){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,i){var n,s;const o=e.toLocaleLowerCase(),{close:a,error:l,leave:c,join:d}=In;if(i&&[a,l,c,d].indexOf(o)>=0&&i!==this._joinRef())return;let h=this._onMessage(o,t,i);if(t&&!h)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(n=this.bindings.postgres_changes)===null||n===void 0||n.filter(f=>{var m,p,g;return((m=f.filter)===null||m===void 0?void 0:m.event)==="*"||((g=(p=f.filter)===null||p===void 0?void 0:p.event)===null||g===void 0?void 0:g.toLocaleLowerCase())===o}).map(f=>f.callback(h,i)):(s=this.bindings[o])===null||s===void 0||s.filter(f=>{var m,p,g,v,b,S;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in f){const _=f.id,x=(m=f.filter)===null||m===void 0?void 0:m.event;return _&&((p=t.ids)===null||p===void 0?void 0:p.includes(_))&&(x==="*"||(x==null?void 0:x.toLocaleLowerCase())===((g=t.data)===null||g===void 0?void 0:g.type.toLocaleLowerCase()))}else{const _=(b=(v=f==null?void 0:f.filter)===null||v===void 0?void 0:v.event)===null||b===void 0?void 0:b.toLocaleLowerCase();return _==="*"||_===((S=t==null?void 0:t.event)===null||S===void 0?void 0:S.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===o}).map(f=>{if(typeof h=="object"&&"ids"in h){const m=h.data,{schema:p,table:g,commit_timestamp:v,type:b,errors:S}=m;h=Object.assign(Object.assign({},{schema:p,table:g,commit_timestamp:v,eventType:b,new:{},old:{},errors:S}),this._getPayloadRecords(m))}f.callback(h,i)})}_isClosed(){return this.state===on.closed}_isJoined(){return this.state===on.joined}_isJoining(){return this.state===on.joining}_isLeaving(){return this.state===on.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,t,i){const n=e.toLocaleLowerCase(),s={type:n,filter:t,callback:i};return this.bindings[n]?this.bindings[n].push(s):this.bindings[n]=[s],this}_off(e,t){const i=e.toLocaleLowerCase();return this.bindings[i]=this.bindings[i].filter(n=>{var s;return!(((s=n.type)===null||s===void 0?void 0:s.toLocaleLowerCase())===i&&m_.isEqual(n.filter,t))}),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(e[i]!==t[i])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(In.close,{},e)}_onError(e){this._on(In.error,{},t=>e(t))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=on.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const t={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(t.new=T2(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(t.old=T2(e.columns,e.old_record)),t}}const Sj=()=>{},Tj=typeof WebSocket!="undefined";class Cj{constructor(e,t){var i;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=fj,this.params={},this.timeout=Pk,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=Sj,this.conn=null,this.sendBuffer=[],this.serializer=new gj,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=s=>{let o;return s?o=s:typeof fetch=="undefined"?o=(...a)=>kl(()=>le(this,null,function*(){const{default:l}=yield Promise.resolve().then(()=>ql);return{default:l}}),void 0).then(({default:l})=>l(...a)):o=fetch,(...a)=>o(...a)},this.endPoint=`${e}/${V0.websocket}`,this.httpEndpoint=Rk(e),t!=null&&t.transport?this.transport=t.transport:this.transport=null,t!=null&&t.params&&(this.params=t.params),t!=null&&t.headers&&(this.headers=Object.assign(Object.assign({},this.headers),t.headers)),t!=null&&t.timeout&&(this.timeout=t.timeout),t!=null&&t.logger&&(this.logger=t.logger),t!=null&&t.heartbeatIntervalMs&&(this.heartbeatIntervalMs=t.heartbeatIntervalMs);const n=(i=t==null?void 0:t.params)===null||i===void 0?void 0:i.apikey;n&&(this.accessToken=n,this.apiKey=n),this.reconnectAfterMs=t!=null&&t.reconnectAfterMs?t.reconnectAfterMs:s=>[1e3,2e3,5e3,1e4][s-1]||1e4,this.encode=t!=null&&t.encode?t.encode:(s,o)=>o(JSON.stringify(s)),this.decode=t!=null&&t.decode?t.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new Dk(()=>le(this,null,function*(){this.disconnect(),this.connect()}),this.reconnectAfterMs),this.fetch=this._resolveFetch(t==null?void 0:t.fetch)}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});return}if(Tj){this.conn=new WebSocket(this._endPointURL()),this.setupConnection();return}this.conn=new kj(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),kl(()=>le(this,null,function*(){const{default:e}=yield import("./browser.js").then(t=>t.b);return{default:e}}),[]).then(({default:e})=>{this.conn=new e(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}disconnect(e,t){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,t!=null?t:""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}removeChannel(e){return le(this,null,function*(){const t=yield e.unsubscribe();return this.channels.length===0&&this.disconnect(),t})}removeAllChannels(){return le(this,null,function*(){const e=yield Promise.all(this.channels.map(t=>t.unsubscribe()));return this.disconnect(),e})}log(e,t,i){this.logger(e,t,i)}connectionState(){switch(this.conn&&this.conn.readyState){case yl.connecting:return Jo.Connecting;case yl.open:return Jo.Open;case yl.closing:return Jo.Closing;default:return Jo.Closed}}isConnected(){return this.connectionState()===Jo.Open}channel(e,t={config:{}}){const i=new m_(`realtime:${e}`,t,this);return this.channels.push(i),i}push(e){const{topic:t,event:i,payload:n,ref:s}=e,o=()=>{this.encode(e,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${t} ${i} (${s})`,n),this.isConnected()?o():this.sendBuffer.push(o)}setAuth(e){this.accessToken=e,this.channels.forEach(t=>{e&&t.updateJoinPayload({access_token:e}),t.joinedOnce&&t._isJoined()&&t._push(In.access_token,{access_token:e})})}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find(i=>i.topic===e&&(i._isJoined()||i._isJoining()));t&&(this.log("transport",`leaving duplicate topic "${e}"`),t.unsubscribe())}_remove(e){this.channels=this.channels.filter(t=>t._joinRef()!==e._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:mj}))}_onConnMessage(e){this.decode(e.data,t=>{let{topic:i,event:n,payload:s,ref:o}=t;(o&&o===this.pendingHeartbeatRef||n===(s==null?void 0:s.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${s.status||""} ${i} ${n} ${o&&"("+o+")"||""}`,s),this.channels.filter(a=>a._isMember(i)).forEach(a=>a._trigger(n,s,o)),this.stateChangeCallbacks.message.forEach(a=>a(t))})}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),this.heartbeatIntervalMs),this.stateChangeCallbacks.open.forEach(e=>e())}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(t=>t(e))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(t=>t(e))}_triggerChanError(){this.channels.forEach(e=>e._trigger(In.error))}_appendParams(e,t){if(Object.keys(t).length===0)return e;const i=e.match(/\?/)?"&":"?",n=new URLSearchParams(t);return`${e}${i}${n}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(e=this.conn)===null||e===void 0||e.close(pj,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}}class kj{constructor(e,t,i){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=yl.connecting,this.send=()=>{},this.url=null,this.url=e,this.close=i.close}}class p_ extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function br(r){return typeof r=="object"&&r!==null&&"__isStorageError"in r}class Ej extends p_{constructor(e,t){super(e),this.name="StorageApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class H0 extends p_{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}var Aj=function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Fk=r=>{let e;return r?e=r:typeof fetch=="undefined"?e=(...t)=>kl(()=>le(void 0,null,function*(){const{default:i}=yield Promise.resolve().then(()=>ql);return{default:i}}),void 0).then(({default:i})=>i(...t)):e=fetch,(...t)=>e(...t)},Oj=()=>Aj(void 0,void 0,void 0,function*(){return typeof Response=="undefined"?(yield kl(()=>Promise.resolve().then(()=>ql),void 0)).Response:Response}),X0=r=>{if(Array.isArray(r))return r.map(t=>X0(t));if(typeof r=="function"||r!==Object(r))return r;const e={};return Object.entries(r).forEach(([t,i])=>{const n=t.replace(/([-_][a-z])/gi,s=>s.toUpperCase().replace(/[-_]/g,""));e[n]=X0(i)}),e};var wa=function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Bg=r=>r.msg||r.message||r.error_description||r.error||JSON.stringify(r),Ij=(r,e,t)=>wa(void 0,void 0,void 0,function*(){const i=yield Oj();r instanceof i&&!(t!=null&&t.noResolveJson)?r.json().then(n=>{e(new Ej(Bg(n),r.status||500))}).catch(n=>{e(new H0(Bg(n),n))}):e(new H0(Bg(r),r))}),Lj=(r,e,t,i)=>{const n={method:r,headers:(e==null?void 0:e.headers)||{}};return r==="GET"?n:(n.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),i&&(n.body=JSON.stringify(i)),Object.assign(Object.assign({},n),t))};function Od(r,e,t,i,n,s){return wa(this,void 0,void 0,function*(){return new Promise((o,a)=>{r(t,Lj(e,i,n,s)).then(l=>{if(!l.ok)throw l;return i!=null&&i.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>Ij(l,a,i))})})}function lf(r,e,t,i){return wa(this,void 0,void 0,function*(){return Od(r,"GET",e,t,i)})}function ho(r,e,t,i,n){return wa(this,void 0,void 0,function*(){return Od(r,"POST",e,i,n,t)})}function Pj(r,e,t,i,n){return wa(this,void 0,void 0,function*(){return Od(r,"PUT",e,i,n,t)})}function Dj(r,e,t,i){return wa(this,void 0,void 0,function*(){return Od(r,"HEAD",e,Object.assign(Object.assign({},t),{noResolveJson:!0}),i)})}function Nk(r,e,t,i,n){return wa(this,void 0,void 0,function*(){return Od(r,"DELETE",e,i,n,t)})}var Yr=function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Mj={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},O2={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class Rj{constructor(e,t={},i,n){this.url=e,this.headers=t,this.bucketId=i,this.fetch=Fk(n)}uploadOrUpdate(e,t,i,n){return Yr(this,void 0,void 0,function*(){try{let s;const o=Object.assign(Object.assign({},O2),n);let a=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob!="undefined"&&i instanceof Blob?(s=new FormData,s.append("cacheControl",o.cacheControl),s.append("",i),l&&s.append("metadata",this.encodeMetadata(l))):typeof FormData!="undefined"&&i instanceof FormData?(s=i,s.append("cacheControl",o.cacheControl),l&&s.append("metadata",this.encodeMetadata(l))):(s=i,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),n!=null&&n.headers&&(a=Object.assign(Object.assign({},a),n.headers));const c=this._removeEmptyFolders(t),d=this._getFinalPath(c),u=yield this.fetch(`${this.url}/object/${d}`,Object.assign({method:e,body:s,headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{})),h=yield u.json();return u.ok?{data:{path:c,id:h.Id,fullPath:h.Key},error:null}:{data:null,error:h}}catch(s){if(br(s))return{data:null,error:s};throw s}})}upload(e,t,i){return Yr(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,t,i)})}uploadToSignedUrl(e,t,i,n){return Yr(this,void 0,void 0,function*(){const s=this._removeEmptyFolders(e),o=this._getFinalPath(s),a=new URL(this.url+`/object/upload/sign/${o}`);a.searchParams.set("token",t);try{let l;const c=Object.assign({upsert:O2.upsert},n),d=Object.assign(Object.assign({},this.headers),{"x-upsert":String(c.upsert)});typeof Blob!="undefined"&&i instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",i)):typeof FormData!="undefined"&&i instanceof FormData?(l=i,l.append("cacheControl",c.cacheControl)):(l=i,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType);const u=yield this.fetch(a.toString(),{method:"PUT",body:l,headers:d}),h=yield u.json();return u.ok?{data:{path:s,fullPath:h.Key},error:null}:{data:null,error:h}}catch(l){if(br(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(e,t){return Yr(this,void 0,void 0,function*(){try{let i=this._getFinalPath(e);const n=Object.assign({},this.headers);t!=null&&t.upsert&&(n["x-upsert"]="true");const s=yield ho(this.fetch,`${this.url}/object/upload/sign/${i}`,{},{headers:n}),o=new URL(this.url+s.url),a=o.searchParams.get("token");if(!a)throw new p_("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:a},error:null}}catch(i){if(br(i))return{data:null,error:i};throw i}})}update(e,t,i){return Yr(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,t,i)})}move(e,t,i){return Yr(this,void 0,void 0,function*(){try{return{data:yield ho(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:i==null?void 0:i.destinationBucket},{headers:this.headers}),error:null}}catch(n){if(br(n))return{data:null,error:n};throw n}})}copy(e,t,i){return Yr(this,void 0,void 0,function*(){try{return{data:{path:(yield ho(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:i==null?void 0:i.destinationBucket},{headers:this.headers})).Key},error:null}}catch(n){if(br(n))return{data:null,error:n};throw n}})}createSignedUrl(e,t,i){return Yr(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e),s=yield ho(this.fetch,`${this.url}/object/sign/${n}`,Object.assign({expiresIn:t},i!=null&&i.transform?{transform:i.transform}:{}),{headers:this.headers});const o=i!=null&&i.download?`&download=${i.download===!0?"":i.download}`:"";return s={signedUrl:encodeURI(`${this.url}${s.signedURL}${o}`)},{data:s,error:null}}catch(n){if(br(n))return{data:null,error:n};throw n}})}createSignedUrls(e,t,i){return Yr(this,void 0,void 0,function*(){try{const n=yield ho(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:t,paths:e},{headers:this.headers}),s=i!=null&&i.download?`&download=${i.download===!0?"":i.download}`:"";return{data:n.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${s}`):null})),error:null}}catch(n){if(br(n))return{data:null,error:n};throw n}})}download(e,t){return Yr(this,void 0,void 0,function*(){const n=typeof(t==null?void 0:t.transform)!="undefined"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),o=s?`?${s}`:"";try{const a=this._getFinalPath(e);return{data:yield(yield lf(this.fetch,`${this.url}/${n}/${a}${o}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if(br(a))return{data:null,error:a};throw a}})}info(e){return Yr(this,void 0,void 0,function*(){const t=this._getFinalPath(e);try{const i=yield lf(this.fetch,`${this.url}/object/info/${t}`,{headers:this.headers});return{data:X0(i),error:null}}catch(i){if(br(i))return{data:null,error:i};throw i}})}exists(e){return Yr(this,void 0,void 0,function*(){const t=this._getFinalPath(e);try{return yield Dj(this.fetch,`${this.url}/object/${t}`,{headers:this.headers}),{data:!0,error:null}}catch(i){if(br(i)&&i instanceof H0){const n=i.originalError;if([400,404].includes(n==null?void 0:n.status))return{data:!1,error:i}}throw i}})}getPublicUrl(e,t){const i=this._getFinalPath(e),n=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&n.push(s);const a=typeof(t==null?void 0:t.transform)!="undefined"?"render/image":"object",l=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});l!==""&&n.push(l);let c=n.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${i}${c}`)}}}remove(e){return Yr(this,void 0,void 0,function*(){try{return{data:yield Nk(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(t){if(br(t))return{data:null,error:t};throw t}})}list(e,t,i){return Yr(this,void 0,void 0,function*(){try{const n=Object.assign(Object.assign(Object.assign({},Mj),t),{prefix:e||""});return{data:yield ho(this.fetch,`${this.url}/object/list/${this.bucketId}`,n,{headers:this.headers},i),error:null}}catch(n){if(br(n))return{data:null,error:n};throw n}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer!="undefined"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}}const Fj="2.7.0",Nj={"X-Client-Info":`storage-js/${Fj}`};var $a=function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class zj{constructor(e,t={},i){this.url=e,this.headers=Object.assign(Object.assign({},Nj),t),this.fetch=Fk(i)}listBuckets(){return $a(this,void 0,void 0,function*(){try{return{data:yield lf(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(br(e))return{data:null,error:e};throw e}})}getBucket(e){return $a(this,void 0,void 0,function*(){try{return{data:yield lf(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(t){if(br(t))return{data:null,error:t};throw t}})}createBucket(e,t={public:!1}){return $a(this,void 0,void 0,function*(){try{return{data:yield ho(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(i){if(br(i))return{data:null,error:i};throw i}})}updateBucket(e,t){return $a(this,void 0,void 0,function*(){try{return{data:yield Pj(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(i){if(br(i))return{data:null,error:i};throw i}})}emptyBucket(e){return $a(this,void 0,void 0,function*(){try{return{data:yield ho(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(t){if(br(t))return{data:null,error:t};throw t}})}deleteBucket(e){return $a(this,void 0,void 0,function*(){try{return{data:yield Nk(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(t){if(br(t))return{data:null,error:t};throw t}})}}class Bj extends zj{constructor(e,t={},i){super(e,t,i)}from(e){return new Rj(this.url,this.headers,e,this.fetch)}}const jj="2.45.4";let Nc="";typeof Deno!="undefined"?Nc="deno":typeof document!="undefined"?Nc="web":typeof navigator!="undefined"&&navigator.product==="ReactNative"?Nc="react-native":Nc="node";const Gj={"X-Client-Info":`supabase-js-${Nc}/${jj}`},Vj={headers:Gj},Uj={schema:"public"},Hj={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Xj={};var Wj=function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Yj=r=>{let e;return r?e=r:typeof fetch=="undefined"?e=wk:e=fetch,(...t)=>e(...t)},qj=()=>typeof Headers=="undefined"?Sk:Headers,Zj=(r,e,t)=>{const i=Yj(t),n=qj();return(s,o)=>Wj(void 0,void 0,void 0,function*(){var a;const l=(a=yield e())!==null&&a!==void 0?a:r;let c=new n(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",r),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),i(s,Object.assign(Object.assign({},o),{headers:c}))})};var Kj=function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function Jj(r){return r.replace(/\/$/,"")}function Qj(r,e){const{db:t,auth:i,realtime:n,global:s}=r,{db:o,auth:a,realtime:l,global:c}=e,d={db:Object.assign(Object.assign({},o),t),auth:Object.assign(Object.assign({},a),i),realtime:Object.assign(Object.assign({},l),n),global:Object.assign(Object.assign({},c),s),accessToken:()=>Kj(this,void 0,void 0,function*(){return""})};return r.accessToken?d.accessToken=r.accessToken:delete d.accessToken,d}const zk="2.65.0",$j="http://localhost:9999",e9="supabase.auth.token",t9={"X-Client-Info":`gotrue-js/${zk}`},I2=10,W0="X-Supabase-Api-Version",Bk={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}};function i9(r){return Math.round(Date.now()/1e3)+r}function r9(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){const e=Math.random()*16|0;return(r=="x"?e:e&3|8).toString(16)})}const En=()=>typeof document!="undefined",Wo={tested:!1,writable:!1},qc=()=>{if(!En())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch(e){return!1}if(Wo.tested)return Wo.writable;const r=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(r,r),globalThis.localStorage.removeItem(r),Wo.tested=!0,Wo.writable=!0}catch(e){Wo.tested=!0,Wo.writable=!1}return Wo.writable};function jg(r){const e={},t=new URL(r);if(t.hash&&t.hash[0]==="#")try{new URLSearchParams(t.hash.substring(1)).forEach((n,s)=>{e[s]=n})}catch(i){}return t.searchParams.forEach((i,n)=>{e[n]=i}),e}const jk=r=>{let e;return r?e=r:typeof fetch=="undefined"?e=(...t)=>kl(()=>le(void 0,null,function*(){const{default:i}=yield Promise.resolve().then(()=>ql);return{default:i}}),void 0).then(({default:i})=>i(...t)):e=fetch,(...t)=>e(...t)},n9=r=>typeof r=="object"&&r!==null&&"status"in r&&"ok"in r&&"json"in r&&typeof r.json=="function",Gk=(r,e,t)=>le(void 0,null,function*(){yield r.setItem(e,JSON.stringify(t))}),rh=(r,e)=>le(void 0,null,function*(){const t=yield r.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(i){return t}}),nh=(r,e)=>le(void 0,null,function*(){yield r.removeItem(e)});function s9(r){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let t="",i,n,s,o,a,l,c,d=0;for(r=r.replace("-","+").replace("_","/");d>4,n=(a&15)<<4|l>>2,s=(l&3)<<6|c,t=t+String.fromCharCode(i),l!=64&&n!=0&&(t=t+String.fromCharCode(n)),c!=64&&s!=0&&(t=t+String.fromCharCode(s));return t}class Xf{constructor(){this.promise=new Xf.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}}Xf.promiseConstructor=Promise;function L2(r){const e=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,t=r.split(".");if(t.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!e.test(t[1]))throw new Error("JWT is not valid: payload is not in base64url format");const i=t[1];return JSON.parse(s9(i))}function o9(r){return le(this,null,function*(){return yield new Promise(e=>{setTimeout(()=>e(null),r)})})}function a9(r,e){return new Promise((i,n)=>{le(this,null,function*(){for(let s=0;s<1/0;s++)try{const o=yield r(s);if(!e(s,null,o)){i(o);return}}catch(o){if(!e(s,o)){n(o);return}}})})}function l9(r){return("0"+r.toString(16)).substr(-2)}function c9(){const e=new Uint32Array(56);if(typeof crypto=="undefined"){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",i=t.length;let n="";for(let s=0;s<56;s++)n+=t.charAt(Math.floor(Math.random()*i));return n}return crypto.getRandomValues(e),Array.from(e,l9).join("")}function d9(r){return le(this,null,function*(){const t=new TextEncoder().encode(r),i=yield crypto.subtle.digest("SHA-256",t),n=new Uint8Array(i);return Array.from(n).map(s=>String.fromCharCode(s)).join("")})}function u9(r){return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function h9(r){return le(this,null,function*(){if(!(typeof crypto!="undefined"&&typeof crypto.subtle!="undefined"&&typeof TextEncoder!="undefined"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),r;const t=yield d9(r);return u9(t)})}function el(r,e,t=!1){return le(this,null,function*(){const i=c9();let n=i;t&&(n+="/PASSWORD_RECOVERY"),yield Gk(r,`${e}-code-verifier`,n);const s=yield h9(i);return[s,i===s?"plain":"s256"]})}const f9=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function m9(r){const e=r.headers.get(W0);if(!e||!e.match(f9))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch(t){return null}}class g_ extends Error{constructor(e,t,i){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t,this.code=i}}function qt(r){return typeof r=="object"&&r!==null&&"__isAuthError"in r}class p9 extends g_{constructor(e,t,i){super(e,t,i),this.name="AuthApiError",this.status=t,this.code=i}}function g9(r){return qt(r)&&r.name==="AuthApiError"}class Vk extends g_{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class Sa extends g_{constructor(e,t,i,n){super(e,i,n),this.name=t,this.status=i}}class lo extends Sa{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function v9(r){return qt(r)&&r.name==="AuthSessionMissingError"}class Gg extends Sa{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class sh extends Sa{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class oh extends Sa{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class P2 extends Sa{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Y0 extends Sa{constructor(e,t){super(e,"AuthRetryableFetchError",t,void 0)}}function Vg(r){return qt(r)&&r.name==="AuthRetryableFetchError"}class D2 extends Sa{constructor(e,t,i){super(e,"AuthWeakPasswordError",t,"weak_password"),this.reasons=i}}var _9=function(r,e){var t={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.indexOf(i)<0&&(t[i]=r[i]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(r);nr.msg||r.message||r.error_description||r.error||JSON.stringify(r),y9=[502,503,504];function M2(r){return le(this,null,function*(){var e;if(!n9(r))throw new Y0(Yo(r),0);if(y9.includes(r.status))throw new Y0(Yo(r),r.status);let t;try{t=yield r.json()}catch(s){throw new Vk(Yo(s),s)}let i;const n=m9(r);if(n&&n.getTime()>=Bk["2024-01-01"].timestamp&&typeof t=="object"&&t&&typeof t.code=="string"?i=t.code:typeof t=="object"&&t&&typeof t.error_code=="string"&&(i=t.error_code),i){if(i==="weak_password")throw new D2(Yo(t),r.status,((e=t.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(i==="session_not_found")throw new lo}else if(typeof t=="object"&&t&&typeof t.weak_password=="object"&&t.weak_password&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.reasons.reduce((s,o)=>s&&typeof o=="string",!0))throw new D2(Yo(t),r.status,t.weak_password.reasons);throw new p9(Yo(t),r.status||500,i)})}const b9=(r,e,t,i)=>{const n={method:r,headers:(e==null?void 0:e.headers)||{}};return r==="GET"?n:(n.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),n.body=JSON.stringify(i),Object.assign(Object.assign({},n),t))};function ii(r,e,t,i){return le(this,null,function*(){var n;const s=Object.assign({},i==null?void 0:i.headers);s[W0]||(s[W0]=Bk["2024-01-01"].name),i!=null&&i.jwt&&(s.Authorization=`Bearer ${i.jwt}`);const o=(n=i==null?void 0:i.query)!==null&&n!==void 0?n:{};i!=null&&i.redirectTo&&(o.redirect_to=i.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=yield x9(r,e,t+a,{headers:s,noResolveJson:i==null?void 0:i.noResolveJson},{},i==null?void 0:i.body);return i!=null&&i.xform?i==null?void 0:i.xform(l):{data:Object.assign({},l),error:null}})}function x9(r,e,t,i,n,s){return le(this,null,function*(){const o=b9(e,i,n,s);let a;try{a=yield r(t,Object.assign({},o))}catch(l){throw console.error(l),new Y0(Yo(l),0)}if(a.ok||(yield M2(a)),i!=null&&i.noResolveJson)return a;try{return yield a.json()}catch(l){yield M2(l)}})}function co(r){var e;let t=null;C9(r)&&(t=Object.assign({},r),r.expires_at||(t.expires_at=i9(r.expires_in)));const i=(e=r.user)!==null&&e!==void 0?e:r;return{data:{session:t,user:i},error:null}}function R2(r){const e=co(r);return!e.error&&r.weak_password&&typeof r.weak_password=="object"&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.message&&typeof r.weak_password.message=="string"&&r.weak_password.reasons.reduce((t,i)=>t&&typeof i=="string",!0)&&(e.data.weak_password=r.weak_password),e}function mo(r){var e;return{data:{user:(e=r.user)!==null&&e!==void 0?e:r},error:null}}function w9(r){return{data:r,error:null}}function S9(r){const{action_link:e,email_otp:t,hashed_token:i,redirect_to:n,verification_type:s}=r,o=_9(r,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:t,hashed_token:i,redirect_to:n,verification_type:s},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function T9(r){return r}function C9(r){return r.access_token&&r.refresh_token&&r.expires_in}var k9=function(r,e){var t={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.indexOf(i)<0&&(t[i]=r[i]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(r);n0&&(f.forEach(m=>{const p=parseInt(m.split(";")[0].split("=")[1].substring(0,1)),g=JSON.parse(m.split(";")[1].split("=")[1]);c[`${g}Page`]=p}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},u),c),error:null}}catch(c){if(qt(c))return{data:{users:[]},error:c};throw c}})}getUserById(e){return le(this,null,function*(){try{return yield ii(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:mo})}catch(t){if(qt(t))return{data:{user:null},error:t};throw t}})}updateUserById(e,t){return le(this,null,function*(){try{return yield ii(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:mo})}catch(i){if(qt(i))return{data:{user:null},error:i};throw i}})}deleteUser(e,t=!1){return le(this,null,function*(){try{return yield ii(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:mo})}catch(i){if(qt(i))return{data:{user:null},error:i};throw i}})}_listFactors(e){return le(this,null,function*(){try{const{data:t,error:i}=yield ii(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:n=>({data:{factors:n},error:null})});return{data:t,error:i}}catch(t){if(qt(t))return{data:null,error:t};throw t}})}_deleteFactor(e){return le(this,null,function*(){try{return{data:yield ii(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(t){if(qt(t))return{data:null,error:t};throw t}})}}const A9={getItem:r=>qc()?globalThis.localStorage.getItem(r):null,setItem:(r,e)=>{qc()&&globalThis.localStorage.setItem(r,e)},removeItem:r=>{qc()&&globalThis.localStorage.removeItem(r)}};function F2(r={}){return{getItem:e=>r[e]||null,setItem:(e,t)=>{r[e]=t},removeItem:e=>{delete r[e]}}}function O9(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(r){typeof self!="undefined"&&(self.globalThis=self)}}const tl={debug:!!(globalThis&&qc()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Uk extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class I9 extends Uk{}function L9(r,e,t){return le(this,null,function*(){tl.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",r,e);const i=new globalThis.AbortController;return e>0&&setTimeout(()=>{i.abort(),tl.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",r)},e),yield globalThis.navigator.locks.request(r,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:i.signal},n=>le(this,null,function*(){if(n){tl.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",r,n.name);try{return yield t()}finally{tl.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",r,n.name)}}else{if(e===0)throw tl.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",r),new I9(`Acquiring an exclusive Navigator LockManager lock "${r}" immediately failed`);if(tl.debug)try{const s=yield globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(s,null," "))}catch(s){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",s)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),yield t()}}))})}O9();const P9={url:$j,storageKey:e9,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:t9,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},Oc=30*1e3,N2=3;function z2(r,e,t){return le(this,null,function*(){return yield t()})}class cd{constructor(e){var t,i;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=cd.nextInstanceID,cd.nextInstanceID+=1,this.instanceID>0&&En()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const n=Object.assign(Object.assign({},P9),e);if(this.logDebugMessages=!!n.debug,typeof n.debug=="function"&&(this.logger=n.debug),this.persistSession=n.persistSession,this.storageKey=n.storageKey,this.autoRefreshToken=n.autoRefreshToken,this.admin=new E9({url:n.url,headers:n.headers,fetch:n.fetch}),this.url=n.url,this.headers=n.headers,this.fetch=jk(n.fetch),this.lock=n.lock||z2,this.detectSessionInUrl=n.detectSessionInUrl,this.flowType=n.flowType,this.hasCustomAuthorizationHeader=n.hasCustomAuthorizationHeader,n.lock?this.lock=n.lock:En()&&(!((t=globalThis==null?void 0:globalThis.navigator)===null||t===void 0)&&t.locks)?this.lock=L9:this.lock=z2,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?n.storage?this.storage=n.storage:qc()?this.storage=A9:(this.memoryStorage={},this.storage=F2(this.memoryStorage)):(this.memoryStorage={},this.storage=F2(this.memoryStorage)),En()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(s){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",s)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",s=>le(this,null,function*(){this._debug("received broadcast notification from other tab or client",s),yield this._notifyAllSubscribers(s.data.event,s.data.session,!1)}))}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${zk}) ${new Date().toISOString()}`,...e),this}initialize(){return le(this,null,function*(){return this.initializePromise?yield this.initializePromise:(this.initializePromise=le(this,null,function*(){return yield this._acquireLock(-1,()=>le(this,null,function*(){return yield this._initialize()}))}),yield this.initializePromise)})}_initialize(){return le(this,null,function*(){try{const e=En()?yield this._isPKCEFlow():!1;if(this._debug("#_initialize()","begin","is PKCE flow",e),e||this.detectSessionInUrl&&this._isImplicitGrantFlow()){const{data:t,error:i}=yield this._getSessionFromURL(e);if(i)return this._debug("#_initialize()","error detecting session from URL",i),(i==null?void 0:i.message)==="Identity is already linked"||(i==null?void 0:i.message)==="Identity is already linked to another user"?{error:i}:(yield this._removeSession(),{error:i});const{session:n,redirectType:s}=t;return this._debug("#_initialize()","detected session in URL",n,"redirect type",s),yield this._saveSession(n),setTimeout(()=>le(this,null,function*(){s==="recovery"?yield this._notifyAllSubscribers("PASSWORD_RECOVERY",n):yield this._notifyAllSubscribers("SIGNED_IN",n)}),0),{error:null}}return yield this._recoverAndRefresh(),{error:null}}catch(e){return qt(e)?{error:e}:{error:new Vk("Unexpected error during initialization",e)}}finally{yield this._handleVisibilityChange(),this._debug("#_initialize()","end")}})}signInAnonymously(e){return le(this,null,function*(){var t,i,n;try{const s=yield ii(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(i=(t=e==null?void 0:e.options)===null||t===void 0?void 0:t.data)!==null&&i!==void 0?i:{},gotrue_meta_security:{captcha_token:(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.captchaToken}},xform:co}),{data:o,error:a}=s;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,c=o.user;return o.session&&(yield this._saveSession(o.session),yield this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(s){if(qt(s))return{data:{user:null,session:null},error:s};throw s}})}signUp(e){return le(this,null,function*(){var t,i,n;try{let s;if("email"in e){const{email:d,password:u,options:h}=e;let f=null,m=null;this.flowType==="pkce"&&([f,m]=yield el(this.storage,this.storageKey)),s=yield ii(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:d,password:u,data:(t=h==null?void 0:h.data)!==null&&t!==void 0?t:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:f,code_challenge_method:m},xform:co})}else if("phone"in e){const{phone:d,password:u,options:h}=e;s=yield ii(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:u,data:(i=h==null?void 0:h.data)!==null&&i!==void 0?i:{},channel:(n=h==null?void 0:h.channel)!==null&&n!==void 0?n:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:co})}else throw new sh("You must provide either an email or phone number and a password");const{data:o,error:a}=s;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,c=o.user;return o.session&&(yield this._saveSession(o.session),yield this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(s){if(qt(s))return{data:{user:null,session:null},error:s};throw s}})}signInWithPassword(e){return le(this,null,function*(){try{let t;if("email"in e){const{email:s,password:o,options:a}=e;t=yield ii(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:R2})}else if("phone"in e){const{phone:s,password:o,options:a}=e;t=yield ii(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:R2})}else throw new sh("You must provide either an email or phone number and a password");const{data:i,error:n}=t;return n?{data:{user:null,session:null},error:n}:!i||!i.session||!i.user?{data:{user:null,session:null},error:new Gg}:(i.session&&(yield this._saveSession(i.session),yield this._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign({user:i.user,session:i.session},i.weak_password?{weakPassword:i.weak_password}:null),error:n})}catch(t){if(qt(t))return{data:{user:null,session:null},error:t};throw t}})}signInWithOAuth(e){return le(this,null,function*(){var t,i,n,s;return yield this._handleProviderSignIn(e.provider,{redirectTo:(t=e.options)===null||t===void 0?void 0:t.redirectTo,scopes:(i=e.options)===null||i===void 0?void 0:i.scopes,queryParams:(n=e.options)===null||n===void 0?void 0:n.queryParams,skipBrowserRedirect:(s=e.options)===null||s===void 0?void 0:s.skipBrowserRedirect})})}exchangeCodeForSession(e){return le(this,null,function*(){return yield this.initializePromise,this._acquireLock(-1,()=>le(this,null,function*(){return this._exchangeCodeForSession(e)}))})}_exchangeCodeForSession(e){return le(this,null,function*(){const t=yield rh(this.storage,`${this.storageKey}-code-verifier`),[i,n]=(t!=null?t:"").split("/");try{const{data:s,error:o}=yield ii(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:i},xform:co});if(yield nh(this.storage,`${this.storageKey}-code-verifier`),o)throw o;return!s||!s.session||!s.user?{data:{user:null,session:null,redirectType:null},error:new Gg}:(s.session&&(yield this._saveSession(s.session),yield this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:Object.assign(Object.assign({},s),{redirectType:n!=null?n:null}),error:o})}catch(s){if(qt(s))return{data:{user:null,session:null,redirectType:null},error:s};throw s}})}signInWithIdToken(e){return le(this,null,function*(){try{const{options:t,provider:i,token:n,access_token:s,nonce:o}=e,a=yield ii(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:i,id_token:n,access_token:s,nonce:o,gotrue_meta_security:{captcha_token:t==null?void 0:t.captchaToken}},xform:co}),{data:l,error:c}=a;return c?{data:{user:null,session:null},error:c}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Gg}:(l.session&&(yield this._saveSession(l.session),yield this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:c})}catch(t){if(qt(t))return{data:{user:null,session:null},error:t};throw t}})}signInWithOtp(e){return le(this,null,function*(){var t,i,n,s,o;try{if("email"in e){const{email:a,options:l}=e;let c=null,d=null;this.flowType==="pkce"&&([c,d]=yield el(this.storage,this.storageKey));const{error:u}=yield ii(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(t=l==null?void 0:l.data)!==null&&t!==void 0?t:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:u}}if("phone"in e){const{phone:a,options:l}=e,{data:c,error:d}=yield ii(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(s=l==null?void 0:l.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:d}}throw new sh("You must provide either an email or phone number.")}catch(a){if(qt(a))return{data:{user:null,session:null},error:a};throw a}})}verifyOtp(e){return le(this,null,function*(){var t,i;try{let n,s;"options"in e&&(n=(t=e.options)===null||t===void 0?void 0:t.redirectTo,s=(i=e.options)===null||i===void 0?void 0:i.captchaToken);const{data:o,error:a}=yield ii(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:s}}),redirectTo:n,xform:co});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(yield this._saveSession(l),yield this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(n){if(qt(n))return{data:{user:null,session:null},error:n};throw n}})}signInWithSSO(e){return le(this,null,function*(){var t,i,n;try{let s=null,o=null;return this.flowType==="pkce"&&([s,o]=yield el(this.storage,this.storageKey)),yield ii(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(i=(t=e.options)===null||t===void 0?void 0:t.redirectTo)!==null&&i!==void 0?i:void 0}),!((n=e==null?void 0:e.options)===null||n===void 0)&&n.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:s,code_challenge_method:o}),headers:this.headers,xform:w9})}catch(s){if(qt(s))return{data:null,error:s};throw s}})}reauthenticate(){return le(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>le(this,null,function*(){return yield this._reauthenticate()}))})}_reauthenticate(){return le(this,null,function*(){try{return yield this._useSession(e=>le(this,null,function*(){const{data:{session:t},error:i}=e;if(i)throw i;if(!t)throw new lo;const{error:n}=yield ii(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return{data:{user:null,session:null},error:n}}))}catch(e){if(qt(e))return{data:{user:null,session:null},error:e};throw e}})}resend(e){return le(this,null,function*(){try{const t=`${this.url}/resend`;if("email"in e){const{email:i,type:n,options:s}=e,{error:o}=yield ii(this.fetch,"POST",t,{headers:this.headers,body:{email:i,type:n,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},redirectTo:s==null?void 0:s.emailRedirectTo});return{data:{user:null,session:null},error:o}}else if("phone"in e){const{phone:i,type:n,options:s}=e,{data:o,error:a}=yield ii(this.fetch,"POST",t,{headers:this.headers,body:{phone:i,type:n,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a}}throw new sh("You must provide either an email or phone number and a type")}catch(t){if(qt(t))return{data:{user:null,session:null},error:t};throw t}})}getSession(){return le(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>le(this,null,function*(){return this._useSession(t=>le(this,null,function*(){return t}))}))})}_acquireLock(e,t){return le(this,null,function*(){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const i=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),n=le(this,null,function*(){return yield i,yield t()});return this.pendingInLock.push(le(this,null,function*(){try{yield n}catch(s){}})),n}return yield this.lock(`lock:${this.storageKey}`,e,()=>le(this,null,function*(){this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const i=t();for(this.pendingInLock.push(le(this,null,function*(){try{yield i}catch(n){}})),yield i;this.pendingInLock.length;){const n=[...this.pendingInLock];yield Promise.all(n),this.pendingInLock.splice(0,n.length)}return yield i}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}}))}finally{this._debug("#_acquireLock","end")}})}_useSession(e){return le(this,null,function*(){this._debug("#_useSession","begin");try{const t=yield this.__loadSession();return yield e(t)}finally{this._debug("#_useSession","end")}})}__loadSession(){return le(this,null,function*(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const t=yield rh(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),t!==null&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not valid"),yield this._removeSession())),!e)return{data:{session:null},error:null};const i=e.expires_at?e.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${i?"":" not"} expired`,"expires_at",e.expires_at),!i){if(this.storage.isServer){let o=this.suppressGetSessionWarning;e=new Proxy(e,{get:(l,c,d)=>(!o&&c==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and many not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),o=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,c,d))})}return{data:{session:e},error:null}}const{session:n,error:s}=yield this._callRefreshToken(e.refresh_token);return s?{data:{session:null},error:s}:{data:{session:n},error:null}}finally{this._debug("#__loadSession()","end")}})}getUser(e){return le(this,null,function*(){return e?yield this._getUser(e):(yield this.initializePromise,yield this._acquireLock(-1,()=>le(this,null,function*(){return yield this._getUser()})))})}_getUser(e){return le(this,null,function*(){try{return e?yield ii(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:mo}):yield this._useSession(t=>le(this,null,function*(){var i,n,s;const{data:o,error:a}=t;if(a)throw a;return!(!((i=o.session)===null||i===void 0)&&i.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new lo}:yield ii(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(n=o.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0,xform:mo})}))}catch(t){if(qt(t))return v9(t)&&(yield this._removeSession(),yield nh(this.storage,`${this.storageKey}-code-verifier`),yield this._notifyAllSubscribers("SIGNED_OUT",null)),{data:{user:null},error:t};throw t}})}updateUser(i){return le(this,arguments,function*(e,t={}){return yield this.initializePromise,yield this._acquireLock(-1,()=>le(this,null,function*(){return yield this._updateUser(e,t)}))})}_updateUser(i){return le(this,arguments,function*(e,t={}){try{return yield this._useSession(n=>le(this,null,function*(){const{data:s,error:o}=n;if(o)throw o;if(!s.session)throw new lo;const a=s.session;let l=null,c=null;this.flowType==="pkce"&&e.email!=null&&([l,c]=yield el(this.storage,this.storageKey));const{data:d,error:u}=yield ii(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:t==null?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:l,code_challenge_method:c}),jwt:a.access_token,xform:mo});if(u)throw u;return a.user=d.user,yield this._saveSession(a),yield this._notifyAllSubscribers("USER_UPDATED",a),{data:{user:a.user},error:null}}))}catch(n){if(qt(n))return{data:{user:null},error:n};throw n}})}_decodeJWT(e){return L2(e)}setSession(e){return le(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>le(this,null,function*(){return yield this._setSession(e)}))})}_setSession(e){return le(this,null,function*(){try{if(!e.access_token||!e.refresh_token)throw new lo;const t=Date.now()/1e3;let i=t,n=!0,s=null;const o=L2(e.access_token);if(o.exp&&(i=o.exp,n=i<=t),n){const{session:a,error:l}=yield this._callRefreshToken(e.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!a)return{data:{user:null,session:null},error:null};s=a}else{const{data:a,error:l}=yield this._getUser(e.access_token);if(l)throw l;s={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:i-t,expires_at:i},yield this._saveSession(s),yield this._notifyAllSubscribers("SIGNED_IN",s)}return{data:{user:s.user,session:s},error:null}}catch(t){if(qt(t))return{data:{session:null,user:null},error:t};throw t}})}refreshSession(e){return le(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>le(this,null,function*(){return yield this._refreshSession(e)}))})}_refreshSession(e){return le(this,null,function*(){try{return yield this._useSession(t=>le(this,null,function*(){var i;if(!e){const{data:o,error:a}=t;if(a)throw a;e=(i=o.session)!==null&&i!==void 0?i:void 0}if(!(e!=null&&e.refresh_token))throw new lo;const{session:n,error:s}=yield this._callRefreshToken(e.refresh_token);return s?{data:{user:null,session:null},error:s}:n?{data:{user:n.user,session:n},error:null}:{data:{user:null,session:null},error:null}}))}catch(t){if(qt(t))return{data:{user:null,session:null},error:t};throw t}})}_getSessionFromURL(e){return le(this,null,function*(){try{if(!En())throw new oh("No browser detected.");if(this.flowType==="implicit"&&!this._isImplicitGrantFlow())throw new oh("Not a valid implicit grant flow url.");if(this.flowType=="pkce"&&!e)throw new P2("Not a valid PKCE flow url.");const t=jg(window.location.href);if(e){if(!t.code)throw new P2("No code detected.");const{data:b,error:S}=yield this._exchangeCodeForSession(t.code);if(S)throw S;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:b.session,redirectType:null},error:null}}if(t.error||t.error_description||t.error_code)throw new oh(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});const{provider_token:i,provider_refresh_token:n,access_token:s,refresh_token:o,expires_in:a,expires_at:l,token_type:c}=t;if(!s||!a||!o||!c)throw new oh("No session defined in URL");const d=Math.round(Date.now()/1e3),u=parseInt(a);let h=d+u;l&&(h=parseInt(l));const f=h-d;f*1e3<=Oc&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${u}s`);const m=h-u;d-m>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",m,h,d):d-m<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",m,h,d);const{data:p,error:g}=yield this._getUser(s);if(g)throw g;const v={provider_token:i,provider_refresh_token:n,access_token:s,expires_in:u,expires_at:h,refresh_token:o,token_type:c,user:p.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:v,redirectType:t.type},error:null}}catch(t){if(qt(t))return{data:{session:null,redirectType:null},error:t};throw t}})}_isImplicitGrantFlow(){const e=jg(window.location.href);return!!(En()&&(e.access_token||e.error_description))}_isPKCEFlow(){return le(this,null,function*(){const e=jg(window.location.href),t=yield rh(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&t)})}signOut(){return le(this,arguments,function*(e={scope:"global"}){return yield this.initializePromise,yield this._acquireLock(-1,()=>le(this,null,function*(){return yield this._signOut(e)}))})}_signOut(){return le(this,arguments,function*({scope:e}={scope:"global"}){return yield this._useSession(t=>le(this,null,function*(){var i;const{data:n,error:s}=t;if(s)return{error:s};const o=(i=n.session)===null||i===void 0?void 0:i.access_token;if(o){const{error:a}=yield this.admin.signOut(o,e);if(a&&!(g9(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return e!=="others"&&(yield this._removeSession(),yield nh(this.storage,`${this.storageKey}-code-verifier`),yield this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}}))})}onAuthStateChange(e){const t=r9(),i={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,i),le(this,null,function*(){yield this.initializePromise,yield this._acquireLock(-1,()=>le(this,null,function*(){this._emitInitialSession(t)}))}),{data:{subscription:i}}}_emitInitialSession(e){return le(this,null,function*(){return yield this._useSession(t=>le(this,null,function*(){var i,n;try{const{data:{session:s},error:o}=t;if(o)throw o;yield(i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",s),this._debug("INITIAL_SESSION","callback id",e,"session",s)}catch(s){yield(n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",null),this._debug("INITIAL_SESSION","callback id",e,"error",s),console.error(s)}}))})}resetPasswordForEmail(i){return le(this,arguments,function*(e,t={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=yield el(this.storage,this.storageKey,!0));try{return yield ii(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(o){if(qt(o))return{data:null,error:o};throw o}})}getUserIdentities(){return le(this,null,function*(){var e;try{const{data:t,error:i}=yield this.getUser();if(i)throw i;return{data:{identities:(e=t.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(t){if(qt(t))return{data:null,error:t};throw t}})}linkIdentity(e){return le(this,null,function*(){var t;try{const{data:i,error:n}=yield this._useSession(s=>le(this,null,function*(){var o,a,l,c,d;const{data:u,error:h}=s;if(h)throw h;const f=yield this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return yield ii(this.fetch,"GET",f,{headers:this.headers,jwt:(d=(c=u.session)===null||c===void 0?void 0:c.access_token)!==null&&d!==void 0?d:void 0})}));if(n)throw n;return En()&&!(!((t=e.options)===null||t===void 0)&&t.skipBrowserRedirect)&&window.location.assign(i==null?void 0:i.url),{data:{provider:e.provider,url:i==null?void 0:i.url},error:null}}catch(i){if(qt(i))return{data:{provider:e.provider,url:null},error:i};throw i}})}unlinkIdentity(e){return le(this,null,function*(){try{return yield this._useSession(t=>le(this,null,function*(){var i,n;const{data:s,error:o}=t;if(o)throw o;return yield ii(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(n=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&n!==void 0?n:void 0})}))}catch(t){if(qt(t))return{data:null,error:t};throw t}})}_refreshAccessToken(e){return le(this,null,function*(){const t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{const i=Date.now();return yield a9(n=>le(this,null,function*(){return n>0&&(yield o9(200*Math.pow(2,n-1))),this._debug(t,"refreshing attempt",n),yield ii(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:co})}),(n,s)=>{const o=200*Math.pow(2,n);return s&&Vg(s)&&Date.now()+o-ile(this,null,function*(){try{yield a.callback(e,t)}catch(l){s.push(l)}}));if(yield Promise.all(o),s.length>0){for(let a=0;athis._autoRefreshTokenTick(),Oc);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno!="undefined"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(()=>le(this,null,function*(){yield this.initializePromise,yield this._autoRefreshTokenTick()}),0)})}_stopAutoRefresh(){return le(this,null,function*(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)})}startAutoRefresh(){return le(this,null,function*(){this._removeVisibilityChangedCallback(),yield this._startAutoRefresh()})}stopAutoRefresh(){return le(this,null,function*(){this._removeVisibilityChangedCallback(),yield this._stopAutoRefresh()})}_autoRefreshTokenTick(){return le(this,null,function*(){this._debug("#_autoRefreshTokenTick()","begin");try{yield this._acquireLock(0,()=>le(this,null,function*(){try{const e=Date.now();try{return yield this._useSession(t=>le(this,null,function*(){const{data:{session:i}}=t;if(!i||!i.refresh_token||!i.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const n=Math.floor((i.expires_at*1e3-e)/Oc);this._debug("#_autoRefreshTokenTick()",`access token expires in ${n} ticks, a tick lasts ${Oc}ms, refresh threshold is ${N2} ticks`),n<=N2&&(yield this._callRefreshToken(i.refresh_token))}))}catch(t){console.error("Auto refresh tick failed with error. This is likely a transient error.",t)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}))}catch(e){if(e.isAcquireTimeout||e instanceof Uk)this._debug("auto refresh token tick lock not available");else throw e}})}_handleVisibilityChange(){return le(this,null,function*(){if(this._debug("#_handleVisibilityChange()"),!En()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=()=>le(this,null,function*(){return yield this._onVisibilityChanged(!1)}),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),yield this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}})}_onVisibilityChanged(e){return le(this,null,function*(){const t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(yield this.initializePromise,yield this._acquireLock(-1,()=>le(this,null,function*(){if(document.visibilityState!=="visible"){this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}yield this._recoverAndRefresh()})))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()})}_getUrlForProvider(e,t,i){return le(this,null,function*(){const n=[`provider=${encodeURIComponent(t)}`];if(i!=null&&i.redirectTo&&n.push(`redirect_to=${encodeURIComponent(i.redirectTo)}`),i!=null&&i.scopes&&n.push(`scopes=${encodeURIComponent(i.scopes)}`),this.flowType==="pkce"){const[s,o]=yield el(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(s)}`,code_challenge_method:`${encodeURIComponent(o)}`});n.push(a.toString())}if(i!=null&&i.queryParams){const s=new URLSearchParams(i.queryParams);n.push(s.toString())}return i!=null&&i.skipBrowserRedirect&&n.push(`skip_http_redirect=${i.skipBrowserRedirect}`),`${e}?${n.join("&")}`})}_unenroll(e){return le(this,null,function*(){try{return yield this._useSession(t=>le(this,null,function*(){var i;const{data:n,error:s}=t;return s?{data:null,error:s}:yield ii(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(i=n==null?void 0:n.session)===null||i===void 0?void 0:i.access_token})}))}catch(t){if(qt(t))return{data:null,error:t};throw t}})}_enroll(e){return le(this,null,function*(){try{return yield this._useSession(t=>le(this,null,function*(){var i,n;const{data:s,error:o}=t;if(o)return{data:null,error:o};const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:{issuer:e.issuer}),{data:l,error:c}=yield ii(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(i=s==null?void 0:s.session)===null||i===void 0?void 0:i.access_token});return c?{data:null,error:c}:(e.factorType==="phone"&&delete l.totp,e.factorType==="totp"&&(!((n=l==null?void 0:l.totp)===null||n===void 0)&&n.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})}))}catch(t){if(qt(t))return{data:null,error:t};throw t}})}_verify(e){return le(this,null,function*(){return this._acquireLock(-1,()=>le(this,null,function*(){try{return yield this._useSession(t=>le(this,null,function*(){var i;const{data:n,error:s}=t;if(s)return{data:null,error:s};const{data:o,error:a}=yield ii(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(i=n==null?void 0:n.session)===null||i===void 0?void 0:i.access_token});return a?{data:null,error:a}:(yield this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),yield this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:a})}))}catch(t){if(qt(t))return{data:null,error:t};throw t}}))})}_challenge(e){return le(this,null,function*(){return this._acquireLock(-1,()=>le(this,null,function*(){try{return yield this._useSession(t=>le(this,null,function*(){var i;const{data:n,error:s}=t;return s?{data:null,error:s}:yield ii(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:(i=n==null?void 0:n.session)===null||i===void 0?void 0:i.access_token})}))}catch(t){if(qt(t))return{data:null,error:t};throw t}}))})}_challengeAndVerify(e){return le(this,null,function*(){const{data:t,error:i}=yield this._challenge({factorId:e.factorId});return i?{data:null,error:i}:yield this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})})}_listFactors(){return le(this,null,function*(){const{data:{user:e},error:t}=yield this.getUser();if(t)return{data:null,error:t};const i=(e==null?void 0:e.factors)||[],n=i.filter(o=>o.factor_type==="totp"&&o.status==="verified"),s=i.filter(o=>o.factor_type==="phone"&&o.status==="verified");return{data:{all:i,totp:n,phone:s},error:null}})}_getAuthenticatorAssuranceLevel(){return le(this,null,function*(){return this._acquireLock(-1,()=>le(this,null,function*(){return yield this._useSession(e=>le(this,null,function*(){var t,i;const{data:{session:n},error:s}=e;if(s)return{data:null,error:s};if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const o=this._decodeJWT(n.access_token);let a=null;o.aal&&(a=o.aal);let l=a;((i=(t=n.user.factors)===null||t===void 0?void 0:t.filter(u=>u.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(l="aal2");const d=o.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:d},error:null}}))}))})}}cd.nextInstanceID=0;const D9=cd;class M9 extends D9{constructor(e){super(e)}}var R9=function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class F9{constructor(e,t,i){var n,s,o;if(this.supabaseUrl=e,this.supabaseKey=t,!e)throw new Error("supabaseUrl is required.");if(!t)throw new Error("supabaseKey is required.");const a=Jj(e);this.realtimeUrl=`${a}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${a}/auth/v1`,this.storageUrl=`${a}/storage/v1`,this.functionsUrl=`${a}/functions/v1`;const l=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,c={db:Uj,realtime:Xj,auth:Object.assign(Object.assign({},Hj),{storageKey:l}),global:Vj},d=Qj(i!=null?i:{},c);this.storageKey=(n=d.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=d.global.headers)!==null&&s!==void 0?s:{},d.accessToken?(this.accessToken=d.accessToken,this.auth=new Proxy({},{get:(u,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=d.auth)!==null&&o!==void 0?o:{},this.headers,d.global.fetch),this.fetch=Zj(t,this._getAccessToken.bind(this),d.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},d.realtime)),this.rest=new uj(`${a}/rest/v1`,{headers:this.headers,schema:d.db.schema,fetch:this.fetch}),d.accessToken||this._listenForAuthEvents()}get functions(){return new GB(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new Bj(this.storageUrl,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},i={}){return this.rest.rpc(e,t,i)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,t;return R9(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:i}=yield this.auth.getSession();return(t=(e=i.session)===null||e===void 0?void 0:e.access_token)!==null&&t!==void 0?t:null})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:i,storage:n,storageKey:s,flowType:o,lock:a,debug:l},c,d){var u;const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new M9({url:this.authUrl,headers:Object.assign(Object.assign({},h),c),storageKey:s,autoRefreshToken:e,persistSession:t,detectSessionInUrl:i,storage:n,flowType:o,lock:a,debug:l,fetch:d,hasCustomAuthorizationHeader:(u="Authorization"in this.headers)!==null&&u!==void 0?u:!1})}_initRealtimeClient(e){return new Cj(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,i)=>{this._handleTokenChanged(t,"CLIENT",i==null?void 0:i.access_token)})}_handleTokenChanged(e,t,i){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==i?(this.realtime.setAuth(i!=null?i:null),this.changedAccessToken=i):e==="SIGNED_OUT"&&(this.realtime.setAuth(this.supabaseKey),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const N9=(r,e,t)=>new F9(r,e,t),z9=N9("https://xovkkfhojasbjinfslpx.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InhvdmtrZmhvamFzYmppbmZzbHB4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTM1ODQ0ODAsImV4cCI6MjAwOTE2MDQ4MH0.L3-X0p_un0oSTNubPwtfGo0D8g2bkPIfz7CaZ-iRYXY");function B9(r){return le(this,null,function*(){const{error:e}=yield z9.from("metrics").insert(r);return e})}var B2=[],Ic=[];function j9(r,e){if(r&&typeof document!="undefined"){var t,i=e.prepend===!0?"prepend":"append",n=e.singleTag===!0,s=typeof e.container=="string"?document.querySelector(e.container):document.getElementsByTagName("head")[0];if(n){var o=B2.indexOf(s);o===-1&&(o=B2.push(s)-1,Ic[o]={}),t=Ic[o]&&Ic[o][i]?Ic[o][i]:Ic[o][i]=a()}else t=a();r.charCodeAt(0)===65279&&(r=r.substring(1)),t.styleSheet?t.styleSheet.cssText+=r:t.appendChild(document.createTextNode(r))}function a(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),e.attributes)for(var c=Object.keys(e.attributes),d=0;dr.id,nodeLabelClassName:void 0,nodeLabelColor:void 0,hoveredNodeLabelClassName:void 0,hoveredNodeLabelColor:void 0,onSetData:void 0,onNodesFiltered:void 0,onLinksFiltered:void 0,onLabelClick:void 0};let v_=bl,G2=bl,V2=bl,Hk=Wk,Xk=Yk;typeof Uint8Array!="undefined"&&(v_=function(r){return new Uint8Array(r)},G2=function(r){return new Uint16Array(r)},V2=function(r){return new Uint32Array(r)},Hk=function(r,e){if(r.length>=e)return r;var t=new r.constructor(e);return t.set(r),t},Xk=function(r,e){var t;switch(e){case 16:t=G2(r.length);break;case 32:t=V2(r.length);break;default:throw new Error("invalid array width!")}return t.set(r),t});function bl(r){for(var e=new Array(r),t=-1;++t32)throw new Error("invalid array width!");return r}function ds(r){this.length=r,this.subarrays=1,this.width=8,this.masks={0:0},this[0]=v_(r)}ds.prototype.lengthen=function(r){var e,t;for(e=0,t=this.subarrays;e>>0,!(e>=32&&!t))return e<32&&t&1<=r;i--)this[e][i]=0;this.length=r};ds.prototype.zero=function(r){var e,t;for(e=0,t=this.subarrays;e>>0),s!=(o===i?n:0))return!1;return!0};const po={array8:bl,array16:bl,array32:bl,arrayLengthen:Wk,arrayWiden:Yk,bitarray:ds},V9=(r,e)=>function(t){var i=t.length;return[r.left(t,e,0,i),r.right(t,e,0,i)]},U9=(r,e)=>{var t=e[0],i=e[1];return function(n){var s=n.length;return[r.left(n,t,0,s),r.left(n,i,0,s)]}},H9=r=>[0,r.length],il={filterExact:V9,filterRange:U9,filterAll:H9},dd=r=>r,Yn=()=>null,ah=()=>0;function qk(r){function e(n,s,o){for(var a=o-s,l=(a>>>1)+1;--l>0;)i(n,l,a,s);return n}function t(n,s,o){for(var a=o-s,l;--a>0;)l=n[s],n[s]=n[s+a],n[s+a]=l,i(n,1,a,s);return n}function i(n,s,o,a){for(var l=n[--a+s],c=r(l),d;(d=s<<1)<=o&&(dr(n[a+d+1])&&d++,!(c<=r(n[a+d])));)n[a+s]=n[a+d],s=d;n[a+s]=l}return e.sort=t,e}const Wf=qk(dd);Wf.by=qk;function Zk(r){var e=Wf.by(r);function t(i,n,s,o){var a=new Array(o=Math.min(s-n,o)),l,c,d;for(c=0;cl&&(a[0]=d,l=r(e(a,0,o)[0]));while(++n>>1;r(i[a])>>1;n{for(var i=0,n=e.length,s=t?JSON.parse(JSON.stringify(r)):new Array(n);ir+1,W9=r=>r-1,Y9=r=>function(e,t){return e+ +r(t)},q9=r=>function(e,t){return e-r(t)},oo={reduceIncrement:X9,reduceDecrement:W9,reduceAdd:Y9,reduceSubtract:q9};function Z9(r,e,t,i,n){for(n in i=(t=t.split(".")).splice(-1,1),t)e=e[t[n]]=e[t[n]]||{};return r(e,i)}const K9=(r,e)=>{const t=r[e];return typeof t=="function"?t.call(r):t},J9=/\[([\w\d]+)\]/g,Q9=(r,e)=>Z9(K9,r,e.replace(J9,".$1"));var ao=-1;Id.heap=Wf;Id.heapselect=__;Id.bisect=cf;Id.permute=wh;function Id(){var r={add:l,remove:c,dimension:h,groupAll:f,size:m,all:p,allFiltered:g,onChange:v,isElementFiltered:u},e=[],t=0,i,n=[],s=[],o=[],a=[];i=new po.bitarray(0);function l(S){var _=t,x=S.length;return x&&(e=e.concat(S),i.lengthen(t+=x),s.forEach(function(I){I(S,_,x)}),b("dataAdded")),r}function c(S){for(var _=new Array(t),x=[],I=typeof S=="function",T=function(H){return I?S(e[H],H):i.zero(H)},O=0,E=0;O>7]&=~(1<<(T&63));return O}function u(S,_){var x=d(_||[]);return i.zeroExceptMask(S,x)}function h(S,_){if(typeof S=="string"){var x=S;S=function(at){return Q9(at,x)}}var I={filter:ei,filterExact:rt,filterRange:_t,filterFunction:Si,filterAll:vi,currentFilter:Ta,hasCurrentFilter:qf,top:Zf,bottom:P,group:Ld,groupAll:Kf,dispose:Pd,remove:Pd,accessor:S,id:function(){return w}},T,O,E,w,X,H,Y,k,D,M,L=[],J=function(at){return Ug(at).sort(function(ut,Te){var fe=Y[ut],Dt=Y[Te];return feDt?1:ut-Te})},ce=il.filterAll,te,et,ot,Ot=[],gt=[],je=0,At=0,It=0,de;s.unshift(He),s.push(dt),o.push(Oe);var pe=i.add();E=pe.offset,T=pe.one,O=~T,w=E<<7|Math.log(T)/Math.log(2),He(e,0,t),dt(e,0,t);function He(at,ut,Te){var fe,Dt;if(_){It=0,wr=0,de=[];for(var yt=0;ytje)for(fe=je,Dt=Math.min(ut,At);feAt)for(fe=Math.max(ut,At),Dt=Te;fe0&&(yt=ut);--fe>=je&&at>0;)i.zero(Dt=H[fe])&&(yt>0?--yt:(Te.push(e[Dt]),--at));if(_)for(fe=0;fe0;fe++)i.zero(Dt=L[fe])&&(yt>0?--yt:(Te.push(e[Dt]),--at));return Te}function P(at,ut){var Te=[],fe,Dt,yt=0;if(ut&&ut>0&&(yt=ut),_)for(fe=0;fe0;fe++)i.zero(Dt=L[fe])&&(yt>0?--yt:(Te.push(e[Dt]),--at));for(fe=je;fe0;)i.zero(Dt=H[fe])&&(yt>0?--yt:(Te.push(e[Dt]),--at)),fe++;return Te}function Ld(at){var ut={top:Jf,all:ir,reduce:Zl,reduceCount:Dd,reduceSum:Qf,order:Md,orderNatural:Rd,size:Fd,dispose:Ii,remove:Ii};gt.push(ut);var Te,fe,Dt=8,yt=U2(Dt),bt=0,_i,li,ji,Ri,Or,Di=Yn,yi=Yn,tr=!0,Rr=at===Yn,wn;arguments.length<1&&(at=dd),n.push(Di),Ot.push(us),o.push(Ao),us(X,H,0,t);function us(lt,Yt,oi,Wi){_&&(wn=oi,oi=X.length-lt.length,Wi=lt.length);var Kt=Te,Nt=_?[]:qo(bt,yt),ci=ji,bi=Ri,rr=Or,dr=bt,ur=0,hs=0,dn,Hs,Ca,fs,ms,Kl;for(tr&&(ci=rr=Yn),tr&&(bi=rr=Yn),Te=new Array(bt),bt=0,_?fe=dr?fe:[]:fe=dr>1?po.arrayLengthen(fe,t):qo(t,yt),dr&&(Ca=(Hs=Kt[0]).key);hs=fs);)++hs;for(;hs=Wi));)fs=at(lt[hs]);Nd()}for(;urur)if(_)for(ur=0;ur1||_?(Di=Us,yi=Oo):(!bt&&Rr&&(bt=1,Te=[{key:null,value:rr()}]),bt===1?(Di=Ti,yi=wr):(Di=Yn,yi=Yn),fe=null),n[dn]=Di;function Nd(){if(_){bt++;return}++bt===yt&&(Nt=po.arrayWiden(Nt,Dt<<=1),fe=po.arrayWiden(fe,Dt),yt=U2(Dt))}}function Ao(lt){if(bt>1||_){var Yt=bt,oi=Te,Wi=qo(Yt,Yt),Kt,Nt,ci;if(_){for(Kt=0,ci=0;Kt1||_)if(_)for(Kt=0;Kt1||_?(yi=Oo,Di=Us):bt===1?(yi=wr,Di=Ti):yi=Di=Yn}else if(bt===1){if(Rr)return;for(var bi=0;bi=0&&n.splice(lt,1),lt=Ot.indexOf(us),lt>=0&&Ot.splice(lt,1),lt=o.indexOf(Ao),lt>=0&&o.splice(lt,1),lt=gt.indexOf(ut),lt>=0&>.splice(lt,1),ut}return Dd().orderNatural()}function Kf(){var at=Ld(Yn),ut=at.all;return delete at.all,delete at.top,delete at.order,delete at.orderNatural,delete at.size,at.value=function(){return ut()[0].value},at}function Pd(){gt.forEach(function(ut){ut.dispose()});var at=s.indexOf(He);return at>=0&&s.splice(at,1),at=s.indexOf(dt),at>=0&&s.splice(at,1),at=o.indexOf(Oe),at>=0&&o.splice(at,1),i.masks[E]&=O,vi()}return I}function f(){var S={reduce:H,reduceCount:Y,reduceSum:k,value:D,dispose:M,remove:M},_,x,I,T,O=!0;n.push(w),s.push(E),E(e,0);function E(L,J){var ce;if(!O)for(ce=J;ce=0&&n.splice(L,1),L=s.indexOf(E),L>=0&&s.splice(L,1),S}return Y()}function m(){return t}function p(){return e}function g(S){var _=[],x=0,I=d(S||[]);for(x=0;x{var i,n,s;switch(t){case"filtered":(i=this.onFiltered)===null||i===void 0||i.call(this),this._filters.forEach(o=>{var a;(a=o.onFiltered)===null||a===void 0||a.call(o)});break;case"dataAdded":(n=this.onDataAdded)===null||n===void 0||n.call(this),this._filters.forEach(o=>{var a;(a=o.onDataAdded)===null||a===void 0||a.call(o)});break;case"dataRemoved":(s=this.onDataRemoved)===null||s===void 0||s.call(this),this._filters.forEach(o=>{var a;(a=o.onDataRemoved)===null||a===void 0||a.call(o)})}})}addRecords(e){const{_crossfilter:t}=this;this._records=e,t.remove(),t.add(e)}getFilteredRecords(e){const{_crossfilter:t}=this;return(e==null?void 0:e.getFilteredRecords())||t.allFiltered()}addFilter(e=!0){const t=new $9(this._crossfilter,()=>{this._filters.delete(t)},e?this._syncUpFunction:void 0);return this._filters.add(t),t}clearFilters(){this._filters.forEach(e=>{e.clear()})}isAnyFiltersActive(e){for(const t of this._filters.values())if(t!==e&&t.isActive())return!0;return!1}getAllRecords(){return this._records}}class eG{constructor(e,t){var i;this._data={nodes:[],links:[]},this._previousData={nodes:[],links:[]},this._cosmographConfig={},this._cosmosConfig={},this._nodesForTopLabels=new Set,this._nodesForForcedLabels=new Set,this._trackedNodeToLabel=new Map,this._isLabelsDestroyed=!1,this._svgParser=new DOMParser,this._nodesCrossfilter=new H2(this._applyLinksFilter.bind(this)),this._linksCrossfilter=new H2(this._applyNodesFilter.bind(this)),this._nodesFilter=this._nodesCrossfilter.addFilter(!1),this._linksFilter=this._linksCrossfilter.addFilter(!1),this._selectedNodesFilter=this._nodesCrossfilter.addFilter(),this._isDataDifferent=()=>{const s=JSON.stringify(this._data.nodes),o=JSON.stringify(this._previousData.nodes),a=JSON.stringify(this._data.links),l=JSON.stringify(this._previousData.links);return s!==o||a!==l},this._onClick=(...s)=>{var o,a;(a=(o=this._cosmographConfig).onClick)===null||a===void 0||a.call(o,...s)},this._onLabelClick=(s,o)=>{var a,l,c;const d=(a=this._cosmos)===null||a===void 0?void 0:a.graph.getNodeById(o.id);d&&((c=(l=this._cosmographConfig).onLabelClick)===null||c===void 0||c.call(l,d,s))},this._onHoveredNodeClick=s=>{var o,a;this._hoveredNode&&((a=(o=this._cosmographConfig).onLabelClick)===null||a===void 0||a.call(o,this._hoveredNode,s))},this._onNodeMouseOver=(...s)=>{var o,a;(a=(o=this._cosmographConfig).onNodeMouseOver)===null||a===void 0||a.call(o,...s);const[l,,c]=s;this._hoveredNode=l,this._renderLabelForHovered(l,c)},this._onNodeMouseOut=(...s)=>{var o,a;(a=(o=this._cosmographConfig).onNodeMouseOut)===null||a===void 0||a.call(o,...s),this._renderLabelForHovered()},this._onMouseMove=(...s)=>{var o,a;(a=(o=this._cosmographConfig).onMouseMove)===null||a===void 0||a.call(o,...s);const[l,,c]=s;this._renderLabelForHovered(l,c)},this._onZoomStart=(...s)=>{var o,a;(a=(o=this._cosmographConfig).onZoomStart)===null||a===void 0||a.call(o,...s)},this._onZoom=(...s)=>{var o,a;(a=(o=this._cosmographConfig).onZoom)===null||a===void 0||a.call(o,...s),this._renderLabelForHovered(),this._renderLabels()},this._onZoomEnd=(...s)=>{var o,a;(a=(o=this._cosmographConfig).onZoomEnd)===null||a===void 0||a.call(o,...s)},this._onStart=(...s)=>{var o,a;(a=(o=this._cosmographConfig).onSimulationStart)===null||a===void 0||a.call(o,...s)},this._onTick=(...s)=>{var o,a;(a=(o=this._cosmographConfig).onSimulationTick)===null||a===void 0||a.call(o,...s),this._renderLabels()},this._onEnd=(...s)=>{var o,a;(a=(o=this._cosmographConfig).onSimulationEnd)===null||a===void 0||a.call(o,...s)},this._onPause=(...s)=>{var o,a;(a=(o=this._cosmographConfig).onSimulationPause)===null||a===void 0||a.call(o,...s)},this._onRestart=(...s)=>{var o,a;(a=(o=this._cosmographConfig).onSimulationRestart)===null||a===void 0||a.call(o,...s)},this._containerNode=e,this._containerNode.classList.add(Lc.cosmograph),this._cosmographConfig=D0(j2,t!=null?t:{}),this._cosmosConfig=this._createCosmosConfig(t),this._canvasElement=document.createElement("canvas"),this._labelsDivElement=document.createElement("div"),this._watermarkDivElement=document.createElement("div"),this._watermarkDivElement.classList.add(Lc.watermark),this._watermarkDivElement.onclick=()=>{var s;return(s=window.open("https://cosmograph.app/","_blank"))===null||s===void 0?void 0:s.focus()},e.appendChild(this._canvasElement),e.appendChild(this._labelsDivElement),e.appendChild(this._watermarkDivElement),this._cssLabelsRenderer=new yz(this._labelsDivElement,{dispatchWheelEventElement:this._canvasElement,pointerEvents:"all",onLabelClick:this._onLabelClick.bind(this)}),this._hoveredCssLabel=new uk(this._labelsDivElement),this._hoveredCssLabel.setPointerEvents("all"),this._hoveredCssLabel.element.addEventListener("click",this._onHoveredNodeClick.bind(this)),this._linksFilter.setAccessor(s=>[s.source,s.target]),this._nodesFilter.setAccessor(s=>s.id),this._selectedNodesFilter.setAccessor(s=>s.id),this._nodesCrossfilter.onFiltered=()=>{var s,o,a,l;let c;this._nodesCrossfilter.isAnyFiltersActive()?(c=this._nodesCrossfilter.getFilteredRecords(),(s=this._cosmos)===null||s===void 0||s.selectNodesByIds(c.map(d=>d.id))):(o=this._cosmos)===null||o===void 0||o.unselectNodes(),this._updateSelectedNodesSet(c),(l=(a=this._cosmographConfig).onNodesFiltered)===null||l===void 0||l.call(a,c)},this._linksCrossfilter.onFiltered=()=>{var s,o;let a;this._linksCrossfilter.isAnyFiltersActive()&&(a=this._linksCrossfilter.getFilteredRecords()),(o=(s=this._cosmographConfig).onLinksFiltered)===null||o===void 0||o.call(s,a)};const n=this._svgParser.parseFromString(RB,"image/svg+xml").firstChild;(i=this._watermarkDivElement)===null||i===void 0||i.appendChild(n)}get data(){return this._data}get progress(){var e;return(e=this._cosmos)===null||e===void 0?void 0:e.progress}get isSimulationRunning(){var e;return(e=this._cosmos)===null||e===void 0?void 0:e.isSimulationRunning}get maxPointSize(){var e;return(e=this._cosmos)===null||e===void 0?void 0:e.maxPointSize}setData(e,t,i=!0){var n,s,o,a;const{_cosmographConfig:l}=this;this._data={nodes:e,links:t};const c=l.disableSimulation===null?!t.length:l.disableSimulation;this._cosmos||(this._disableSimulation=c,this._cosmosConfig.disableSimulation=this._disableSimulation,this._cosmos=new pz(this._canvasElement,this._cosmosConfig),this.cosmos=this._cosmos),this._disableSimulation!==c&&console.warn(`The \`disableSimulation\` was initialized to \`${this._disableSimulation}\` during initialization and will not be modified.`),this._cosmos.setData(e,t,i),this._nodesCrossfilter.addRecords(e),this._linksCrossfilter.addRecords(t),this._updateLabels(),(s=(n=this._cosmographConfig).onSetData)===null||s===void 0||s.call(n,e,t),this._isDataDifferent()&&(["cosmograph.app"].includes(window.location.hostname)||B9({browser:navigator.userAgent,hostname:window.location.hostname,mode:null,is_library_metric:!0,links_count:t.length,links_have_time:null,links_raw_columns:t.length&&(o=Object.keys(t==null?void 0:t[0]).length)!==null&&o!==void 0?o:0,links_raw_lines:null,nodes_count:e.length,nodes_have_time:null,nodes_raw_columns:e.length&&(a=Object.keys(e==null?void 0:e[0]).length)!==null&&a!==void 0?a:0,nodes_raw_lines:null})),this._previousData={nodes:e,links:t}}setConfig(e){var t,i;if(this._cosmographConfig=D0(j2,e!=null?e:{}),this._cosmosConfig=this._createCosmosConfig(e),(t=this._cosmos)===null||t===void 0||t.setConfig(this._cosmosConfig),e==null?void 0:e.backgroundColor){const n=(i=Ps(e==null?void 0:e.backgroundColor))===null||i===void 0?void 0:i.formatHex();if(n){const s=this._checkBrightness(n),o=document.querySelector(":root");s>.65?o==null||o.style.setProperty("--cosmograph-watermark-color","#000000"):o==null||o.style.setProperty("--cosmograph-watermark-color","#ffffff")}}this._updateLabels()}addNodesFilter(){return this._nodesCrossfilter.addFilter()}addLinksFilter(){return this._linksCrossfilter.addFilter()}selectNodesInRange(e){var t;if(!this._cosmos)return;this._cosmos.selectNodesInRange(e);const i=new Set(((t=this.getSelectedNodes())!==null&&t!==void 0?t:[]).map(n=>n.id));this._selectedNodesFilter.applyFilter(n=>i.has(n))}selectNodes(e){if(!this._cosmos)return;const t=new Set(e.map(i=>i.id));this._selectedNodesFilter.applyFilter(i=>t.has(i))}selectNode(e,t=!1){if(!this._cosmos)return;const i=new Set([e,...t&&this._cosmos.getAdjacentNodes(e.id)||[]].map(n=>n.id));this._selectedNodesFilter.applyFilter(n=>i.has(n))}unselectNodes(){this._cosmos&&this._selectedNodesFilter.clear()}getSelectedNodes(){if(this._cosmos)return this._cosmos.getSelectedNodes()}zoomToNode(e){this._cosmos&&this._cosmos.zoomToNodeById(e.id)}setZoomLevel(e,t=0){this._cosmos&&this._cosmos.setZoomLevel(e,t)}getZoomLevel(){if(this._cosmos)return this._cosmos.getZoomLevel()}getNodePositions(){if(this._cosmos)return this._cosmos.getNodePositions()}getNodePositionsMap(){if(this._cosmos)return this._cosmos.getNodePositionsMap()}getNodePositionsArray(){if(this._cosmos)return this._cosmos.getNodePositionsArray()}fitView(e=250){this._cosmos&&this._cosmos.fitView(e)}fitViewByNodeIds(e,t=250){this._cosmos&&this._cosmos.fitViewByNodeIds(e,t)}focusNode(e){this._cosmos&&this._cosmos.setFocusedNodeById(e==null?void 0:e.id)}getAdjacentNodes(e){if(this._cosmos)return this._cosmos.getAdjacentNodes(e)}spaceToScreenPosition(e){if(this._cosmos)return this._cosmos.spaceToScreenPosition(e)}spaceToScreenRadius(e){if(this._cosmos)return this._cosmos.spaceToScreenRadius(e)}getNodeRadiusByIndex(e){if(this._cosmos)return this._cosmos.getNodeRadiusByIndex(e)}getNodeRadiusById(e){if(this._cosmos)return this._cosmos.getNodeRadiusById(e)}getSampledNodePositionsMap(){if(this._cosmos)return this._cosmos.getSampledNodePositionsMap()}start(e=1){this._cosmos&&this._cosmos.start(e)}pause(){this._cosmos&&this._cosmos.pause()}restart(){this._cosmos&&this._cosmos.restart()}step(){this._cosmos&&this._cosmos.step()}remove(){var e;(e=this._cosmos)===null||e===void 0||e.destroy(),this._isLabelsDestroyed||(this._containerNode.innerHTML="",this._isLabelsDestroyed=!0,this._hoveredCssLabel.element.removeEventListener("click",this._onHoveredNodeClick.bind(this)),this._hoveredCssLabel.destroy(),this._cssLabelsRenderer.destroy())}create(){this._cosmos&&this._cosmos.create()}getNodeDegrees(){if(this._cosmos)return this._cosmos.graph.degree}_createCosmosConfig(e){const t=fn(Ui({},e),{simulation:fn(Ui({},Object.keys(e!=null?e:{}).filter(i=>i.indexOf("simulation")!==-1).reduce((i,n)=>{const s=n.replace("simulation","");return i[s.charAt(0).toLowerCase()+s.slice(1)]=e==null?void 0:e[n],i},{})),{onStart:this._onStart.bind(this),onTick:this._onTick.bind(this),onEnd:this._onEnd.bind(this),onPause:this._onPause.bind(this),onRestart:this._onRestart.bind(this)}),events:{onClick:this._onClick.bind(this),onNodeMouseOver:this._onNodeMouseOver.bind(this),onNodeMouseOut:this._onNodeMouseOut.bind(this),onMouseMove:this._onMouseMove.bind(this),onZoomStart:this._onZoomStart.bind(this),onZoom:this._onZoom.bind(this),onZoomEnd:this._onZoomEnd.bind(this)}});return delete t.disableSimulation,t}_updateLabels(){if(this._isLabelsDestroyed||!this._cosmos)return;const{_cosmos:e,data:{nodes:t},_cosmographConfig:{showTopLabels:i,showTopLabelsLimit:n,showLabelsFor:s,showTopLabelsValueKey:o,nodeLabelAccessor:a}}=this;if(this._nodesForTopLabels.clear(),i&&n){let l;l=o?[...t].sort((c,d)=>{const u=c[o],h=d[o];return typeof u=="number"&&typeof h=="number"?h-u:0}):Object.entries(e.graph.degree).sort((c,d)=>d[1]-c[1]).slice(0,n).map(c=>e.graph.getNodeByIndex(+c[0]));for(let c=0;c=t.length);c++){const d=l[c];d&&this._nodesForTopLabels.add(d)}}this._nodesForForcedLabels.clear(),s==null||s.forEach(this._nodesForForcedLabels.add,this._nodesForForcedLabels),this._trackedNodeToLabel.clear(),e.trackNodePositionsByIds([...i?this._nodesForTopLabels:[],...this._nodesForForcedLabels].map(l=>{var c;return this._trackedNodeToLabel.set(l,(c=a==null?void 0:a(l))!==null&&c!==void 0?c:l.id),l.id})),this._renderLabels()}_updateSelectedNodesSet(e){this._isLabelsDestroyed||(e?(this._selectedNodesSet=new Set,e==null||e.forEach(this._selectedNodesSet.add,this._selectedNodesSet)):this._selectedNodesSet=void 0,this._renderLabels())}_renderLabels(){if(this._isLabelsDestroyed||!this._cosmos)return;const{_cosmos:e,_selectedNodesSet:t,_cosmographConfig:{showDynamicLabels:i,nodeLabelAccessor:n,nodeLabelColor:s,nodeLabelClassName:o}}=this;let a=[];const l=e.getTrackedNodePositionsMap(),c=new Map;if(i){const d=this.getSampledNodePositionsMap();d==null||d.forEach((u,h)=>{var f;const m=e.graph.getNodeById(h);m&&c.set(m,[(f=n==null?void 0:n(m))!==null&&f!==void 0?f:m.id,u,Lc.cosmographShowDynamicLabels,.7])})}this._nodesForTopLabels.forEach(d=>{c.set(d,[this._trackedNodeToLabel.get(d),l.get(d.id),Lc.cosmographShowTopLabels,.9])}),this._nodesForForcedLabels.forEach(d=>{c.set(d,[this._trackedNodeToLabel.get(d),l.get(d.id),Lc.cosmographShowLabelsFor,1])}),a=[...c.entries()].map(([d,[u,h,f,m]])=>{var p,g,v;const b=this.spaceToScreenPosition([(p=h==null?void 0:h[0])!==null&&p!==void 0?p:0,(g=h==null?void 0:h[1])!==null&&g!==void 0?g:0]),S=this.spaceToScreenRadius(e.config.nodeSizeScale*this.getNodeRadiusById(d.id)),_=!!t,x=t==null?void 0:t.has(d);return{id:d.id,text:u!=null?u:"",x:b[0],y:b[1]-(S+2),weight:_&&!x?.1:m,shouldBeShown:this._nodesForForcedLabels.has(d),style:_&&!x?"opacity: 0.1;":"",color:s&&(typeof s=="string"?s:s==null?void 0:s(d)),className:(v=typeof o=="string"?o:o==null?void 0:o(d))!==null&&v!==void 0?v:f}}),this._cssLabelsRenderer.setLabels(a),this._cssLabelsRenderer.draw(!0)}_renderLabelForHovered(e,t){var i,n;if(!this._cosmos)return;const{_cosmographConfig:{showHoveredNodeLabel:s,nodeLabelAccessor:o,hoveredNodeLabelClassName:a,hoveredNodeLabelColor:l}}=this;if(!this._isLabelsDestroyed){if(s&&e&&t){const c=this.spaceToScreenPosition(t),d=this.spaceToScreenRadius(this.getNodeRadiusById(e.id));this._hoveredCssLabel.setText((i=o==null?void 0:o(e))!==null&&i!==void 0?i:e.id),this._hoveredCssLabel.setVisibility(!0),this._hoveredCssLabel.setPosition(c[0],c[1]-(d+2)),this._hoveredCssLabel.setClassName(typeof a=="string"?a:(n=a==null?void 0:a(e))!==null&&n!==void 0?n:"");const u=l&&(typeof l=="string"?l:l==null?void 0:l(e));u&&this._hoveredCssLabel.setColor(u)}else this._hoveredCssLabel.setVisibility(!1);this._hoveredCssLabel.draw()}}_applyLinksFilter(){if(this._nodesCrossfilter.isAnyFiltersActive(this._nodesFilter)){const e=this._nodesCrossfilter.getFilteredRecords(this._nodesFilter),t=new Set(e.map(i=>i.id));this._linksFilter.applyFilter(i=>{const n=i==null?void 0:i[0],s=i==null?void 0:i[1];return t.has(n)&&t.has(s)})}else this._linksFilter.clear()}_applyNodesFilter(){if(this._linksCrossfilter.isAnyFiltersActive(this._linksFilter)){const e=this._linksCrossfilter.getFilteredRecords(this._linksFilter),t=new Set(e.map(i=>[i.source,i.target]).flat());this._nodesFilter.applyFilter(i=>t.has(i))}else this._nodesFilter.clear()}_checkBrightness(e){const t=(i=>{const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(i);return n?{r:parseInt((n[1]||0).toString(),16),g:parseInt((n[2]||0).toString(),16),b:parseInt((n[3]||0).toString(),16)}:{r:0,g:0,b:0}})(e);return(.2126*t.r+.7152*t.g+.0722*t.b)/255}}var df;(function(r){r.Nodes="nodes",r.Links="links"})(df||(df={}));df.Links;df.Nodes;class Yf{constructor(e){if(new.target===Yf)throw new TypeError("Cannot construct SimulationWrapper instances directly");this.graphData=e,this.started=!1}start(e,t){throw new Error("Method 'start(containerElement, nodePositions)' must be implemented.")}pause(){throw new Error("Method 'pause()' must be implemented.")}resume(){throw new Error("Method 'resume()' must be implemented.")}getNodePositions(){throw new Error("Method 'getNodePositions()' must be implemented.")}forEachNode(){throw new Error("Method 'forEachNode()' must be implemented.")}forEachLink(){throw new Error("Method 'forEachLink()' must be implemented.")}updateLayoutSetting(e){throw new Error("Method 'updateLayoutSetting()' must be implemented.")}destroy(){throw new Error("Method 'destroy()' must be implemented.")}}var An;class tG extends Yf{constructor(t){super(t);vu(this,An);this.config={nodeColor:o=>o.color,nodeSize:o=>Math.pow(o.size,1/2),nodeSizeScale:2,linkWidth:2,fitViewOnInit:!0,linkArrows:!1,linkColor:[144,144,144,1],backgroundColor:[248,250,252,1],showTopLabels:!1,showDynamicLabels:!1,showHoveredNodeLabel:!1,renderHoveredNodeRing:!1,spaceSize:128},this.firstLoad=!0;const i=this.graphData.links[0],n=Object.keys(i)[0],s=Object.keys(i)[1];_u(this,An,new Map),this.links=this.graphData.links.map(o=>{const a=String(o[n]),l=String(o[s]);mn(this,An).get(a)==null&&mn(this,An).set(a,[]),mn(this,An).get(l)==null&&mn(this,An).set(l,[]);const c=`${a}_${l}`;return mn(this,An).get(a).push({id:c,fromId:a,toId:l}),mn(this,An).get(l).push({id:c,fromId:a,toId:l}),{id:c,source:a,target:l}})}start(t,i){const n=this.graphData.nodes[0],s=Object.keys(n)[0],o=Object.keys(i).length<=0;this.nodes=this.graphData.nodes.map(a=>{const l=String(a[s]),c={id:l,size:a.size||5,color:a.color||[0,0,0,1],component:a.component||null,links:mn(this,An).get(l)};if(o)c.x=a.initialX,c.y=a.initialY;else{const d=i[l];c.x=d.x,c.y=-d.y}return c}),this.graph=new eG(t,this.config),this.graph.setData(this.nodes,this.links),this.started=!0,this.graph.pause()}pause(){this.graph.pause()}resume(){this.firstLoad?(this.graph.start(),this.firstLoad=!1):this.graph.restart()}getNodePositions(){const t=this.graph.getNodePositions(),i={};Object.entries(t).forEach(([a,l])=>{const c=this.graph.spaceToScreenPosition([l.x,l.y]);i[a]={x:c[0],y:c[1]}});const n=this.nodes.length,s=Object.values(i).reduce((a,l)=>a+l.x,0)/n,o=Object.values(i).reduce((a,l)=>a+l.y,0)/n;return Object.entries(i).forEach(([a,l])=>{i[a]={x:l.x-s,y:l.y-o}}),i}forEachNode(t){this.nodes.forEach(t)}forEachLink(t){this.links.forEach(t)}updateLayoutSetting(t){return i=>{this.graph.setConfig({[t]:+i.target.value}),this.graph.start()}}destroy(){this.graph.remove()}}An=new WeakMap;const iG=r=>{const e=r.nodes[0],t=Object.keys(e)[0];return i=>({id:i[t],data:i})},rG=r=>{const e=r.links[0],t=Object.keys(e)[0],i=Object.keys(e)[1];return n=>({fromId:n[t],toId:n[i],data:n})};class Jk extends Yf{constructor(e){super(e),this.graph=Mc.Graph.serializer().loadFromJSON(e,iG(e),rG(e)),this.graphics=Mc.Graph.View.webglGraphics(),this.graphics.node(function(t){return Mc.Graph.View.webglSquare(t.data.size||10,t.data.color||"#000000")})}start(e,t){Object.keys(t).length>0?this.graph.forEachNode(i=>{const n=t[i.id];this.layout.setNodePosition(i.id,n.x,n.y)}):this.graph.forEachNode(i=>{i.data.initialX&&this.layout.setNodePosition(i.id,i.data.initialX,i.data.initialY)}),this.renderer=Mc.Graph.View.renderer(this.graph,{layout:this.layout,container:e,graphics:this.graphics,renderLinks:!0,prerender:!0}),this.renderer.run(),this.started=!0,this.renderer.pause()}pause(){this.renderer&&this.renderer.pause()}resume(){this.renderer.resume()}getNodePositions(){let e={};return this.graph.forEachNode(t=>{let i=this.layout.getNodePosition(t.id);e[t.id]={x:i.x,y:i.y}}),e}forEachNode(e){this.graph.forEachNode(e)}forEachLink(e){this.graph.forEachLink(e)}updateLayoutSetting(e){throw new Error("Method 'updateLayoutSetting(settingId)' must be implemented.")}destroy(){}}var xl;class nG extends Jk{constructor(t){super(t);vu(this,xl);_u(this,xl,kf.find(n=>n.value==="viva"));let i={};mn(this,xl).settings.forEach(n=>{i[n.id]=n.value}),this.layout=mn(this,xl).spec(this.graph,i)}updateLayoutSetting(t){return i=>{this.layout.simulator[t](i.target.value)}}}xl=new WeakMap;var wl;class sG extends Jk{constructor(t){super(t);vu(this,wl);_u(this,wl,kf.find(n=>n.value==="d3"));let i={};mn(this,wl).settings.forEach(n=>{i[n.id]=n.value}),this.layout=mn(this,wl).spec(this.graph,i)}updateLayoutSetting(t){const i={alphaDecay:this.layout.simulator.alphaDecay,velocityDecay:this.layout.simulator.velocityDecay,chargeStrength:this.layout.simulator.force("charge").strength,theta:this.layout.simulator.force("charge").theta,distanceMin:this.layout.simulator.force("charge").distanceMin,distanceMax:this.layout.simulator.force("charge").distanceMax,linkDistance:this.layout.simulator.force("link").distance,linkStrength:this.layout.simulator.force("link").strength,linkIterations:this.layout.simulator.force("link").iterations,centerX:this.layout.simulator.force("center").x,centerY:this.layout.simulator.force("center").y,centerStrength:this.layout.simulator.force("center").strength,collisionRadius:this.layout.simulator.force("collide").radius,collisionStrength:this.layout.simulator.force("collide").strength,collisionIterations:this.layout.simulator.force("collide").iterations,x:this.layout.simulator.force("x").x,y:this.layout.simulator.force("y").y,xStrength:this.layout.simulator.force("x").strength,yStrength:this.layout.simulator.force("y").strength};return n=>{i[t](n.target.value),this.layout.simulator.alpha(1).restart()}}}wl=new WeakMap;function X2(r,e,t){const i=r.slice();return i[22]=e[t],i}function W2(r){let e,t,i,n,s,o,a,l,c=r[1],d,u,h;a=new HP({props:{$$slots:{default:[oG]},$$scope:{ctx:r}}});let f=Z2(r);return{c(){e=ai("aside"),t=ai("div"),i=ai("ul"),i.innerHTML='
  • Settings

  • ',n=Tr(),s=ai("ul"),o=ai("li"),wi(a.$$.fragment),l=Tr(),f.c(),ae(i,"class","space-y-2 font-medium text-lg"),ae(o,"class","mb-4"),ae(s,"class","pt-4 mt-4 space-y-2 font-medium border-t border-gray-200 dark:border-gray-700"),ae(t,"class","h-full px-3 py-4 overflow-y-scroll bg-gray-50 dark:bg-gray-800"),ae(e,"id","expanded-sidebar"),ae(e,"class","fixed top-0 left-0 z-40 w-56 h-screen"),ae(e,"aria-label","Sidebar")},m(m,p){Me(m,e,p),Ze(e,t),Ze(t,i),Ze(t,n),Ze(t,s),Ze(s,o),pi(a,o,null),Ze(t,l),f.m(t,null),h=!0},p(m,p){const g={};p&33554434&&(g.$$scope={dirty:p,ctx:m}),a.$set(g),p&2&&Oi(c,c=m[1])?(Dr(),st(f,1,1,Pt),Mr(),f=Z2(m),f.c(),$e(f,1),f.m(t,null)):f.p(m,p)},i(m){h||($e(a.$$.fragment,m),$e(f),m&&is(()=>{h&&(u&&u.end(1),d=lS(e,Uh,{x:-200,duration:300}),d.start())}),h=!0)},o(m){st(a.$$.fragment,m),st(f),d&&d.invalidate(),m&&(u=cS(e,Uh,{x:-200,duration:300})),h=!1},d(m){m&&Le(e),gi(a),f.d(m),m&&u&&u.end()}}}function oG(r){let e,t,i,n;function s(a){r[15](a)}let o={class:"mt-2",items:kf,placeholder:""};return r[1]!==void 0&&(o.value=r[1]),t=new QP({props:o}),en.push(()=>fd(t,"value",s)),{c(){e=Bt(`Layout algorithm + `),wi(t.$$.fragment)},m(a,l){Me(a,e,l),pi(t,a,l),n=!0},p(a,l){const c={};!i&&l&2&&(i=!0,c.value=a[1],hd(()=>i=!1)),t.$set(c)},i(a){n||($e(t.$$.fragment,a),n=!0)},o(a){st(t.$$.fragment,a),n=!1},d(a){a&&Le(e),gi(t,a)}}}function Y2(r){let e,t,i=r[22].name+"",n,s,o,a,l,c,d,u,h,f,m;return{c(){e=ai("li"),t=ai("label"),n=Bt(i),s=Tr(),o=ai("input"),h=Tr(),ae(t,"for","steps-range"),ae(t,"class","block text-sm font-medium text-gray-900 dark:text-gray-300"),ae(o,"type","range"),ae(o,"id",a=r[22].id),ae(o,"min",l=r[22].min),ae(o,"max",c=r[22].max),o.value=d=r[22].value,ae(o,"step",u=r[22].step),ae(o,"class","w-full h-1 mb-4 range-sm bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700")},m(p,g){Me(p,e,g),Ze(e,t),Ze(t,n),Ze(e,s),Ze(e,o),Ze(e,h),f||(m=ze(o,"input",function(){Zr(r[0].updateLayoutSetting(r[22].id))&&r[0].updateLayoutSetting(r[22].id).apply(this,arguments)}),f=!0)},p(p,g){r=p,g&4&&i!==(i=r[22].name+"")&&Xt(n,i),g&4&&a!==(a=r[22].id)&&ae(o,"id",a),g&4&&l!==(l=r[22].min)&&ae(o,"min",l),g&4&&c!==(c=r[22].max)&&ae(o,"max",c),g&4&&d!==(d=r[22].value)&&(o.value=d),g&4&&u!==(u=r[22].step)&&ae(o,"step",u)},d(p){p&&Le(e),f=!1,m()}}}function q2(r){let e,t=r[22].shown&&Y2(r);return{c(){t&&t.c(),e=Ht()},m(i,n){t&&t.m(i,n),Me(i,e,n)},p(i,n){i[22].shown?t?t.p(i,n):(t=Y2(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){i&&Le(e),t&&t.d(i)}}}function Z2(r){let e,t,i,n,s=Eh(r[2].settings),o=[];for(let a=0;a{n&&(i&&i.end(1),t=lS(e,Uh,{delay:250,duration:200}),t.start())}),n=!0)},o(a){t&&t.invalidate(),a&&(i=cS(e,Uh,{delay:0,duration:200})),n=!1},d(a){a&&Le(e),rS(o,a),a&&i&&i.end()}}}function aG(r){let e;return{c(){e=ai("p"),e.textContent="Loading graph...."},m(t,i){Me(t,e,i)},p:Pt,i:Pt,o:Pt,d(t){t&&Le(e)}}}function lG(r){let e,t,i;function n(o){r[17](o)}let s={simulation:r[0]};return r[5]!==void 0&&(s.nodePositions=r[5]),e=new PO({props:s}),en.push(()=>fd(e,"nodePositions",n)),r[18](e),{c(){wi(e.$$.fragment)},m(o,a){pi(e,o,a),i=!0},p(o,a){const l={};a&1&&(l.simulation=o[0]),!t&&a&32&&(t=!0,l.nodePositions=o[5],hd(()=>t=!1)),e.$set(l)},i(o){i||($e(e.$$.fragment,o),i=!0)},o(o){st(e.$$.fragment,o),i=!1},d(o){r[18](null),gi(e,o)}}}function cG(r){let e=r[1],t,i,n=K2(r);return{c(){n.c(),t=Ht()},m(s,o){n.m(s,o),Me(s,t,o),i=!0},p(s,o){o&2&&Oi(e,e=s[1])?(Dr(),st(n,1,1,Pt),Mr(),n=K2(s),n.c(),$e(n,1),n.m(t.parentNode,t)):n.p(s,o)},i(s){i||($e(n),i=!0)},o(s){st(n),i=!1},d(s){s&&Le(t),n.d(s)}}}function K2(r){let e,t,i;function n(o){r[16](o)}let s={simulation:r[0]};return r[5]!==void 0&&(s.nodePositions=r[5]),e=new qA({props:s}),en.push(()=>fd(e,"nodePositions",n)),{c(){wi(e.$$.fragment)},m(o,a){pi(e,o,a),i=!0},p(o,a){const l={};a&1&&(l.simulation=o[0]),!t&&a&32&&(t=!0,l.nodePositions=o[5],hd(()=>t=!1)),e.$set(l)},i(o){i||($e(e.$$.fragment,o),i=!0)},o(o){st(e.$$.fragment,o),i=!1},d(o){gi(e,o)}}}function J2(r){let e,t,i,n;return e=new Il({props:{name:r[8]?"Pause":"Resume",$$slots:{default:[hG]},$$scope:{ctx:r}}}),e.$on("click",r[10]),i=new Il({props:{name:"Layout settings",$$slots:{default:[fG]},$$scope:{ctx:r}}}),i.$on("click",r[12]),{c(){wi(e.$$.fragment),t=Tr(),wi(i.$$.fragment)},m(s,o){pi(e,s,o),Me(s,t,o),pi(i,s,o),n=!0},p(s,o){const a={};o&256&&(a.name=s[8]?"Pause":"Resume"),o&33554688&&(a.$$scope={dirty:o,ctx:s}),e.$set(a);const l={};o&33554432&&(l.$$scope={dirty:o,ctx:s}),i.$set(l)},i(s){n||($e(e.$$.fragment,s),$e(i.$$.fragment,s),n=!0)},o(s){st(e.$$.fragment,s),st(i.$$.fragment,s),n=!1},d(s){s&&Le(t),gi(e,s),gi(i,s)}}}function dG(r){let e,t;return e=new $D({props:{slot:"icon",class:"w-8 h-8"}}),{c(){wi(e.$$.fragment)},m(i,n){pi(e,i,n),t=!0},i(i){t||($e(e.$$.fragment,i),t=!0)},o(i){st(e.$$.fragment,i),t=!1},d(i){gi(e,i)}}}function uG(r){let e,t;return e=new qD({props:{slot:"icon",class:"w-8 h-8"}}),{c(){wi(e.$$.fragment)},m(i,n){pi(e,i,n),t=!0},i(i){t||($e(e.$$.fragment,i),t=!0)},o(i){st(e.$$.fragment,i),t=!1},d(i){gi(e,i)}}}function hG(r){let e,t,i,n;const s=[uG,dG],o=[];function a(l,c){return l[8]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),i=Ht()},m(l,c){o[e].m(l,c),Me(l,i,c),n=!0},p(l,c){let d=e;e=a(l),e!==d&&(Dr(),st(o[d],1,1,()=>{o[d]=null}),Mr(),t=o[e],t||(t=o[e]=s[e](l),t.c()),$e(t,1),t.m(i.parentNode,i))},i(l){n||($e(t),n=!0)},o(l){st(t),n=!1},d(l){l&&Le(i),o[e].d(l)}}}function fG(r){let e,t;return e=new AD({props:{class:"w-6 h-6"}}),{c(){wi(e.$$.fragment)},m(i,n){pi(e,i,n),t=!0},p:Pt,i(i){t||($e(e.$$.fragment,i),t=!0)},o(i){st(e.$$.fragment,i),t=!1},d(i){gi(e,i)}}}function mG(r){let e,t;return e=new Il({props:{name:"Edit",$$slots:{default:[gG]},$$scope:{ctx:r}}}),e.$on("click",r[11]),{c(){wi(e.$$.fragment)},m(i,n){pi(e,i,n),t=!0},p(i,n){const s={};n&33554432&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||($e(e.$$.fragment,i),t=!0)},o(i){st(e.$$.fragment,i),t=!1},d(i){gi(e,i)}}}function pG(r){let e,t,i,n;return e=new Il({props:{name:"Simulation",$$slots:{default:[vG]},$$scope:{ctx:r}}}),e.$on("click",r[11]),i=new Il({props:{name:"Pack components",$$slots:{default:[_G]},$$scope:{ctx:r}}}),i.$on("click",function(){Zr(r[4].packComponents)&&r[4].packComponents.apply(this,arguments)}),{c(){wi(e.$$.fragment),t=Tr(),wi(i.$$.fragment)},m(s,o){pi(e,s,o),Me(s,t,o),pi(i,s,o),n=!0},p(s,o){r=s;const a={};o&33554432&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const l={};o&33554432&&(l.$$scope={dirty:o,ctx:r}),i.$set(l)},i(s){n||($e(e.$$.fragment,s),$e(i.$$.fragment,s),n=!0)},o(s){st(e.$$.fragment,s),st(i.$$.fragment,s),n=!1},d(s){s&&Le(t),gi(e,s),gi(i,s)}}}function gG(r){let e,t;return e=new zD({props:{class:"w-6 h-6"}}),{c(){wi(e.$$.fragment)},m(i,n){pi(e,i,n),t=!0},p:Pt,i(i){t||($e(e.$$.fragment,i),t=!0)},o(i){st(e.$$.fragment,i),t=!1},d(i){gi(e,i)}}}function vG(r){let e,t;return e=new n6({props:{class:"w-6 h-6"}}),{c(){wi(e.$$.fragment)},m(i,n){pi(e,i,n),t=!0},p:Pt,i(i){t||($e(e.$$.fragment,i),t=!0)},o(i){st(e.$$.fragment,i),t=!1},d(i){gi(e,i)}}}function _G(r){let e,t;return e=new UD({props:{class:"w-6 h-6"}}),{c(){wi(e.$$.fragment)},m(i,n){pi(e,i,n),t=!0},p:Pt,i(i){t||($e(e.$$.fragment,i),t=!0)},o(i){st(e.$$.fragment,i),t=!1},d(i){gi(e,i)}}}function yG(r){let e,t;return e=new c6({props:{class:"w-6 h-6"}}),{c(){wi(e.$$.fragment)},m(i,n){pi(e,i,n),t=!0},p:Pt,i(i){t||($e(e.$$.fragment,i),t=!0)},o(i){st(e.$$.fragment,i),t=!1},d(i){gi(e,i)}}}function bG(r){let e,t,i,n,s,o,a=r[3]===r[9].SIMULATING&&J2(r);const l=[pG,mG],c=[];function d(u,h){return u[7]?0:1}return t=d(r),i=c[t]=l[t](r),s=new Il({props:{name:"Finish",$$slots:{default:[yG]},$$scope:{ctx:r}}}),s.$on("click",r[13]),{c(){a&&a.c(),e=Tr(),i.c(),n=Tr(),wi(s.$$.fragment)},m(u,h){a&&a.m(u,h),Me(u,e,h),c[t].m(u,h),Me(u,n,h),pi(s,u,h),o=!0},p(u,h){u[3]===u[9].SIMULATING?a?(a.p(u,h),h&8&&$e(a,1)):(a=J2(u),a.c(),$e(a,1),a.m(e.parentNode,e)):a&&(Dr(),st(a,1,1,()=>{a=null}),Mr());let f=t;t=d(u),t===f?c[t].p(u,h):(Dr(),st(c[f],1,1,()=>{c[f]=null}),Mr(),i=c[t],i?i.p(u,h):(i=c[t]=l[t](u),i.c()),$e(i,1),i.m(n.parentNode,n));const m={};h&33554432&&(m.$$scope={dirty:h,ctx:u}),s.$set(m)},i(u){o||($e(a),$e(i),$e(s.$$.fragment,u),o=!0)},o(u){st(a),st(i),st(s.$$.fragment,u),o=!1},d(u){u&&(Le(e),Le(n)),a&&a.d(u),c[t].d(u),gi(s,u)}}}function xG(r){let e,t;return e=new DD({props:{slot:"icon",class:"w-8 h-8"}}),{c(){wi(e.$$.fragment)},m(i,n){pi(e,i,n),t=!0},p:Pt,i(i){t||($e(e.$$.fragment,i),t=!0)},o(i){st(e.$$.fragment,i),t=!1},d(i){gi(e,i)}}}function wG(r){let e,t,i,n,s,o,a,l,c=r[6]&&!r[7]&&W2(r);const d=[cG,lG,aG],u=[];function h(f,m){return f[0]&&!f[7]?0:f[7]?1:2}return n=h(r),s=u[n]=d[n](r),a=new hD({props:{color:"dark",defaultClass:"fixed end-6 top-6",pill:!1,$$slots:{icon:[xG],default:[bG]},$$scope:{ctx:r}}}),{c(){c&&c.c(),e=Tr(),t=ai("main"),i=ai("div"),s.c(),o=Tr(),wi(a.$$.fragment),ae(i,"class","flex flex-grow bg-slate-50"),ae(t,"class","container flex flex-col h-screen")},m(f,m){c&&c.m(f,m),Me(f,e,m),Me(f,t,m),Ze(t,i),u[n].m(i,null),Ze(t,o),pi(a,t,null),l=!0},p(f,[m]){f[6]&&!f[7]?c?(c.p(f,m),m&192&&$e(c,1)):(c=W2(f),c.c(),$e(c,1),c.m(e.parentNode,e)):c&&(Dr(),st(c,1,1,()=>{c=null}),Mr());let p=n;n=h(f),n===p?u[n].p(f,m):(Dr(),st(u[p],1,1,()=>{u[p]=null}),Mr(),s=u[n],s?s.p(f,m):(s=u[n]=d[n](f),s.c()),$e(s,1),s.m(i,null));const g={};m&33554840&&(g.$$scope={dirty:m,ctx:f}),a.$set(g)},i(f){l||($e(c),$e(s),$e(a.$$.fragment,f),l=!0)},o(f){st(c),st(s),st(a.$$.fragment,f),l=!1},d(f){f&&(Le(e),Le(t)),c&&c.d(f),u[n].d(),gi(a)}}}function SG(r,e,t){let i,n,s;Hg(r,$m,E=>t(7,n=E)),Hg(r,ch,E=>t(8,s=E));const o={SIMULATING:"simulating",EDITING:"editing"};let a=o.SIMULATING,l,c,d,u="viva",h={},f={};const m={viva:nG,d3:sG,cosmo:tG};function p(){yu(ch,s=!s,s),s&&t(3,a=o.SIMULATING)}function g(E){return le(this,null,function*(){console.log("Received Shiny data:",E),t(14,c=E)})}function v(){n?(l.discardActiveSelection(),yu(ch,s=!1,s),yu($m,n=!1,n),t(3,a=o.SIMULATING)):(yu($m,n=!0,n),t(3,a=o.EDITING))}let b=!0;function S(){t(6,b=!b)}function _(){const E=[];n&&l.persistNodePositions();const w=d.getNodePositions();Object.entries(w).forEach(([X,H])=>{E.push(H)}),Shiny.setInputValue("coordinates",E)}uf(()=>{jQuery(document).on("shiny:connected",function(){console.log("Shiny connected"),Shiny.addCustomMessageHandler("dataTransferredFromServer",g),Shiny.setInputValue("svelteAppMounted",!0)})});function x(E){u=E,t(1,u)}function I(E){h=E,t(5,h)}function T(E){h=E,t(5,h)}function O(E){en[E?"unshift":"push"](()=>{l=E,t(4,l)})}return r.$$.update=()=>{r.$$.dirty&2&&t(2,i=kf.find(E=>E.value===u)),r.$$.dirty&16386&&c&&t(0,d=new m[u](c)),r.$$.dirty&5&&d&&i.settings.forEach(E=>{f[E.id]=E.value})},[d,u,i,a,l,h,b,n,s,o,p,v,S,_,c,x,I,T,O]}class TG extends cr{constructor(e){super(),lr(this,e,SG,wG,Oi,{})}}new TG({target:document.getElementById("app")});export{Sv as g}; diff --git a/man/easylayout-package.Rd b/man/easylayout-package.Rd index 06e21c2..e5c868d 100644 --- a/man/easylayout-package.Rd +++ b/man/easylayout-package.Rd @@ -23,6 +23,7 @@ itself. Useful links: \itemize{ \item \url{https://dalmolingroup.github.io/easylayout/} + \item Report bugs at \url{https://github.com/dalmolingroup/easylayout/issues} } } diff --git a/srcjs/package.json b/srcjs/package.json index e4749f6..f218ec3 100644 --- a/srcjs/package.json +++ b/srcjs/package.json @@ -20,6 +20,7 @@ "vite": "^5.4.1" }, "dependencies": { + "@cosmograph/cosmograph": "^1.4.0", "d3-force": "^3.0.0", "fabric": "^6.4.2", "svelte-spa-router": "^4.0.1", diff --git a/srcjs/pnpm-lock.yaml b/srcjs/pnpm-lock.yaml index de5585b..109142f 100644 --- a/srcjs/pnpm-lock.yaml +++ b/srcjs/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + '@cosmograph/cosmograph': + specifier: ^1.4.0 + version: 1.4.0(rollup@4.24.0) d3-force: specifier: ^3.0.0 version: 3.0.0 @@ -23,31 +26,31 @@ importers: devDependencies: '@sveltejs/vite-plugin-svelte': specifier: ^3.1.1 - version: 3.1.2(svelte@4.2.19)(vite@5.4.3) + version: 3.1.2(svelte@4.2.19)(vite@5.4.8(@types/node@22.7.4)) '@tailwindcss/typography': specifier: ^0.5.14 - version: 0.5.15(tailwindcss@3.4.11) + version: 0.5.15(tailwindcss@3.4.13) autoprefixer: specifier: ^10.4.20 - version: 10.4.20(postcss@8.4.45) + version: 10.4.20(postcss@8.4.47) flowbite: specifier: ^2.5.1 - version: 2.5.1(rollup@4.21.2) + version: 2.5.2(rollup@4.24.0) flowbite-svelte: specifier: ^0.46.16 - version: 0.46.16(rollup@4.21.2)(svelte@4.2.19) + version: 0.46.22(rollup@4.24.0)(svelte@4.2.19) flowbite-svelte-icons: specifier: ^1.6.1 - version: 1.6.1(svelte@4.2.19)(tailwind-merge@2.5.2)(tailwindcss@3.4.11) + version: 1.6.1(svelte@4.2.19)(tailwind-merge@2.5.2)(tailwindcss@3.4.13) svelte: specifier: ^4.2.18 version: 4.2.19 tailwindcss: specifier: ^3.4.9 - version: 3.4.11 + version: 3.4.13 vite: specifier: ^5.4.1 - version: 5.4.3 + version: 5.4.8(@types/node@22.7.4) packages: @@ -59,6 +62,16 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} + '@cosmograph/cosmograph@1.4.0': + resolution: {integrity: sha512-tetqj0UAOxPBhmEM9T9Xd4jMY+srNuE1HEpoJeZrx3PdnVyGGS013aHSKiw3dkMY2N+WSfIT52ALzp/sKrneng==} + + '@cosmograph/cosmos@1.6.1': + resolution: {integrity: sha512-A91YabqDxCRqYZXmlOs5ykqkDw1pui0TnuXA65sYFRHwskOJ+BNy7z2IFb/vVIBlsnl3Jdyzm9G93A/xipbHIA==} + engines: {node: '>=12.2.0', npm: '>=7.0.0'} + + '@cosmograph/ui@1.4.0': + resolution: {integrity: sha512-SnmFAkTC/FX37Ga0qG+kgsDifUEJ+gOmb7xFDbOcIFalYjtKjAam2/VV2Cl/HJ4Vuluq0+S5m9BJTJ+ODEhGZw==} + '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} @@ -206,6 +219,9 @@ packages: '@floating-ui/utils@0.2.8': resolution: {integrity: sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==} + '@interacta/css-labels@0.1.1': + resolution: {integrity: sha512-1XlnE0rXWzLkHV4tkhrS3qJV4GkIPgZ0U9joY0KdHK4lh7KsNu7Od9auudh9gKyEI7108ih0AKK82NEW5fi7rQ==} + '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -228,6 +244,9 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@juggle/resize-observer@3.4.0': + resolution: {integrity: sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==} + '@mapbox/node-pre-gyp@1.0.11': resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} hasBin: true @@ -251,8 +270,11 @@ packages: '@popperjs/core@2.11.8': resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} - '@rollup/plugin-node-resolve@15.2.3': - resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} + '@ranfdev/deepobj@1.0.2': + resolution: {integrity: sha512-FM3y6kfJaj5MCoAjdv24EDCTDbuFz+4+pgAunbjYfugwIE4O/xx8mPNji1n/ouG8pHCntSnBr1xwTOensF23Gg==} + + '@rollup/plugin-node-resolve@15.3.0': + resolution: {integrity: sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^2.78.0||^3.0.0||^4.0.0 @@ -260,8 +282,8 @@ packages: rollup: optional: true - '@rollup/pluginutils@5.1.0': - resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + '@rollup/pluginutils@5.1.2': + resolution: {integrity: sha512-/FIdS3PyZ39bjZlwqFnWqCOVnW7o963LtKMwQOD0NhQqw22gSr2YY1afu3FxRip4ZCZNsD5jq6Aaz6QV3D/Njw==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 @@ -269,86 +291,108 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.21.2': - resolution: {integrity: sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==} + '@rollup/rollup-android-arm-eabi@4.24.0': + resolution: {integrity: sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.21.2': - resolution: {integrity: sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==} + '@rollup/rollup-android-arm64@4.24.0': + resolution: {integrity: sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.21.2': - resolution: {integrity: sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==} + '@rollup/rollup-darwin-arm64@4.24.0': + resolution: {integrity: sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.21.2': - resolution: {integrity: sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==} + '@rollup/rollup-darwin-x64@4.24.0': + resolution: {integrity: sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.21.2': - resolution: {integrity: sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==} + '@rollup/rollup-linux-arm-gnueabihf@4.24.0': + resolution: {integrity: sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.21.2': - resolution: {integrity: sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==} + '@rollup/rollup-linux-arm-musleabihf@4.24.0': + resolution: {integrity: sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.21.2': - resolution: {integrity: sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==} + '@rollup/rollup-linux-arm64-gnu@4.24.0': + resolution: {integrity: sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.21.2': - resolution: {integrity: sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==} + '@rollup/rollup-linux-arm64-musl@4.24.0': + resolution: {integrity: sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': - resolution: {integrity: sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==} + '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': + resolution: {integrity: sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.21.2': - resolution: {integrity: sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==} + '@rollup/rollup-linux-riscv64-gnu@4.24.0': + resolution: {integrity: sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.21.2': - resolution: {integrity: sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==} + '@rollup/rollup-linux-s390x-gnu@4.24.0': + resolution: {integrity: sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.21.2': - resolution: {integrity: sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==} + '@rollup/rollup-linux-x64-gnu@4.24.0': + resolution: {integrity: sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.21.2': - resolution: {integrity: sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==} + '@rollup/rollup-linux-x64-musl@4.24.0': + resolution: {integrity: sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.21.2': - resolution: {integrity: sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==} + '@rollup/rollup-win32-arm64-msvc@4.24.0': + resolution: {integrity: sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.21.2': - resolution: {integrity: sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==} + '@rollup/rollup-win32-ia32-msvc@4.24.0': + resolution: {integrity: sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.21.2': - resolution: {integrity: sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==} + '@rollup/rollup-win32-x64-msvc@4.24.0': + resolution: {integrity: sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==} cpu: [x64] os: [win32] + '@supabase/auth-js@2.65.0': + resolution: {integrity: sha512-+wboHfZufAE2Y612OsKeVP4rVOeGZzzMLD/Ac3HrTQkkY4qXNjI6Af9gtmxwccE5nFvTiF114FEbIQ1hRq5uUw==} + + '@supabase/functions-js@2.4.1': + resolution: {integrity: sha512-8sZ2ibwHlf+WkHDUZJUXqqmPvWQ3UHN0W30behOJngVh/qHHekhJLCFbh0AjkE9/FqqXtf9eoVvmYgfCLk5tNA==} + + '@supabase/node-fetch@2.6.15': + resolution: {integrity: sha512-1ibVeYUacxWYi9i0cf5efil6adJ9WRyZBLivgjs+AUpewx1F3xPi7gLgaASI2SmIQxPoCEjAsLAzKPgMJVgOUQ==} + engines: {node: 4.x || >=6.0.0} + + '@supabase/postgrest-js@1.16.1': + resolution: {integrity: sha512-EOSEZFm5pPuCPGCmLF1VOCS78DfkSz600PBuvBND/IZmMciJ1pmsS3ss6TkB6UkuvTybYiBh7gKOYyxoEO3USA==} + + '@supabase/realtime-js@2.10.2': + resolution: {integrity: sha512-qyCQaNg90HmJstsvr2aJNxK2zgoKh9ZZA8oqb7UT2LCh3mj9zpa3Iwu167AuyNxsxrUE8eEJ2yH6wLCij4EApA==} + + '@supabase/storage-js@2.7.0': + resolution: {integrity: sha512-iZenEdO6Mx9iTR6T7wC7sk6KKsoDPLq8rdu5VRy7+JiT1i8fnqfcOr6mfF2Eaqky9VQzhP8zZKQYjzozB65Rig==} + + '@supabase/supabase-js@2.45.4': + resolution: {integrity: sha512-E5p8/zOLaQ3a462MZnmnz03CrduA5ySH9hZyL03Y+QZLIOO4/Gs8Rdy4ZCKDHsN7x0xdanVEWWFN3pJFQr9/hg==} + '@sveltejs/vite-plugin-svelte-inspector@2.1.0': resolution: {integrity: sha512-9QX28IymvBlSCqsCll5t0kQVxipsfhFFL+L2t3nTWfXnddYwxBuAEtTtlaVQpRz9c37BhJjltSeY4AJSC03SSg==} engines: {node: ^18.0.0 || >=20} @@ -373,12 +417,21 @@ packages: resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} - '@types/estree@1.0.5': - resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + + '@types/node@22.7.4': + resolution: {integrity: sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==} + + '@types/phoenix@1.6.5': + resolution: {integrity: sha512-xegpDuR+z0UqG9fwHqNoy3rI7JDlvaPh2TY47Fl80oq6g+hXT+c/LEuE43X48clZ6lOfANl5WrPur9fYO1RJ/w==} '@types/resolve@1.20.2': resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + '@types/ws@8.5.12': + resolution: {integrity: sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==} + '@yr/monotone-cubic-spline@1.0.3': resolution: {integrity: sha512-FQXkOta0XBSUPHndIKON2Y9JeQz5ZeMqLYZVVK93FliNBFm7LNMIZmY6FrMEB9XPcDbE2bekMbZD6kzDkxwYjA==} @@ -431,8 +484,8 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} - apexcharts@3.53.0: - resolution: {integrity: sha512-QESZHZY3w9LPQ64PGh1gEdfjYjJ5Jp+Dfy0D/CLjsLOPTpXzdxwlNMqRj+vPbTcP0nAHgjWv1maDqcEq6u5olw==} + apexcharts@3.54.0: + resolution: {integrity: sha512-ZgI/seScffjLpwNRX/gAhIkAhpCNWiTNsdICv7qxnF0xisI23XSsaENUKIcMlyP1rbe8ECgvybDnp7plZld89A==} aproba@2.0.0: resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} @@ -445,8 +498,9 @@ packages: arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} - aria-query@5.3.0: - resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} + aria-query@5.3.2: + resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} + engines: {node: '>= 0.4'} asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -479,21 +533,17 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.23.3: - resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} + browserslist@4.24.0: + resolution: {integrity: sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true - builtin-modules@3.3.0: - resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} - engines: {node: '>=6'} - camelcase-css@2.0.1: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} - caniuse-lite@1.0.30001660: - resolution: {integrity: sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==} + caniuse-lite@1.0.30001666: + resolution: {integrity: sha512-gD14ICmoV5ZZM1OdzPWmpx+q4GyefaK06zi8hmfHV5xe4/2nOQX3+Dw5o+fSqOws2xVwL9j+anOPFwHzdEdV4g==} canvas@2.11.2: resolution: {integrity: sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==} @@ -539,6 +589,9 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} + crossfilter2@1.5.4: + resolution: {integrity: sha512-oOGqOM0RocwQFOXJnEaUKqYV6Mc1TNCRv3LrNUa0QlofQTutGAXyQaLW1aGKLls2sfnbwBEtsa6tPD3jY+ycqQ==} + css-tree@2.3.1: resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} @@ -558,28 +611,86 @@ packages: resolution: {integrity: sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==} engines: {node: '>=8'} + d3-array@3.2.4: + resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} + engines: {node: '>=12'} + + d3-axis@3.0.0: + resolution: {integrity: sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==} + engines: {node: '>=12'} + + d3-brush@3.0.0: + resolution: {integrity: sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==} + engines: {node: '>=12'} + + d3-color@3.1.0: + resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} + engines: {node: '>=12'} + d3-dispatch@3.0.1: resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==} engines: {node: '>=12'} + d3-drag@3.0.0: + resolution: {integrity: sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==} + engines: {node: '>=12'} + + d3-ease@3.0.1: + resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==} + engines: {node: '>=12'} + d3-force@3.0.0: resolution: {integrity: sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==} engines: {node: '>=12'} + d3-format@3.1.0: + resolution: {integrity: sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==} + engines: {node: '>=12'} + + d3-interpolate@3.0.1: + resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} + engines: {node: '>=12'} + d3-quadtree@3.0.1: resolution: {integrity: sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==} engines: {node: '>=12'} + d3-scale@4.0.2: + resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==} + engines: {node: '>=12'} + + d3-selection@3.0.0: + resolution: {integrity: sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==} + engines: {node: '>=12'} + + d3-time-format@4.1.0: + resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==} + engines: {node: '>=12'} + + d3-time@3.1.0: + resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==} + engines: {node: '>=12'} + d3-timer@3.0.1: resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==} engines: {node: '>=12'} + d3-transition@3.0.1: + resolution: {integrity: sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==} + engines: {node: '>=12'} + peerDependencies: + d3-selection: 2 - 3 + + d3-zoom@3.0.0: + resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==} + engines: {node: '>=12'} + data-urls@3.0.2: resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} engines: {node: '>=12'} - debug@4.3.6: - resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -605,10 +716,6 @@ packages: delegates@1.0.0: resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} - dequal@2.0.3: - resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} - engines: {node: '>=6'} - detect-libc@2.0.3: resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} engines: {node: '>=8'} @@ -627,8 +734,8 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - electron-to-chromium@1.5.23: - resolution: {integrity: sha512-mBhODedOXg4v5QWwl21DjM5amzjmI1zw9EPrPK/5Wx7C8jt33bpZNrC7OhHUG3pxRtbLpr3W2dXT+Ph1SsfRZA==} + electron-to-chromium@1.5.31: + resolution: {integrity: sha512-QcDoBbQeYt0+3CWcK/rEbuHvwpbT/8SV9T3OSgs6cX1FlcUAkgrkqbg9zLnDrMM/rLamzQwal4LYFCiWk861Tg==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -649,6 +756,10 @@ packages: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} + escape-string-regexp@5.0.0: + resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} + engines: {node: '>=12'} + escodegen@2.1.0: resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} engines: {node: '>=6.0'} @@ -698,14 +809,14 @@ packages: tailwind-merge: ^2.0.0 tailwindcss: ^3.3.2 - flowbite-svelte@0.46.16: - resolution: {integrity: sha512-NkyMS/d1EwuL1cqstSUflnG9vhhBiNyUiAw51D8lfPKDfUG1iXc4+HueQw01zhHv3uSXRJRToFBrg6npxeJ3jw==} + flowbite-svelte@0.46.22: + resolution: {integrity: sha512-U+YeJ3ye1OV/9d9VGff/0yuWxkv2Cdk71bvy5JJszIjfEfRvEzX5Ovjm6SHYp51B6hLwEdmMFJXPo5bTmEMGkA==} engines: {node: '>=18.0.0', pnpm: '>=8.0.0'} peerDependencies: svelte: ^3.55.1 || ^4.0.0 || ^5.0.0 - flowbite@2.5.1: - resolution: {integrity: sha512-7jP1jy9c3QP7y+KU9lc8ueMkTyUdMDvRP+lteSWgY5TigSZjf9K1kqZxmqjhbx2gBnFQxMl1GAjVThCa8cEpKA==} + flowbite@2.5.2: + resolution: {integrity: sha512-kwFD3n8/YW4EG8GlY3Od9IoKND97kitO+/ejISHSqpn3vw2i5K/+ZI8Jm2V+KC4fGdnfi0XZ+TzYqQb4Q1LshA==} foreground-child@3.3.0: resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} @@ -741,6 +852,12 @@ packages: gintersect@0.1.0: resolution: {integrity: sha512-jps8Ckj6u8yLxOYzBVJbPqvRdeHOINQgRtufaLHkunwNQcSEdZU0ejPBapSimXJEQ9mdQW4hsEUN7DfJEcTvQQ==} + gl-bench@1.0.42: + resolution: {integrity: sha512-zuMsA/NCPmI8dPy6q3zTUH8OUM5cqKg7uVWwqzrtXJPBqoypM0XeFWEc8iFOqbf/1qtXieWOrbmgFEByKTQt4Q==} + + gl-matrix@3.4.3: + resolution: {integrity: sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA==} + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -787,14 +904,14 @@ packages: inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + internmap@2.0.3: + resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} + engines: {node: '>=12'} + is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} - is-builtin-module@3.2.1: - resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} - engines: {node: '>=6'} - is-core-module@2.15.1: resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} engines: {node: '>= 0.4'} @@ -873,6 +990,9 @@ packages: lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + magic-string@0.25.9: + resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} + magic-string@0.30.11: resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} @@ -935,8 +1055,8 @@ packages: engines: {node: '>=10'} hasBin: true - ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} @@ -1023,8 +1143,8 @@ packages: resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} deprecated: This package is no longer supported. - nwsapi@2.2.12: - resolution: {integrity: sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w==} + nwsapi@2.2.13: + resolution: {integrity: sha512-cTGB9ptp9dY9A5VbMSe7fQBcl/tt22Vcqdq8+eN93rblOuE0aCFu4aZ2vMwct/2t+lFnosm8RkQW1I0Omb1UtQ==} object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} @@ -1037,8 +1157,8 @@ packages: once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - package-json-from-dist@1.0.0: - resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} parse5@7.1.2: resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} @@ -1117,8 +1237,8 @@ packages: postcss-value-parser@4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - postcss@8.4.45: - resolution: {integrity: sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==} + postcss@8.4.47: + resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} engines: {node: ^10 || ^12 || >=14} psl@1.9.0: @@ -1134,6 +1254,10 @@ packages: queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + random@4.1.0: + resolution: {integrity: sha512-6Ajb7XmMSE9EFAMGC3kg9mvE7fGlBip25mYYuSMzw/uUSrmGilvZo2qwX3RnTRjwXkwkS+4swse9otZ92VjAtQ==} + engines: {node: '>=14'} + read-cache@1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} @@ -1149,6 +1273,9 @@ packages: resolution: {integrity: sha512-A1PeDEYMrkLrfyOwv2jwihXbo9qxdGD3atBYQA9JJgreAx8/7rC6IUkWOw2NQlOxLp2wL0ifQbh1HuidDfYA6w==} engines: {node: '>=8'} + regl@2.1.0: + resolution: {integrity: sha512-oWUce/aVoEvW5l2V0LK7O5KJMzUSKeiOwFuJehzpSFd43dO5spP9r+sSUfhKtsky4u6MCqWJaRL+abzExynfTg==} + requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} @@ -1165,8 +1292,13 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rollup@4.21.2: - resolution: {integrity: sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==} + rollup-plugin-rename-node-modules@1.3.1: + resolution: {integrity: sha512-46TUPqO94GXuACYqVZjdbzNXTQAp+wTdZg/vUx2gaINb0da/ZPdaOtno2RGUOKBF4sbVM9v2ZqV98r4TQbp1UA==} + peerDependencies: + rollup: ^2.28.2 + + rollup@4.24.0: + resolution: {integrity: sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -1183,6 +1315,9 @@ packages: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} + seedrandom@3.0.5: + resolution: {integrity: sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==} + semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -1219,14 +1354,18 @@ packages: simplesvg@0.0.10: resolution: {integrity: sha512-iCVx1A/kI4U3cGPRMRQaGLbIFNDXuB8rsaAsO2mM5wYFDs/MrfmHhrSCqNbOylgt9MhhZU3uMsSQnZM853kwXQ==} - source-map-js@1.2.0: - resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + sourcemap-codec@1.4.8: + resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} + deprecated: Please use @jridgewell/sourcemap-codec instead + string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -1305,8 +1444,8 @@ packages: tailwind-merge@2.5.2: resolution: {integrity: sha512-kjEBm+pvD+6eAwzJL2Bi+02/9LFLal1Gs61+QB7HvTfQQ0aXwC5LGT8PEt1gS0CWKktKe6ysPTAy3cBC5MeiIg==} - tailwindcss@3.4.11: - resolution: {integrity: sha512-qhEuBcLemjSJk5ajccN9xJFtM/h0AVCPaA6C92jNP+M2J8kX+eMJHI7R2HFKUvvAsMpcfLILMCFYSeDwpMmlUg==} + tailwindcss@3.4.13: + resolution: {integrity: sha512-KqjHOJKogOUt5Bs752ykCeiwvi0fKVkr5oqsFNt/8px/tA8scFPIlkygsf6jXrfCqGHz7VflA6+yytWuM+XhFw==} engines: {node: '>=14.0.0'} hasBin: true @@ -1339,12 +1478,15 @@ packages: ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + universalify@0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} - update-browserslist-db@1.1.0: - resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} + update-browserslist-db@1.1.1: + resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -1355,8 +1497,8 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - vite@5.4.3: - resolution: {integrity: sha512-IH+nl64eq9lJjFqU+/yrRnrHPVTlgy42/+IzbOdaFDVlyLgI/wDlf+FCobXLX1cT0X5+7LMyH1mIy2xJdLfo8Q==} + vite@5.4.8: + resolution: {integrity: sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -1478,6 +1620,48 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 + '@cosmograph/cosmograph@1.4.0(rollup@4.24.0)': + dependencies: + '@cosmograph/cosmos': 1.6.1 + '@cosmograph/ui': 1.4.0 + '@interacta/css-labels': 0.1.1 + '@supabase/supabase-js': 2.45.4 + crossfilter2: 1.5.4 + d3-color: 3.1.0 + rollup-plugin-rename-node-modules: 1.3.1(rollup@4.24.0) + transitivePeerDependencies: + - bufferutil + - rollup + - utf-8-validate + + '@cosmograph/cosmos@1.6.1': + dependencies: + d3-array: 3.2.4 + d3-color: 3.1.0 + d3-ease: 3.0.1 + d3-scale: 4.0.2 + d3-selection: 3.0.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + d3-zoom: 3.0.0 + gl-bench: 1.0.42 + gl-matrix: 3.4.3 + random: 4.1.0 + regl: 2.1.0 + + '@cosmograph/ui@1.4.0': + dependencies: + '@juggle/resize-observer': 3.4.0 + d3-array: 3.2.4 + d3-axis: 3.0.0 + d3-brush: 3.0.0 + d3-format: 3.1.0 + d3-scale: 4.0.2 + d3-selection: 3.0.0 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + escape-string-regexp: 5.0.0 + '@esbuild/aix-ppc64@0.21.5': optional: true @@ -1558,6 +1742,8 @@ snapshots: '@floating-ui/utils@0.2.8': {} + '@interacta/css-labels@0.1.1': {} + '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 @@ -1584,6 +1770,8 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 + '@juggle/resize-observer@3.4.0': {} + '@mapbox/node-pre-gyp@1.0.11': dependencies: detect-libc: 2.0.3 @@ -1617,111 +1805,164 @@ snapshots: '@popperjs/core@2.11.8': {} - '@rollup/plugin-node-resolve@15.2.3(rollup@4.21.2)': + '@ranfdev/deepobj@1.0.2': {} + + '@rollup/plugin-node-resolve@15.3.0(rollup@4.24.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.21.2) + '@rollup/pluginutils': 5.1.2(rollup@4.24.0) '@types/resolve': 1.20.2 deepmerge: 4.3.1 - is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.8 optionalDependencies: - rollup: 4.21.2 + rollup: 4.24.0 - '@rollup/pluginutils@5.1.0(rollup@4.21.2)': + '@rollup/pluginutils@5.1.2(rollup@4.24.0)': dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.21.2 + rollup: 4.24.0 - '@rollup/rollup-android-arm-eabi@4.21.2': + '@rollup/rollup-android-arm-eabi@4.24.0': optional: true - '@rollup/rollup-android-arm64@4.21.2': + '@rollup/rollup-android-arm64@4.24.0': optional: true - '@rollup/rollup-darwin-arm64@4.21.2': + '@rollup/rollup-darwin-arm64@4.24.0': optional: true - '@rollup/rollup-darwin-x64@4.21.2': + '@rollup/rollup-darwin-x64@4.24.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.21.2': + '@rollup/rollup-linux-arm-gnueabihf@4.24.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.21.2': + '@rollup/rollup-linux-arm-musleabihf@4.24.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.21.2': + '@rollup/rollup-linux-arm64-gnu@4.24.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.21.2': + '@rollup/rollup-linux-arm64-musl@4.24.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': + '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.21.2': + '@rollup/rollup-linux-riscv64-gnu@4.24.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.21.2': + '@rollup/rollup-linux-s390x-gnu@4.24.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.21.2': + '@rollup/rollup-linux-x64-gnu@4.24.0': optional: true - '@rollup/rollup-linux-x64-musl@4.21.2': + '@rollup/rollup-linux-x64-musl@4.24.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.21.2': + '@rollup/rollup-win32-arm64-msvc@4.24.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.21.2': + '@rollup/rollup-win32-ia32-msvc@4.24.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.21.2': + '@rollup/rollup-win32-x64-msvc@4.24.0': optional: true - '@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.3))(svelte@4.2.19)(vite@5.4.3)': + '@supabase/auth-js@2.65.0': dependencies: - '@sveltejs/vite-plugin-svelte': 3.1.2(svelte@4.2.19)(vite@5.4.3) - debug: 4.3.6 + '@supabase/node-fetch': 2.6.15 + + '@supabase/functions-js@2.4.1': + dependencies: + '@supabase/node-fetch': 2.6.15 + + '@supabase/node-fetch@2.6.15': + dependencies: + whatwg-url: 5.0.0 + + '@supabase/postgrest-js@1.16.1': + dependencies: + '@supabase/node-fetch': 2.6.15 + + '@supabase/realtime-js@2.10.2': + dependencies: + '@supabase/node-fetch': 2.6.15 + '@types/phoenix': 1.6.5 + '@types/ws': 8.5.12 + ws: 8.18.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@supabase/storage-js@2.7.0': + dependencies: + '@supabase/node-fetch': 2.6.15 + + '@supabase/supabase-js@2.45.4': + dependencies: + '@supabase/auth-js': 2.65.0 + '@supabase/functions-js': 2.4.1 + '@supabase/node-fetch': 2.6.15 + '@supabase/postgrest-js': 1.16.1 + '@supabase/realtime-js': 2.10.2 + '@supabase/storage-js': 2.7.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.8(@types/node@22.7.4)))(svelte@4.2.19)(vite@5.4.8(@types/node@22.7.4))': + dependencies: + '@sveltejs/vite-plugin-svelte': 3.1.2(svelte@4.2.19)(vite@5.4.8(@types/node@22.7.4)) + debug: 4.3.7 svelte: 4.2.19 - vite: 5.4.3 + vite: 5.4.8(@types/node@22.7.4) transitivePeerDependencies: - supports-color - '@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.3)': + '@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.8(@types/node@22.7.4))': dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.3))(svelte@4.2.19)(vite@5.4.3) - debug: 4.3.6 + '@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.8(@types/node@22.7.4)))(svelte@4.2.19)(vite@5.4.8(@types/node@22.7.4)) + debug: 4.3.7 deepmerge: 4.3.1 kleur: 4.1.5 magic-string: 0.30.11 svelte: 4.2.19 svelte-hmr: 0.16.0(svelte@4.2.19) - vite: 5.4.3 - vitefu: 0.2.5(vite@5.4.3) + vite: 5.4.8(@types/node@22.7.4) + vitefu: 0.2.5(vite@5.4.8(@types/node@22.7.4)) transitivePeerDependencies: - supports-color - '@tailwindcss/typography@0.5.15(tailwindcss@3.4.11)': + '@tailwindcss/typography@0.5.15(tailwindcss@3.4.13)': dependencies: lodash.castarray: 4.4.0 lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 postcss-selector-parser: 6.0.10 - tailwindcss: 3.4.11 + tailwindcss: 3.4.13 '@tootallnate/once@2.0.0': optional: true - '@types/estree@1.0.5': {} + '@types/estree@1.0.6': {} + + '@types/node@22.7.4': + dependencies: + undici-types: 6.19.8 + + '@types/phoenix@1.6.5': {} '@types/resolve@1.20.2': {} + '@types/ws@8.5.12': + dependencies: + '@types/node': 22.7.4 + '@yr/monotone-cubic-spline@1.0.3': {} abab@2.0.6: @@ -1747,7 +1988,7 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.3.6 + debug: 4.3.7 transitivePeerDependencies: - supports-color optional: true @@ -1769,7 +2010,7 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.1 - apexcharts@3.53.0: + apexcharts@3.54.0: dependencies: '@yr/monotone-cubic-spline': 1.0.3 svg.draggable.js: 2.2.2 @@ -1790,21 +2031,19 @@ snapshots: arg@5.0.2: {} - aria-query@5.3.0: - dependencies: - dequal: 2.0.3 + aria-query@5.3.2: {} asynckit@0.4.0: optional: true - autoprefixer@10.4.20(postcss@8.4.45): + autoprefixer@10.4.20(postcss@8.4.47): dependencies: - browserslist: 4.23.3 - caniuse-lite: 1.0.30001660 + browserslist: 4.24.0 + caniuse-lite: 1.0.30001666 fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.1.0 - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 axobject-query@4.1.0: {} @@ -1827,18 +2066,16 @@ snapshots: dependencies: fill-range: 7.1.1 - browserslist@4.23.3: + browserslist@4.24.0: dependencies: - caniuse-lite: 1.0.30001660 - electron-to-chromium: 1.5.23 + caniuse-lite: 1.0.30001666 + electron-to-chromium: 1.5.31 node-releases: 2.0.18 - update-browserslist-db: 1.1.0(browserslist@4.23.3) - - builtin-modules@3.3.0: {} + update-browserslist-db: 1.1.1(browserslist@4.24.0) camelcase-css@2.0.1: {} - caniuse-lite@1.0.30001660: {} + caniuse-lite@1.0.30001666: {} canvas@2.11.2: dependencies: @@ -1868,7 +2105,7 @@ snapshots: code-red@1.0.4: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 acorn: 8.12.1 estree-walker: 3.0.3 periscopic: 3.1.0 @@ -1901,10 +2138,14 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 + crossfilter2@1.5.4: + dependencies: + '@ranfdev/deepobj': 1.0.2 + css-tree@2.3.1: dependencies: mdn-data: 2.0.30 - source-map-js: 1.2.0 + source-map-js: 1.2.1 cssesc@3.0.0: {} @@ -1919,18 +2160,82 @@ snapshots: cssom: 0.3.8 optional: true + d3-array@3.2.4: + dependencies: + internmap: 2.0.3 + + d3-axis@3.0.0: {} + + d3-brush@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + + d3-color@3.1.0: {} + d3-dispatch@3.0.1: {} + d3-drag@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-selection: 3.0.0 + + d3-ease@3.0.1: {} + d3-force@3.0.0: dependencies: d3-dispatch: 3.0.1 d3-quadtree: 3.0.1 d3-timer: 3.0.1 + d3-format@3.1.0: {} + + d3-interpolate@3.0.1: + dependencies: + d3-color: 3.1.0 + d3-quadtree@3.0.1: {} + d3-scale@4.0.2: + dependencies: + d3-array: 3.2.4 + d3-format: 3.1.0 + d3-interpolate: 3.0.1 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + + d3-selection@3.0.0: {} + + d3-time-format@4.1.0: + dependencies: + d3-time: 3.1.0 + + d3-time@3.1.0: + dependencies: + d3-array: 3.2.4 + d3-timer@3.0.1: {} + d3-transition@3.0.1(d3-selection@3.0.0): + dependencies: + d3-color: 3.1.0 + d3-dispatch: 3.0.1 + d3-ease: 3.0.1 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-timer: 3.0.1 + + d3-zoom@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + data-urls@3.0.2: dependencies: abab: 2.0.6 @@ -1938,9 +2243,9 @@ snapshots: whatwg-url: 11.0.0 optional: true - debug@4.3.6: + debug@4.3.7: dependencies: - ms: 2.1.2 + ms: 2.1.3 decimal.js@10.4.3: optional: true @@ -1958,8 +2263,6 @@ snapshots: delegates@1.0.0: optional: true - dequal@2.0.3: {} - detect-libc@2.0.3: optional: true @@ -1974,7 +2277,7 @@ snapshots: eastasianwidth@0.2.0: {} - electron-to-chromium@1.5.23: {} + electron-to-chromium@1.5.31: {} emoji-regex@8.0.0: {} @@ -2011,6 +2314,8 @@ snapshots: escalade@3.2.0: {} + escape-string-regexp@5.0.0: {} + escodegen@2.1.0: dependencies: esprima: 4.0.1 @@ -2030,7 +2335,7 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 esutils@2.0.3: optional: true @@ -2061,33 +2366,33 @@ snapshots: dependencies: to-regex-range: 5.0.1 - flowbite-datepicker@1.3.0(rollup@4.21.2): + flowbite-datepicker@1.3.0(rollup@4.24.0): dependencies: - '@rollup/plugin-node-resolve': 15.2.3(rollup@4.21.2) - flowbite: 2.5.1(rollup@4.21.2) + '@rollup/plugin-node-resolve': 15.3.0(rollup@4.24.0) + flowbite: 2.5.2(rollup@4.24.0) transitivePeerDependencies: - rollup - flowbite-svelte-icons@1.6.1(svelte@4.2.19)(tailwind-merge@2.5.2)(tailwindcss@3.4.11): + flowbite-svelte-icons@1.6.1(svelte@4.2.19)(tailwind-merge@2.5.2)(tailwindcss@3.4.13): dependencies: svelte: 4.2.19 tailwind-merge: 2.5.2 - tailwindcss: 3.4.11 + tailwindcss: 3.4.13 - flowbite-svelte@0.46.16(rollup@4.21.2)(svelte@4.2.19): + flowbite-svelte@0.46.22(rollup@4.24.0)(svelte@4.2.19): dependencies: '@floating-ui/dom': 1.6.11 - apexcharts: 3.53.0 - flowbite: 2.5.1(rollup@4.21.2) + apexcharts: 3.54.0 + flowbite: 2.5.2(rollup@4.24.0) svelte: 4.2.19 tailwind-merge: 2.5.2 transitivePeerDependencies: - rollup - flowbite@2.5.1(rollup@4.21.2): + flowbite@2.5.2(rollup@4.24.0): dependencies: '@popperjs/core': 2.11.8 - flowbite-datepicker: 1.3.0(rollup@4.21.2) + flowbite-datepicker: 1.3.0(rollup@4.24.0) mini-svg-data-uri: 1.4.4 transitivePeerDependencies: - rollup @@ -2134,6 +2439,10 @@ snapshots: gintersect@0.1.0: {} + gl-bench@1.0.42: {} + + gl-matrix@3.4.3: {} + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -2148,7 +2457,7 @@ snapshots: jackspeak: 3.4.3 minimatch: 9.0.5 minipass: 7.1.2 - package-json-from-dist: 1.0.0 + package-json-from-dist: 1.0.1 path-scurry: 1.11.1 glob@7.2.3: @@ -2177,7 +2486,7 @@ snapshots: dependencies: '@tootallnate/once': 2.0.0 agent-base: 6.0.2 - debug: 4.3.6 + debug: 4.3.7 transitivePeerDependencies: - supports-color optional: true @@ -2185,7 +2494,7 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.6 + debug: 4.3.7 transitivePeerDependencies: - supports-color optional: true @@ -2204,14 +2513,12 @@ snapshots: inherits@2.0.4: optional: true + internmap@2.0.3: {} + is-binary-path@2.1.0: dependencies: binary-extensions: 2.3.0 - is-builtin-module@3.2.1: - dependencies: - builtin-modules: 3.3.0 - is-core-module@2.15.1: dependencies: hasown: 2.0.2 @@ -2233,7 +2540,7 @@ snapshots: is-reference@3.0.2: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 isexe@2.0.0: {} @@ -2261,7 +2568,7 @@ snapshots: http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.12 + nwsapi: 2.2.13 parse5: 7.1.2 saxes: 6.0.0 symbol-tree: 3.2.4 @@ -2299,6 +2606,10 @@ snapshots: lru-cache@10.4.3: {} + magic-string@0.25.9: + dependencies: + sourcemap-codec: 1.4.8 + magic-string@0.30.11: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -2358,7 +2669,7 @@ snapshots: mkdirp@1.0.4: optional: true - ms@2.1.2: {} + ms@2.1.3: {} mz@2.7.0: dependencies: @@ -2444,7 +2755,7 @@ snapshots: set-blocking: 2.0.0 optional: true - nwsapi@2.2.12: + nwsapi@2.2.13: optional: true object-assign@4.1.1: {} @@ -2456,7 +2767,7 @@ snapshots: wrappy: 1.0.2 optional: true - package-json-from-dist@1.0.0: {} + package-json-from-dist@1.0.1: {} parse5@7.1.2: dependencies: @@ -2477,7 +2788,7 @@ snapshots: periscopic@3.1.0: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 estree-walker: 3.0.3 is-reference: 3.0.2 @@ -2489,28 +2800,28 @@ snapshots: pirates@4.0.6: {} - postcss-import@15.1.0(postcss@8.4.45): + postcss-import@15.1.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.8 - postcss-js@4.0.1(postcss@8.4.45): + postcss-js@4.0.1(postcss@8.4.47): dependencies: camelcase-css: 2.0.1 - postcss: 8.4.45 + postcss: 8.4.47 - postcss-load-config@4.0.2(postcss@8.4.45): + postcss-load-config@4.0.2(postcss@8.4.47): dependencies: lilconfig: 3.1.2 yaml: 2.5.1 optionalDependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-nested@6.2.0(postcss@8.4.45): + postcss-nested@6.2.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.1.2 postcss-selector-parser@6.0.10: @@ -2525,11 +2836,11 @@ snapshots: postcss-value-parser@4.2.0: {} - postcss@8.4.45: + postcss@8.4.47: dependencies: nanoid: 3.3.7 picocolors: 1.1.0 - source-map-js: 1.2.0 + source-map-js: 1.2.1 psl@1.9.0: optional: true @@ -2542,6 +2853,10 @@ snapshots: queue-microtask@1.2.3: {} + random@4.1.0: + dependencies: + seedrandom: 3.0.5 + read-cache@1.0.0: dependencies: pify: 2.3.0 @@ -2559,6 +2874,8 @@ snapshots: regexparam@2.0.2: {} + regl@2.1.0: {} + requires-port@1.0.0: optional: true @@ -2575,26 +2892,32 @@ snapshots: glob: 7.2.3 optional: true - rollup@4.21.2: + rollup-plugin-rename-node-modules@1.3.1(rollup@4.24.0): + dependencies: + estree-walker: 2.0.2 + magic-string: 0.25.9 + rollup: 4.24.0 + + rollup@4.24.0: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.21.2 - '@rollup/rollup-android-arm64': 4.21.2 - '@rollup/rollup-darwin-arm64': 4.21.2 - '@rollup/rollup-darwin-x64': 4.21.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.21.2 - '@rollup/rollup-linux-arm-musleabihf': 4.21.2 - '@rollup/rollup-linux-arm64-gnu': 4.21.2 - '@rollup/rollup-linux-arm64-musl': 4.21.2 - '@rollup/rollup-linux-powerpc64le-gnu': 4.21.2 - '@rollup/rollup-linux-riscv64-gnu': 4.21.2 - '@rollup/rollup-linux-s390x-gnu': 4.21.2 - '@rollup/rollup-linux-x64-gnu': 4.21.2 - '@rollup/rollup-linux-x64-musl': 4.21.2 - '@rollup/rollup-win32-arm64-msvc': 4.21.2 - '@rollup/rollup-win32-ia32-msvc': 4.21.2 - '@rollup/rollup-win32-x64-msvc': 4.21.2 + '@rollup/rollup-android-arm-eabi': 4.24.0 + '@rollup/rollup-android-arm64': 4.24.0 + '@rollup/rollup-darwin-arm64': 4.24.0 + '@rollup/rollup-darwin-x64': 4.24.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.24.0 + '@rollup/rollup-linux-arm-musleabihf': 4.24.0 + '@rollup/rollup-linux-arm64-gnu': 4.24.0 + '@rollup/rollup-linux-arm64-musl': 4.24.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.24.0 + '@rollup/rollup-linux-riscv64-gnu': 4.24.0 + '@rollup/rollup-linux-s390x-gnu': 4.24.0 + '@rollup/rollup-linux-x64-gnu': 4.24.0 + '@rollup/rollup-linux-x64-musl': 4.24.0 + '@rollup/rollup-win32-arm64-msvc': 4.24.0 + '@rollup/rollup-win32-ia32-msvc': 4.24.0 + '@rollup/rollup-win32-x64-msvc': 4.24.0 fsevents: 2.3.3 run-parallel@1.2.0: @@ -2612,6 +2935,8 @@ snapshots: xmlchars: 2.2.0 optional: true + seedrandom@3.0.5: {} + semver@6.3.1: optional: true @@ -2646,11 +2971,13 @@ snapshots: dependencies: add-event-listener: 0.0.1 - source-map-js@1.2.0: {} + source-map-js@1.2.1: {} source-map@0.6.1: optional: true + sourcemap-codec@1.4.8: {} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -2701,9 +3028,9 @@ snapshots: '@ampproject/remapping': 2.3.0 '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 acorn: 8.12.1 - aria-query: 5.3.0 + aria-query: 5.3.2 axobject-query: 4.1.0 code-red: 1.0.4 css-tree: 2.3.1 @@ -2749,7 +3076,7 @@ snapshots: tailwind-merge@2.5.2: {} - tailwindcss@3.4.11: + tailwindcss@3.4.13: dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -2765,11 +3092,11 @@ snapshots: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.1.0 - postcss: 8.4.45 - postcss-import: 15.1.0(postcss@8.4.45) - postcss-js: 4.0.1(postcss@8.4.45) - postcss-load-config: 4.0.2(postcss@8.4.45) - postcss-nested: 6.2.0(postcss@8.4.45) + postcss: 8.4.47 + postcss-import: 15.1.0(postcss@8.4.47) + postcss-js: 4.0.1(postcss@8.4.47) + postcss-load-config: 4.0.2(postcss@8.4.47) + postcss-nested: 6.2.0(postcss@8.4.47) postcss-selector-parser: 6.1.2 resolve: 1.22.8 sucrase: 3.35.0 @@ -2806,8 +3133,7 @@ snapshots: url-parse: 1.5.10 optional: true - tr46@0.0.3: - optional: true + tr46@0.0.3: {} tr46@3.0.0: dependencies: @@ -2816,12 +3142,14 @@ snapshots: ts-interface-checker@0.1.13: {} + undici-types@6.19.8: {} + universalify@0.2.0: optional: true - update-browserslist-db@1.1.0(browserslist@4.23.3): + update-browserslist-db@1.1.1(browserslist@4.24.0): dependencies: - browserslist: 4.23.3 + browserslist: 4.24.0 escalade: 3.2.0 picocolors: 1.1.0 @@ -2833,17 +3161,18 @@ snapshots: util-deprecate@1.0.2: {} - vite@5.4.3: + vite@5.4.8(@types/node@22.7.4): dependencies: esbuild: 0.21.5 - postcss: 8.4.45 - rollup: 4.21.2 + postcss: 8.4.47 + rollup: 4.24.0 optionalDependencies: + '@types/node': 22.7.4 fsevents: 2.3.3 - vitefu@0.2.5(vite@5.4.3): + vitefu@0.2.5(vite@5.4.8(@types/node@22.7.4)): optionalDependencies: - vite: 5.4.3 + vite: 5.4.8(@types/node@22.7.4) vivagraphjs@0.12.0: dependencies: @@ -2864,8 +3193,7 @@ snapshots: xml-name-validator: 4.0.0 optional: true - webidl-conversions@3.0.1: - optional: true + webidl-conversions@3.0.1: {} webidl-conversions@7.0.0: optional: true @@ -2888,7 +3216,6 @@ snapshots: dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 - optional: true which@2.0.2: dependencies: @@ -2914,8 +3241,7 @@ snapshots: wrappy@1.0.2: optional: true - ws@8.18.0: - optional: true + ws@8.18.0: {} xml-name-validator@4.0.0: optional: true diff --git a/srcjs/src/App.svelte b/srcjs/src/App.svelte index 7bee01b..3e2d628 100644 --- a/srcjs/src/App.svelte +++ b/srcjs/src/App.svelte @@ -1,15 +1,10 @@ - -
    - - diff --git a/srcjs/src/lib/Simulation.svelte b/srcjs/src/lib/Simulation.svelte new file mode 100644 index 0000000..273afee --- /dev/null +++ b/srcjs/src/lib/Simulation.svelte @@ -0,0 +1,28 @@ + + +
    + + diff --git a/srcjs/src/lib/SimulationWrapper.js b/srcjs/src/lib/SimulationWrapper.js new file mode 100644 index 0000000..accc45e --- /dev/null +++ b/srcjs/src/lib/SimulationWrapper.js @@ -0,0 +1,45 @@ +export class SimulationWrapper { + constructor(graphData) { + if (new.target === SimulationWrapper) { + throw new TypeError("Cannot construct SimulationWrapper instances directly"); + } + this.graphData = graphData; + this.started = false; + } + + start(containerElement, nodePositions) { + throw new Error("Method 'start(containerElement, nodePositions)' must be implemented."); + } + + pause() { + throw new Error("Method 'pause()' must be implemented."); + } + + resume() { + throw new Error("Method 'resume()' must be implemented."); + } + + getNodePositions() { + throw new Error("Method 'getNodePositions()' must be implemented."); + } + + // setNodePosition() { + // throw new Error("Method 'setNodePosition()' must be implemented."); + // } + + forEachNode() { + throw new Error("Method 'forEachNode()' must be implemented."); + } + + forEachLink() { + throw new Error("Method 'forEachLink()' must be implemented."); + } + + updateLayoutSetting(newData) { + throw new Error("Method 'updateLayoutSetting()' must be implemented."); + } + + destroy() { + throw new Error("Method 'destroy()' must be implemented."); + } +} diff --git a/srcjs/src/lib/SimulationWrapperCosmo.js b/srcjs/src/lib/SimulationWrapperCosmo.js new file mode 100644 index 0000000..fb2b15d --- /dev/null +++ b/srcjs/src/lib/SimulationWrapperCosmo.js @@ -0,0 +1,160 @@ +import { Cosmograph } from "@cosmograph/cosmograph"; +import { SimulationWrapper } from "./SimulationWrapper.js"; + +export class SimulationWrapperCosmo extends SimulationWrapper { + #nodeLinks; + + constructor(graphData) { + super(graphData); + this.config = { + nodeColor: (d) => d.color, + nodeSize: (d) => Math.pow(d.size, 1/2), + nodeSizeScale: 2, + linkWidth: 2, + fitViewOnInit: true, + linkArrows: false, + linkColor: [144, 144, 144, 1], + backgroundColor: [248, 250, 252, 1], + showTopLabels: false, + showDynamicLabels: false, + showHoveredNodeLabel: false, + renderHoveredNodeRing: false, + // showLabelsFor: [], + // nodeLabelAccessor: (d) => null, + // disableSimulation: true, + spaceSize: 128, + // fitViewDelay: 0, + }; + + this.firstLoad = true; + + const firstLink = this.graphData.links[0]; + const linkFirstColumnName = Object.keys(firstLink)[0]; + const linkSecondColumnName = Object.keys(firstLink)[1]; + + this.#nodeLinks = new Map(); + + this.links = this.graphData.links.map((link) => { + const source = String(link[linkFirstColumnName]); + const target = String(link[linkSecondColumnName]); + + if (this.#nodeLinks.get(source) == undefined) + this.#nodeLinks.set(source, []); + + if (this.#nodeLinks.get(target) == undefined) + this.#nodeLinks.set(target, []); + + const currentId = `${source}_${target}`; + + this.#nodeLinks.get(source).push({ + id: currentId, + fromId: source, + toId: target, + }); + + this.#nodeLinks.get(target).push({ + id: currentId, + fromId: source, + toId: target, + }); + + return { + id: currentId, + source: source, + target: target, + }; + }); + } + + start(containerElement, nodePositions) { + const firstNode = this.graphData.nodes[0]; + const nodeFirstColumnName = Object.keys(firstNode)[0]; + const nodePositionsEmpty = Object.keys(nodePositions).length <= 0; + + this.nodes = this.graphData.nodes.map((node) => { + const nodeId = String(node[nodeFirstColumnName]); + + const transformedNode = { + id: nodeId, + size: node.size || 5, + color: node.color || [0, 0, 0, 1], + component: node.component || null, + links: this.#nodeLinks.get(nodeId), + }; + + if (nodePositionsEmpty) { + transformedNode.x = node.initialX; + transformedNode.y = node.initialY; + } else { + const nodePos = nodePositions[nodeId]; + transformedNode.x = nodePos.x; + transformedNode.y = -nodePos.y; + } + + return transformedNode; + }); + + this.graph = new Cosmograph(containerElement, this.config); + this.graph.setData(this.nodes, this.links); + this.started = true; + this.graph.pause(); + } + + pause() { + this.graph.pause(); + } + + resume() { + if (this.firstLoad) { + this.graph.start(); + this.firstLoad = false; + } else { + this.graph.restart(); + } + } + + getNodePositions() { + const nodePositions = this.graph.getNodePositions(); + const transformedPositions = {}; + + Object.entries(nodePositions).forEach(([nodeId, pos]) => { + const transformedPosition = this.graph.spaceToScreenPosition([pos.x, pos.y]); + transformedPositions[nodeId] = { + x: transformedPosition[0], + y: transformedPosition[1], + }; + }); + + const numberOfNodes = this.nodes.length; + const centerX = Object.values(transformedPositions).reduce((acc, curr) => acc + curr.x, 0) / numberOfNodes; + const centerY = Object.values(transformedPositions).reduce((acc, curr) => acc + curr.y, 0) / numberOfNodes; + + Object.entries(transformedPositions).forEach(([nodeId, pos]) => { + transformedPositions[nodeId] = { + x: pos.x - centerX, + y: pos.y - centerY, + }; + }); + + return transformedPositions; + } + + forEachNode(fn) { + this.nodes.forEach(fn); + } + + forEachLink(fn) { + this.links.forEach(fn); + } + + updateLayoutSetting(settingId) { + return (e) => { + this.graph.setConfig({ [settingId]: + e.target.value }); + this.graph.start(); + } + } + + destroy() { + this.graph.remove(); + } +} diff --git a/srcjs/src/lib/SimulationWrapperViva.js b/srcjs/src/lib/SimulationWrapperViva.js new file mode 100644 index 0000000..2a5866a --- /dev/null +++ b/srcjs/src/lib/SimulationWrapperViva.js @@ -0,0 +1,173 @@ +import Viva from "vivagraphjs"; +import layoutSettings from "./layoutSettings.js"; +import { SimulationWrapper } from "./SimulationWrapper.js"; +import { + nodeLoadTransform, + linkLoadTransform, +} from "./customTransformFromRToViva"; + + +export class SimulationWrapperBase extends SimulationWrapper { + constructor(graphData) { + super(graphData); + this.graph = Viva.Graph.serializer().loadFromJSON( + graphData, + nodeLoadTransform(graphData), + linkLoadTransform(graphData), + ); + this.graphics = Viva.Graph.View.webglGraphics(); + + this.graphics.node(function (node) { + return Viva.Graph.View.webglSquare( + node.data.size || 10, + node.data.color || "#000000" + ); + }); + } + + start(containerElement, nodePositions) { + if (Object.keys(nodePositions).length > 0) { + this.graph.forEachNode((node) => { + const prevNodePosition = nodePositions[node.id]; + this.layout.setNodePosition(node.id, prevNodePosition.x, prevNodePosition.y); + }); + } else { + this.graph.forEachNode((node) => { + if (node.data.initialX) + this.layout.setNodePosition(node.id, node.data.initialX, node.data.initialY); + }); + } + + this.renderer = Viva.Graph.View.renderer(this.graph, { + layout: this.layout, + container: containerElement, + graphics: this.graphics, + renderLinks: true, + prerender: true, + }); + + this.renderer.run(); + this.started = true; + this.renderer.pause(); + + // const graphRect = this.layout.getGraphRect(); + // const layoutCenterX = (graphRect.x1 + graphRect.x2) / 2; + // const layoutCenterY = (graphRect.y1 + graphRect.y2) / 2; + // this.renderer.moveTo(layoutCenterX, layoutCenterY); + } + + pause() { + if (this.renderer) this.renderer.pause(); + } + + resume() { + this.renderer.resume(); + } + + getNodePositions() { + let nodePositions = {}; + this.graph.forEachNode((node) => { + let currPos = this.layout.getNodePosition(node.id); + nodePositions[node.id] = { + x: currPos.x, + y: currPos.y, + }; + }); + return nodePositions; + } + + forEachNode(fn) { + this.graph.forEachNode(fn); + } + + forEachLink(fn) { + this.graph.forEachLink(fn); + } + + updateLayoutSetting(settingId) { + throw new Error("Method 'updateLayoutSetting(settingId)' must be implemented."); + } + + destroy() { + // console.log('"destroying"'); + } +} + +export class SimulationWrapperViva extends SimulationWrapperBase { + #selectedLayout; + + constructor(graphData,) { + super(graphData); + + this.#selectedLayout = layoutSettings.find((l) => l.value === "viva"); + let settings = {}; + this.#selectedLayout.settings.forEach((setting) => { + settings[setting.id] = setting.value; + }); + this.layout = this.#selectedLayout.spec(this.graph, settings); + } + + updateLayoutSetting(settingId) { + return (e) => { + this.layout.simulator[settingId](e.target.value); + } + } +} + +export class SimulationWrapperD3 extends SimulationWrapperBase { + #selectedLayout; + + constructor(graphData,) { + super(graphData); + + this.#selectedLayout = layoutSettings.find((l) => l.value === "d3"); + let settings = {}; + this.#selectedLayout.settings.forEach((setting) => { + settings[setting.id] = setting.value; + }); + this.layout = this.#selectedLayout.spec(this.graph, settings); + } + + updateLayoutSetting(settingId) { + const acessor = { + alphaDecay: this.layout.simulator.alphaDecay, + velocityDecay: this.layout.simulator.velocityDecay, + + // Many-body force + chargeStrength: this.layout.simulator.force("charge").strength, + theta: this.layout.simulator.force("charge").theta, + distanceMin: this.layout.simulator.force("charge").distanceMin, + distanceMax: this.layout.simulator.force("charge").distanceMax, + + // Link force + linkDistance: this.layout.simulator.force("link").distance, + linkStrength: this.layout.simulator.force("link").strength, + linkIterations: this.layout.simulator.force("link").iterations, + + // Centering force + centerX: this.layout.simulator.force("center").x, + centerY: this.layout.simulator.force("center").y, + centerStrength: this.layout.simulator.force("center").strength, + + // Collision force + collisionRadius: this.layout.simulator.force("collide").radius, + collisionStrength: this.layout.simulator.force("collide").strength, + collisionIterations: this.layout.simulator.force("collide").iterations, + + // Positioning forces + x: this.layout.simulator.force("x").x, + y: this.layout.simulator.force("y").y, + xStrength: this.layout.simulator.force("x").strength, + yStrength: this.layout.simulator.force("y").strength, + + // Radial force + // radialRadius: this.layout.simulator.force("radial").radius, + // radialStrength: this.layout.simulator.force("radial").strength, + }; + + return (e) => { + acessor[settingId](e.target.value); + this.layout.simulator.alpha(1).restart(); + } + } +} diff --git a/srcjs/src/lib/forceLayoutD3.js b/srcjs/src/lib/forceLayoutD3.js index f965fe7..f8bb1a6 100644 --- a/srcjs/src/lib/forceLayoutD3.js +++ b/srcjs/src/lib/forceLayoutD3.js @@ -1,4 +1,12 @@ -import { forceSimulation, forceManyBody, forceLink } from 'd3-force'; +import { + forceSimulation, + forceManyBody, + forceLink, + forceCenter, + forceCollide, + forceX, + forceY, +} from 'd3-force'; // const settings = { // springLength : 20, @@ -32,19 +40,48 @@ export default function d3Layout(graph, settings) { linkIndexLookup.set(link.id, d3Link); }) - - var simulation = forceSimulation(nodes) - .alphaDecay(settings.alphaDecay) - .velocityDecay(settings.velocityDecay) - .force("charge", forceManyBody() - .strength(settings.strength)) - .force("link", forceLink(links) - .distance(settings.distance) - .iterations(settings.iterations) - // TODO: Slider could multiply accessor result - // d3js.org/d3-force/link#link_strength - // .strength(settings.springCoeff) - ); + + const fCharge = forceManyBody() + .strength(settings.chargeStrength) + .theta(settings.theta) + .distanceMin(settings.distanceMin) + .distanceMax(settings.distanceMax); + + const fLink = forceLink(links) + .distance(settings.linkDistance) + // .strength(settings.linkStrength) // TODO: slider could multiply accessor result + .iterations(settings.linkIterations); + + const fCenter = forceCenter() + .x(settings.centerX) + .y(settings.centerY) + .strength(settings.centerStrength); + + const fCollide = forceCollide() + .radius(settings.collisionRadius) + .strength(settings.collisionStrength); + + const fX = forceX() + .x(settings.x) + .strength(settings.xStrength); + + const fY = forceY() + .y(settings.y) + .strength(settings.yStrength); + + // const fRadial = forceRadial() + // .radius(settings.radialRadius) + // .strength(settings.radialStrength); + + const simulation = forceSimulation(nodes) + .alphaDecay(settings.alphaDecay) + .velocityDecay(settings.velocityDecay) + .force("charge", fCharge) + .force("link", fLink) + .force("center", fCenter) + .force("collide", fCollide) + .force("x", fX) + .force("y", fY); simulation.stop(); diff --git a/srcjs/src/lib/graphJSON.dev.js b/srcjs/src/lib/graphJSON.dev.js index ae0af93..343f0b5 100644 --- a/srcjs/src/lib/graphJSON.dev.js +++ b/srcjs/src/lib/graphJSON.dev.js @@ -1,6 +1,6 @@ const graphJSON = { nodes: [ - { "id": "1", "size": 20, "color": "#ff0000", "x": 123, "y": 123 }, + { "id": "1", "size": 20, "color": "#ff0000", "initialX": 123, "initialY": 123 }, { "id": "2", "size": 40, "color": "#00ff00" }, { "id": "3", "size": 5 }, { "id": "4", "color": "#0000ff" }, diff --git a/srcjs/src/lib/layoutSettings.js b/srcjs/src/lib/layoutSettings.js index 1e560fc..3c55b50 100644 --- a/srcjs/src/lib/layoutSettings.js +++ b/srcjs/src/lib/layoutSettings.js @@ -1,139 +1,366 @@ import forceLayoutViva from "./forceLayoutViva"; import forceLayoutD3 from "./forceLayoutD3"; -const effectorFn = (layout, id) => { - return (e) => { - layout.simulator[id](e.target.value); - } -}; - const layoutSettings = [ - { - "value": "viva", - "name": "@anvaka/VivaGraphJS", - "spec": forceLayoutViva, - "settings": [ - { - "id": "springLength", - "name": "Spring length", - "type": "range", - "min": 1, - "max": 100, - "step": 1, - "value": 100, - "effectorFn": effectorFn, - }, - { - "id": "springCoeff", - "name": "Spring coefficient", - "type": "range", - "min": 0.0001, - "max": 0.0025, - "step": 0.00001, - "value": 0.0002, - "effectorFn": effectorFn, - }, - { - "id": "dragCoeff", - "name": "Drag coefficient", - "type": "range", - "min": 0.01, - "max": 1, - "step": 0.01, - "value": 0.01, - "effectorFn": effectorFn, - }, - { - "id": "gravity", - "name": "Gravity", - "type": "range", - "min": -2, - "max": -0.1, - "step": 0.1, - "value": -0.4, - "effectorFn": effectorFn, // TODO: not updating during runtime - }, - { - "id": "timeStep", - "name": "Time step", - "type": "range", - "min": 1, - "max": 100, - "step": 1, - "value": 10, - "effectorFn": effectorFn, - }, - ], - }, - { - "value": "d3", - "name": "@d3/d3-force", - "spec": forceLayoutD3, - "settings": [ - { - "id": "alphaDecay", - "name": "Temperature decay", - "type": "range", - "min": 0, - "max": 1, - "step": 0.001, - "value": 0.0228, - "effectorFn": effectorFn, - }, - { - "id": "velocityDecay", - "name": "Velocity decay", - "type": "range", - "min": 0, - "max": 1, - "step": 0.01, - "value": 0.4, - "effectorFn": effectorFn, - }, - { - "id": "strength", - "name": "Node repulsion", - "type": "range", - "min": 0, - "max": 200, - "step": 0.1, - "value": 30, - "effectorFn": (layout, id) => { - return (e) => { - layout.simulator.force("charge")[id](-e.target.value); - } - }, - }, - { - "id": "distance", - "name": "Link distance", - "type": "range", - "min": 0, - "max": 100, - "step": 1, - "value": 30, - "effectorFn": (layout, id) => { - return (e) => { - layout.simulator.force("link")[id](e.target.value); - } - }, - }, - { - "id": "iterations", - "name": "Link rigidity", - "type": "range", - "min": 0, - "max": 200, - "step": 0.1, - "value": 30, - "effectorFn": (layout, id) => { - return (e) => { - layout.simulator.force("link")[id](e.target.value); - } - }, - }, - ], - }, + { + "value": "viva", + "name": "@anvaka/VivaGraphJS", + "spec": forceLayoutViva, + "settings": [ + { + "id": "springLength", + "name": "Spring length", + "type": "range", + "min": 1, + "max": 100, + "step": 1, + "value": 100, + "shown": true, + }, + { + "id": "springCoeff", + "name": "Spring coefficient", + "type": "range", + "min": 0.0001, + "max": 0.0025, + "step": 0.00001, + "value": 0.0002, + "shown": true, + }, + { + "id": "dragCoeff", + "name": "Drag coefficient", + "type": "range", + "min": 0.01, + "max": 1, + "step": 0.01, + "value": 0.01, + "shown": true, + }, + { + "id": "gravity", // TODO: not updating during runtime + "name": "Gravity", + "type": "range", + "min": -2, + "max": -0.1, + "step": 0.1, + "value": -0.2, + "shown": false, + }, + { + "id": "theta", // TODO: not updating during runtime + "name": "Theta", + "type": "range", + "min": 0, + "max": 1, + "step": 0.05, + "value": 0.8, + "shown": false, + }, + { + "id": "timeStep", + "name": "Time step", + "type": "range", + "min": 1, + "max": 100, + "step": 1, + "value": 10, + "shown": true, + }, + ], + }, + { + "value": "d3", + "name": "@d3/d3-force", + "spec": forceLayoutD3, + "settings": [ + { + "id": "alphaDecay", + "name": "Temperature decay", + "type": "range", + "min": 0, + "max": 1, + "step": 0.001, + "value": 0.0228, + "shown": false, + }, + { + "id": "velocityDecay", + "name": "Velocity decay", + "type": "range", + "min": 0, + "max": 1, + "step": 0.01, + "value": 0.4, + "shown": false, + }, + { + "id": "chargeStrength", + "name": "Node attraction", + "type": "range", + "min": -200, + "max": 50, + "step": 0.1, + "value": -30, + }, + { + "id": "theta", + "name": "Barnes–Hut approximation criterion", + "type": "range", + "min": 0, + "max": 1, + "step": 0.1, + "value": 0.8, + "shown": false, + }, + { + "id": "distanceMin", + "name": "distanceMin", + "type": "range", + "min": 1, + "max": 50, + "step": 1, + "value": 1, + "shown": true, + }, + { + "id": "distanceMax", + "name": "distanceMax", + "type": "range", + "min": 1, + "max": 2000, + "step": 1, + "value": 2000, + "shown": true, + }, + { + "id": "linkDistance", + "name": "Link distance", + "type": "range", + "min": 0, + "max": 100, + "step": 1, + "value": 30, + "shown": true, + }, + { + "id": "linkStrength", + "name": "Link distance", + "type": "range", + "min": 0, + "max": 100, + "step": 1, + "value": 30, + "shown": false, + }, + { + "id": "linkIterations", + "name": "Link rigidity", + "type": "range", + "min": 1, + "max": 10, + "step": 1, + "value": 1, + "shown": true, + },{ + "id": "centerX", + "name": "Center X", + "type": "range", + "min": -1000, // Adjust min/max based on your visualization needs + "max": 1000, + "step": 10, + "value": 0.5, + "shown": false, + }, + { + "id": "centerY", + "name": "Center Y", + "type": "range", + "min": -1000, + "max": 1000, + "step": 10, + "value": 0.5, + "shown": false, + }, + { + "id": "centerStrength", + "name": "Center strength", + "type": "range", + "min": -1000, + "max": 1000, + "step": 10, + "value": 1, + "shown": false, + }, + { + "id": "collisionRadius", + "name": "Collision Radius", + "type": "range", + "min": 1, + "max": 100, + "step": 1, + "value": 1, + "shown": true, + }, + { + "id": "collisionStrength", + "name": "Collision Strength", + "type": "range", + "min": 0, + "max": 1, + "step": 0.01, + "value": 0.7, + "shown": true, + }, + { + "id": "x", + "name": "Target X", + "type": "range", + "min": -1000, + "max": 1000, + "step": 10, + "value": 0.5, + "shown": false, + }, + { + "id": "y", + "name": "Target Y", + "type": "range", + "min": -1000, + "max": 1000, + "step": 10, + "value": 0.5, + "shown": false, + }, + { + "id": "xStrength", + "name": "Strength towards Target X", + "type": "range", + "min": 0, + "max": 1, + "step": 0.01, + "value": 0.1, + "shown": false, + }, + { + "id": "yStrength", + "name": "Strength towards Target Y", + "type": "range", + "min": 0, + "max": 1, + "step": 0.01, + "value": 0.1, + "shown": false, + }, + ], + }, + { + "value": "cosmo", + "name": "@cosmograph-org/cosmo", + "spec": null, + "settings": [ + { + "id": "simulationRepulsion", + "name": "Repulsion force coefficient", + "type": "range", + "min": 0.0, + "max": 2.0, + "step": 0.1, + "value": 0.1, + "shown": true, + }, + { + "id": "simulationRepulsionTheta", + "name": "Barnes–Hut theta", + "type": "range", + "min": 0.3, + "max": 2.0, + "step": 0.1, + "value": 1.7, + "shown": true, + }, + { + "id": "repulsionQuadtreeLevels", + "name": "Barnes–Hut approximation depth", + "type": "range", + "min": 5, + "max": 12, + "step": 1, + "value": 12, + "shown": false, + }, + { + "id": "simulationLinkSpring", + "name": "Spring coefficient", + "type": "range", + "min": 0.0, + "max": 2.0, + "step": 0.01, + "value": 1.0, + "shown": true, + }, + { + "id": "simulationLinkDistance", + "name": "Minimum link distance", + "type": "range", + "min": 1, + "max": 20, + "step": 1, + "value": 2, + "shown": true, + }, + { + "id": "simulationGravity", + "name": "Gravity coefficient", + "type": "range", + "min": 0.0, + "max": 1.0, + "step": 0.01, + "value": 0.0, + "shown": true, + }, + { + "id": "simulationCenter", + "name": "Centering force coefficient", + "type": "range", + "min": 0.0, + "max": 1.0, + "step": 0.01, + "value": 0.0, + "shown": true, + }, + { + "id": "simulationFriction", + "name": "Friction coefficient", + "type": "range", + "min": 0.8, + "max": 1.0, + "step": 0.01, + "value": 0.85, + "shown": true, + }, + { + "id": "simulationDecay", + "name": "Force simulation decay coefficient", + "type": "range", + "min": 100, + "max": 10000, + "step": 100, + "value": 10000, + "shown": true, + }, + { + "id": "repulsionFromMouse", + "name": "Repulsion from the mouse pointer force coefficient", + "type": "range", + "min": 0.0, + "max": 5.0, + "step": 0.1, + "value": 2.0, + "shown": false, + }, + ] + }, ] export default layoutSettings; \ No newline at end of file