diff --git a/_app/immutable/assets/0.BaH7aKf_.css b/_app/immutable/assets/0.BaH7aKf_.css deleted file mode 100644 index 9327329a6..000000000 --- a/_app/immutable/assets/0.BaH7aKf_.css +++ /dev/null @@ -1 +0,0 @@ -*,: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;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[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}[type=text],input:where(:not([type])),[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,input:where(:not([type])):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: #2563eb;--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:#2563eb}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}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){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:#2563eb;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: #2563eb;--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{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[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")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[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 solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.sticky{position:sticky}.top-0{top:0}.mx-0{margin-left:0;margin-right:0}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-1\.5{margin-top:.375rem;margin-bottom:.375rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-mb-1{margin-bottom:-.25rem}.-mb-1\.5{margin-bottom:-.375rem}.-mt-1{margin-top:-.25rem}.-mt-4{margin-top:-1rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-auto{margin-bottom:auto}.ml-4{margin-left:1rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.block{display:block}.flex{display:flex}.table{display:table}.contents{display:contents}.h-\[34rem\]{height:34rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-\[22\.5rem\]{width:22.5rem}.w-full{width:100%}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-\[76rem\]{max-width:76rem}.shrink-0{flex-shrink:0}.table-auto{table-layout:auto}.border-separate{border-collapse:separate}.border-spacing-0{--tw-border-spacing-x: 0px;--tw-border-spacing-y: 0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-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))}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-4{gap:1rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-1\.5{-moz-column-gap:.375rem;column-gap:.375rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-2{row-gap:.5rem}.gap-y-3{row-gap:.75rem}.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))}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.border{border-width:1px}.border-x{border-left-width:1px;border-right-width:1px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-ctgblue{--tw-border-opacity: 1;border-color:rgb(46 74 97 / var(--tw-border-opacity))}.border-ctgtan{--tw-border-opacity: 1;border-color:rgb(184 176 141 / var(--tw-border-opacity))}.border-slate-800{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity))}.border-slate-800\/25{border-color:#1e293b40}.border-b-slate-800{--tw-border-opacity: 1;border-bottom-color:rgb(30 41 59 / var(--tw-border-opacity))}.bg-ctgblue{--tw-bg-opacity: 1;background-color:rgb(46 74 97 / var(--tw-bg-opacity))}.bg-ctgorange{--tw-bg-opacity: 1;background-color:rgb(242 149 89 / var(--tw-bg-opacity))}.bg-ctgtan{--tw-bg-opacity: 1;background-color:rgb(184 176 141 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-red-900{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.p-1{padding:.25rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0{padding-top:0;padding-bottom:0}.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-3{padding-top:.75rem;padding-bottom:.75rem}.pb-0{padding-bottom:0}.pb-6{padding-bottom:1.5rem}.text-center{text-align:center}.text-right{text-align:right}.font-fira{font-family:Fira Sans,sans-serif}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.text-\[13px\]{font-size:13px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-50{--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.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)}@font-face{font-family:Fira Sans;font-style:italic;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-italic-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:italic;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-italic-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:italic;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-italic-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:italic;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-italic-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:normal;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:normal;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:normal;font-weight:500;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-medium-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:normal;font-weight:500;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-medium-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}.hover\:border-ctgblue:hover{--tw-border-opacity: 1;border-color:rgb(46 74 97 / var(--tw-border-opacity))}.hover\:border-slate-800:hover{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity))}.hover\:bg-ctgblue:hover{--tw-bg-opacity: 1;background-color:rgb(46 74 97 / var(--tw-bg-opacity))}.hover\:bg-ctgorange:hover{--tw-bg-opacity: 1;background-color:rgb(242 149 89 / var(--tw-bg-opacity))}.hover\:text-amber-200:hover{--tw-text-opacity: 1;color:rgb(253 230 138 / var(--tw-text-opacity))}.hover\:text-gray-50:hover{--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}@media (min-width: 640px){.sm\:flex-nowrap{flex-wrap:nowrap}}@media (min-width: 1024px){.lg\:mb-0{margin-bottom:0}.lg\:flex{display:flex}.lg\:w-1\/5{width:20%}.lg\:w-4\/5{width:80%}.lg\:w-96{width:24rem}.lg\:justify-start{justify-content:flex-start}}@media (min-width: 1280px){.xl\:w-1\/6{width:16.666667%}.xl\:w-5\/6{width:83.333333%}} diff --git a/_app/immutable/assets/0.eUnnmWwc.css b/_app/immutable/assets/0.eUnnmWwc.css new file mode 100644 index 000000000..3d8da1c23 --- /dev/null +++ b/_app/immutable/assets/0.eUnnmWwc.css @@ -0,0 +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}[type=text],input:where(:not([type])),[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,input:where(:not([type])):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: #2563eb;--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:#2563eb}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}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){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:#2563eb;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: #2563eb;--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{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[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")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[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 solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.sticky{position:sticky}.top-0{top:0}.mx-0{margin-left:0;margin-right:0}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-1\.5{margin-top:.375rem;margin-bottom:.375rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-mb-1{margin-bottom:-.25rem}.-mb-1\.5{margin-bottom:-.375rem}.-mt-1{margin-top:-.25rem}.-mt-4{margin-top:-1rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-auto{margin-bottom:auto}.ml-4{margin-left:1rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.block{display:block}.flex{display:flex}.table{display:table}.contents{display:contents}.h-\[34rem\]{height:34rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-\[22\.5rem\]{width:22.5rem}.w-full{width:100%}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-\[76rem\]{max-width:76rem}.shrink-0{flex-shrink:0}.table-auto{table-layout:auto}.border-separate{border-collapse:separate}.border-spacing-0{--tw-border-spacing-x: 0px;--tw-border-spacing-y: 0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-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))}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-4{gap:1rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-1\.5{-moz-column-gap:.375rem;column-gap:.375rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-2{row-gap:.5rem}.gap-y-3{row-gap:.75rem}.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))}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.border{border-width:1px}.border-x{border-left-width:1px;border-right-width:1px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-ctgblue{--tw-border-opacity: 1;border-color:rgb(46 74 97 / var(--tw-border-opacity))}.border-ctgtan{--tw-border-opacity: 1;border-color:rgb(184 176 141 / var(--tw-border-opacity))}.border-slate-800{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity))}.border-slate-800\/25{border-color:#1e293b40}.border-b-slate-800{--tw-border-opacity: 1;border-bottom-color:rgb(30 41 59 / var(--tw-border-opacity))}.bg-ctgblue{--tw-bg-opacity: 1;background-color:rgb(46 74 97 / var(--tw-bg-opacity))}.bg-ctgorange{--tw-bg-opacity: 1;background-color:rgb(242 149 89 / var(--tw-bg-opacity))}.bg-ctgtan{--tw-bg-opacity: 1;background-color:rgb(184 176 141 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-red-900{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.p-1{padding:.25rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0{padding-top:0;padding-bottom:0}.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-3{padding-top:.75rem;padding-bottom:.75rem}.pb-0{padding-bottom:0}.pb-6{padding-bottom:1.5rem}.text-center{text-align:center}.text-right{text-align:right}.font-fira{font-family:Fira Sans,sans-serif}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.text-\[13px\]{font-size:13px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-50{--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.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)}@font-face{font-family:Fira Sans;font-style:italic;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-italic-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:italic;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-italic-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:italic;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-italic-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:italic;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-italic-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:normal;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:normal;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:normal;font-weight:500;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-medium-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:normal;font-weight:500;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-medium-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}.hover\:border-ctgblue:hover{--tw-border-opacity: 1;border-color:rgb(46 74 97 / var(--tw-border-opacity))}.hover\:border-slate-800:hover{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity))}.hover\:bg-ctgblue:hover{--tw-bg-opacity: 1;background-color:rgb(46 74 97 / var(--tw-bg-opacity))}.hover\:bg-ctgorange:hover{--tw-bg-opacity: 1;background-color:rgb(242 149 89 / var(--tw-bg-opacity))}.hover\:text-amber-200:hover{--tw-text-opacity: 1;color:rgb(253 230 138 / var(--tw-text-opacity))}.hover\:text-gray-50:hover{--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}@media (min-width: 640px){.sm\:flex-nowrap{flex-wrap:nowrap}}@media (min-width: 1024px){.lg\:mb-0{margin-bottom:0}.lg\:flex{display:flex}.lg\:w-1\/5{width:20%}.lg\:w-4\/5{width:80%}.lg\:w-96{width:24rem}.lg\:justify-start{justify-content:flex-start}}@media (min-width: 1280px){.xl\:w-1\/6{width:16.666667%}.xl\:w-5\/6{width:83.333333%}} diff --git a/_app/immutable/assets/_layout.BaH7aKf_.css b/_app/immutable/assets/_layout.BaH7aKf_.css deleted file mode 100644 index 9327329a6..000000000 --- a/_app/immutable/assets/_layout.BaH7aKf_.css +++ /dev/null @@ -1 +0,0 @@ -*,: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;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[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}[type=text],input:where(:not([type])),[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,input:where(:not([type])):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: #2563eb;--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:#2563eb}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}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){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:#2563eb;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: #2563eb;--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{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[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")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[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 solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.sticky{position:sticky}.top-0{top:0}.mx-0{margin-left:0;margin-right:0}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-1\.5{margin-top:.375rem;margin-bottom:.375rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-mb-1{margin-bottom:-.25rem}.-mb-1\.5{margin-bottom:-.375rem}.-mt-1{margin-top:-.25rem}.-mt-4{margin-top:-1rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-auto{margin-bottom:auto}.ml-4{margin-left:1rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.block{display:block}.flex{display:flex}.table{display:table}.contents{display:contents}.h-\[34rem\]{height:34rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-\[22\.5rem\]{width:22.5rem}.w-full{width:100%}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-\[76rem\]{max-width:76rem}.shrink-0{flex-shrink:0}.table-auto{table-layout:auto}.border-separate{border-collapse:separate}.border-spacing-0{--tw-border-spacing-x: 0px;--tw-border-spacing-y: 0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-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))}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-4{gap:1rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-1\.5{-moz-column-gap:.375rem;column-gap:.375rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-2{row-gap:.5rem}.gap-y-3{row-gap:.75rem}.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))}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.border{border-width:1px}.border-x{border-left-width:1px;border-right-width:1px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-ctgblue{--tw-border-opacity: 1;border-color:rgb(46 74 97 / var(--tw-border-opacity))}.border-ctgtan{--tw-border-opacity: 1;border-color:rgb(184 176 141 / var(--tw-border-opacity))}.border-slate-800{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity))}.border-slate-800\/25{border-color:#1e293b40}.border-b-slate-800{--tw-border-opacity: 1;border-bottom-color:rgb(30 41 59 / var(--tw-border-opacity))}.bg-ctgblue{--tw-bg-opacity: 1;background-color:rgb(46 74 97 / var(--tw-bg-opacity))}.bg-ctgorange{--tw-bg-opacity: 1;background-color:rgb(242 149 89 / var(--tw-bg-opacity))}.bg-ctgtan{--tw-bg-opacity: 1;background-color:rgb(184 176 141 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-red-900{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.p-1{padding:.25rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0{padding-top:0;padding-bottom:0}.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-3{padding-top:.75rem;padding-bottom:.75rem}.pb-0{padding-bottom:0}.pb-6{padding-bottom:1.5rem}.text-center{text-align:center}.text-right{text-align:right}.font-fira{font-family:Fira Sans,sans-serif}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.text-\[13px\]{font-size:13px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-50{--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.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)}@font-face{font-family:Fira Sans;font-style:italic;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-italic-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:italic;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-italic-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:italic;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-italic-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:italic;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-italic-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:normal;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:normal;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:normal;font-weight:500;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-medium-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:normal;font-weight:500;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-medium-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}.hover\:border-ctgblue:hover{--tw-border-opacity: 1;border-color:rgb(46 74 97 / var(--tw-border-opacity))}.hover\:border-slate-800:hover{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity))}.hover\:bg-ctgblue:hover{--tw-bg-opacity: 1;background-color:rgb(46 74 97 / var(--tw-bg-opacity))}.hover\:bg-ctgorange:hover{--tw-bg-opacity: 1;background-color:rgb(242 149 89 / var(--tw-bg-opacity))}.hover\:text-amber-200:hover{--tw-text-opacity: 1;color:rgb(253 230 138 / var(--tw-text-opacity))}.hover\:text-gray-50:hover{--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}@media (min-width: 640px){.sm\:flex-nowrap{flex-wrap:nowrap}}@media (min-width: 1024px){.lg\:mb-0{margin-bottom:0}.lg\:flex{display:flex}.lg\:w-1\/5{width:20%}.lg\:w-4\/5{width:80%}.lg\:w-96{width:24rem}.lg\:justify-start{justify-content:flex-start}}@media (min-width: 1280px){.xl\:w-1\/6{width:16.666667%}.xl\:w-5\/6{width:83.333333%}} diff --git a/_app/immutable/assets/_layout.eUnnmWwc.css b/_app/immutable/assets/_layout.eUnnmWwc.css new file mode 100644 index 000000000..3d8da1c23 --- /dev/null +++ b/_app/immutable/assets/_layout.eUnnmWwc.css @@ -0,0 +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}[type=text],input:where(:not([type])),[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,input:where(:not([type])):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: #2563eb;--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:#2563eb}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}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){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:#2563eb;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: #2563eb;--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{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[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")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[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 solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.sticky{position:sticky}.top-0{top:0}.mx-0{margin-left:0;margin-right:0}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-1\.5{margin-top:.375rem;margin-bottom:.375rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-mb-1{margin-bottom:-.25rem}.-mb-1\.5{margin-bottom:-.375rem}.-mt-1{margin-top:-.25rem}.-mt-4{margin-top:-1rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-auto{margin-bottom:auto}.ml-4{margin-left:1rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.block{display:block}.flex{display:flex}.table{display:table}.contents{display:contents}.h-\[34rem\]{height:34rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-\[22\.5rem\]{width:22.5rem}.w-full{width:100%}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-\[76rem\]{max-width:76rem}.shrink-0{flex-shrink:0}.table-auto{table-layout:auto}.border-separate{border-collapse:separate}.border-spacing-0{--tw-border-spacing-x: 0px;--tw-border-spacing-y: 0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-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))}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-4{gap:1rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-1\.5{-moz-column-gap:.375rem;column-gap:.375rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-2{row-gap:.5rem}.gap-y-3{row-gap:.75rem}.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))}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.border{border-width:1px}.border-x{border-left-width:1px;border-right-width:1px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-ctgblue{--tw-border-opacity: 1;border-color:rgb(46 74 97 / var(--tw-border-opacity))}.border-ctgtan{--tw-border-opacity: 1;border-color:rgb(184 176 141 / var(--tw-border-opacity))}.border-slate-800{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity))}.border-slate-800\/25{border-color:#1e293b40}.border-b-slate-800{--tw-border-opacity: 1;border-bottom-color:rgb(30 41 59 / var(--tw-border-opacity))}.bg-ctgblue{--tw-bg-opacity: 1;background-color:rgb(46 74 97 / var(--tw-bg-opacity))}.bg-ctgorange{--tw-bg-opacity: 1;background-color:rgb(242 149 89 / var(--tw-bg-opacity))}.bg-ctgtan{--tw-bg-opacity: 1;background-color:rgb(184 176 141 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-red-900{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.p-1{padding:.25rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0{padding-top:0;padding-bottom:0}.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-3{padding-top:.75rem;padding-bottom:.75rem}.pb-0{padding-bottom:0}.pb-6{padding-bottom:1.5rem}.text-center{text-align:center}.text-right{text-align:right}.font-fira{font-family:Fira Sans,sans-serif}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.text-\[13px\]{font-size:13px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-50{--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.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)}@font-face{font-family:Fira Sans;font-style:italic;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-italic-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:italic;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-italic-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:italic;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-italic-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:italic;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-italic-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:normal;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:normal;font-weight:300;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-light-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-regular-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Sans;font-style:normal;font-weight:500;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-medium-latin-ext.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Sans;font-style:normal;font-weight:500;font-display:swap;src:url(/Closing-The-Gap-In-Non-Latin-Script-Data/fonts/fira-sans-medium-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}.hover\:border-ctgblue:hover{--tw-border-opacity: 1;border-color:rgb(46 74 97 / var(--tw-border-opacity))}.hover\:border-slate-800:hover{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity))}.hover\:bg-ctgblue:hover{--tw-bg-opacity: 1;background-color:rgb(46 74 97 / var(--tw-bg-opacity))}.hover\:bg-ctgorange:hover{--tw-bg-opacity: 1;background-color:rgb(242 149 89 / var(--tw-bg-opacity))}.hover\:text-amber-200:hover{--tw-text-opacity: 1;color:rgb(253 230 138 / var(--tw-text-opacity))}.hover\:text-gray-50:hover{--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}@media (min-width: 640px){.sm\:flex-nowrap{flex-wrap:nowrap}}@media (min-width: 1024px){.lg\:mb-0{margin-bottom:0}.lg\:flex{display:flex}.lg\:w-1\/5{width:20%}.lg\:w-4\/5{width:80%}.lg\:w-96{width:24rem}.lg\:justify-start{justify-content:flex-start}}@media (min-width: 1280px){.xl\:w-1\/6{width:16.666667%}.xl\:w-5\/6{width:83.333333%}} diff --git a/_app/immutable/chunks/entry.1DvTSu7v.js b/_app/immutable/chunks/entry.1DvTSu7v.js deleted file mode 100644 index bf7b0f106..000000000 --- a/_app/immutable/chunks/entry.1DvTSu7v.js +++ /dev/null @@ -1,3 +0,0 @@ -import{t as se,o as ce}from"./scheduler.kPUuJgHu.js";import{w as pt}from"./index.Dpzj3rtZ.js";new URL("sveltekit-internal://");function le(t,n){return t==="/"||n==="ignore"?t:n==="never"?t.endsWith("/")?t.slice(0,-1):t:n==="always"&&!t.endsWith("/")?t+"/":t}function fe(t){return t.split("%25").map(decodeURI).join("%25")}function ue(t){for(const n in t)t[n]=decodeURIComponent(t[n]);return t}function ct({href:t}){return t.split("#")[0]}const de=["href","pathname","search","toString","toJSON"];function he(t,n,e){const a=new URL(t);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(r,o){if(o==="get"||o==="getAll"||o==="has")return i=>(e(i),r[o](i));n();const s=Reflect.get(r,o);return typeof s=="function"?s.bind(r):s}}),enumerable:!0,configurable:!0});for(const r of de)Object.defineProperty(a,r,{get(){return n(),t[r]},enumerable:!0,configurable:!0});return a}const pe="/__data.json",ge=".html__data.json";function me(t){return t.endsWith(".html")?t.replace(/\.html$/,ge):t.replace(/\/$/,"")+pe}function _e(...t){let n=5381;for(const e of t)if(typeof e=="string"){let a=e.length;for(;a;)n=n*33^e.charCodeAt(--a)}else if(ArrayBuffer.isView(e)){const a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);let r=a.length;for(;r;)n=n*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(n>>>0).toString(36)}function ye(t){const n=atob(t),e=new Uint8Array(n.length);for(let a=0;a((t instanceof Request?t.method:(n==null?void 0:n.method)||"GET")!=="GET"&&q.delete(gt(t)),$t(t,n));const q=new Map;function we(t,n){const e=gt(t,n),a=document.querySelector(e);if(a!=null&&a.textContent){let{body:r,...o}=JSON.parse(a.textContent);const s=a.getAttribute("data-ttl");return s&&q.set(e,{body:r,init:o,ttl:1e3*Number(s)}),a.getAttribute("data-b64")!==null&&(r=ye(r)),Promise.resolve(new Response(r,o))}return window.fetch(t,n)}function ve(t,n,e){if(q.size>0){const a=gt(t,e),r=q.get(a);if(r){if(performance.now(){const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return n.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const o=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(o)return n.push({name:o[1],matcher:o[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const s=a.split(/\[(.+?)\](?!\])/);return"/"+s.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return lt(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return lt(String.fromCharCode(...c.slice(2).split("-").map(l=>parseInt(l,16))));const u=be.exec(c),[,h,g,d,_]=u;return n.push({name:d,matcher:_,optional:!!h,rest:!!g,chained:g?f===1&&s[0]==="":!1}),g?"(.*?)":h?"([^/]*)?":"([^/]+?)"}return lt(c)}).join("")}).join("")}/?$`),params:n}}function ke(t){return!/^\([^)]+\)$/.test(t)}function Se(t){return t.slice(1).split("/").filter(ke)}function Ae(t,n,e){const a={},r=t.slice(1),o=r.filter(i=>i!==void 0);let s=0;for(let i=0;iu).join("/"),s=0),f===void 0){c.rest&&(a[c.name]="");continue}if(!c.matcher||e[c.matcher](f)){a[c.name]=f;const u=n[i+1],h=r[i+1];u&&!u.rest&&u.optional&&h&&c.chained&&(s=0),!u&&!h&&Object.keys(a).length===o.length&&(s=0);continue}if(c.optional&&c.chained){s++;continue}return}if(!s)return a}function lt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Re({nodes:t,server_loads:n,dictionary:e,matchers:a}){const r=new Set(n);return Object.entries(e).map(([i,[c,f,u]])=>{const{pattern:h,params:g}=Ee(i),d={id:i,exec:_=>{const l=h.exec(_);if(l)return Ae(l,g,a)},errors:[1,...u||[]].map(_=>t[_]),layouts:[0,...f||[]].map(s),leaf:o(c)};return d.errors.length=d.layouts.length=Math.max(d.errors.length,d.layouts.length),d});function o(i){const c=i<0;return c&&(i=~i),[c,t[i]]}function s(i){return i===void 0?i:[r.has(i),t[i]]}}function Ct(t,n=JSON.parse){try{return n(sessionStorage[t])}catch{}}function It(t,n,e=JSON.stringify){const a=e(n);try{sessionStorage[t]=a}catch{}}var jt;const P=((jt=globalThis.__sveltekit_4ttq2i)==null?void 0:jt.base)??"/Closing-The-Gap-In-Non-Latin-Script-Data";var Dt;const Ie=((Dt=globalThis.__sveltekit_4ttq2i)==null?void 0:Dt.assets)??P,Le="1710411538828",Vt="sveltekit:snapshot",Ft="sveltekit:scroll",qt="sveltekit:states",Pe="sveltekit:pageurl",D="sveltekit:history",M="sveltekit:navigation",J={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},K=location.origin;function Gt(t){if(t instanceof URL)return t;let n=document.baseURI;if(!n){const e=document.getElementsByTagName("base");n=e.length?e[0].href:document.URL}return new URL(t,n)}function mt(){return{x:pageXOffset,y:pageYOffset}}function j(t,n){return t.getAttribute(`data-sveltekit-${n}`)}const Lt={...J,"":J.hover};function Mt(t){let n=t.assignedSlot??t.parentNode;return(n==null?void 0:n.nodeType)===11&&(n=n.host),n}function Ht(t,n){for(;t&&t!==n;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=Mt(t)}}function ut(t,n){let e;try{e=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI)}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,r=!e||!!a||nt(e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(e==null?void 0:e.origin)===K&&t.hasAttribute("download");return{url:e,external:r,target:a,download:o}}function W(t){let n=null,e=null,a=null,r=null,o=null,s=null,i=t;for(;i&&i!==document.documentElement;)a===null&&(a=j(i,"preload-code")),r===null&&(r=j(i,"preload-data")),n===null&&(n=j(i,"keepfocus")),e===null&&(e=j(i,"noscroll")),o===null&&(o=j(i,"reload")),s===null&&(s=j(i,"replacestate")),i=Mt(i);function c(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Lt[a??"off"],preload_data:Lt[r??"off"],keepfocus:c(n),noscroll:c(e),reload:c(o),replace_state:c(s)}}function Pt(t){const n=pt(t);let e=!0;function a(){e=!0,n.update(s=>s)}function r(s){e=!1,n.set(s)}function o(s){let i;return n.subscribe(c=>{(i===void 0||e&&c!==i)&&s(i=c)})}return{notify:a,set:r,subscribe:o}}function Te(){const{set:t,subscribe:n}=pt(!1);let e;async function a(){clearTimeout(e);try{const r=await fetch(`${Ie}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const s=(await r.json()).version!==Le;return s&&(t(!0),clearTimeout(e)),s}catch{return!1}}return{subscribe:n,check:a}}function nt(t,n){return t.origin!==K||!t.pathname.startsWith(n)}const xe=-1,Ue=-2,Ne=-3,Oe=-4,je=-5,De=-6;function $e(t,n){if(typeof t=="number")return r(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const e=t,a=Array(e.length);function r(o,s=!1){if(o===xe)return;if(o===Ne)return NaN;if(o===Oe)return 1/0;if(o===je)return-1/0;if(o===De)return-0;if(s)throw new Error("Invalid input");if(o in a)return a[o];const i=e[o];if(!i||typeof i!="object")a[o]=i;else if(Array.isArray(i))if(typeof i[0]=="string"){const c=i[0],f=n==null?void 0:n[c];if(f)return a[o]=f(r(i[1]));switch(c){case"Date":a[o]=new Date(i[1]);break;case"Set":const u=new Set;a[o]=u;for(let d=1;dn!=null)}class at{constructor(n,e){this.status=n,typeof e=="string"?this.body={message:e}:e?this.body=e:this.body={message:`Error: ${n}`}}toString(){return JSON.stringify(this.body)}}class Kt{constructor(n,e){this.status=n,this.location=e}}class _t extends Error{constructor(n,e,a){super(a),this.status=n,this.text=e}}const Fe="x-sveltekit-invalidated",qe="x-sveltekit-trailing-slash";function z(t){return t instanceof at||t instanceof _t?t.status:500}function Ge(t){return t instanceof _t?t.text:"Internal Error"}const O=Ct(Ft)??{},H=Ct(Vt)??{},x={url:Pt({}),page:Pt({}),navigating:pt(null),updated:Te()};function yt(t){O[t]=mt()}function Me(t,n){let e=t+1;for(;O[e];)delete O[e],e+=1;for(e=n+1;H[e];)delete H[e],e+=1}function C(t){return location.href=t.href,new Promise(()=>{})}function Tt(){}let rt,dt,X,T,ht,V;const Yt=[],Z=[];let R=null;const Jt=[],He=[];let N=[],y={branch:[],error:null,url:null},wt=!1,Q=!1,xt=!0,B=!1,F=!1,Wt=!1,vt=!1,bt,S,L,I,tt;const G=new Set;async function an(t,n,e){var r,o;document.URL!==location.href&&(location.href=location.href),V=t,rt=Re(t),T=document.documentElement,ht=n,dt=t.nodes[0],X=t.nodes[1],dt(),X(),S=(r=history.state)==null?void 0:r[D],L=(o=history.state)==null?void 0:o[M],S||(S=L=Date.now(),history.replaceState({...history.state,[D]:S,[M]:L},""));const a=O[S];a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y)),e?await Qe(ht,e):Xe(location.href,{replaceState:!0}),Ze()}function Be(){Yt.length=0,vt=!1}function zt(t){Z.some(n=>n==null?void 0:n.snapshot)&&(H[t]=Z.map(n=>{var e;return(e=n==null?void 0:n.snapshot)==null?void 0:e.capture()}))}function Xt(t){var n;(n=H[t])==null||n.forEach((e,a)=>{var r,o;(o=(r=Z[a])==null?void 0:r.snapshot)==null||o.restore(e)})}function Ut(){yt(S),It(Ft,O),zt(L),It(Vt,H)}async function Zt(t,n,e,a){return Y({type:"goto",url:Gt(t),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:e,nav_token:a,accept:()=>{n.invalidateAll&&(vt=!0)}})}async function Ke(t){if(t.id!==(R==null?void 0:R.id)){const n={};G.add(n),R={id:t.id,token:n,promise:te({...t,preload:n}).then(e=>(G.delete(n),e.type==="loaded"&&e.state.error&&(R=null),e))}}return R.promise}async function ft(t){const n=rt.find(e=>e.exec(ee(t)));n&&await Promise.all([...n.layouts,n.leaf].map(e=>e==null?void 0:e[1]()))}function Qt(t,n){var r;y=t.state;const e=document.querySelector("style[data-sveltekit]");e&&e.remove(),I=t.props.page,bt=new V.root({target:n,props:{...t.props,stores:x,components:Z},hydrate:!0}),Xt(L);const a={from:null,to:{params:y.params,route:{id:((r=y.route)==null?void 0:r.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};N.forEach(o=>o(a)),Q=!0}async function et({url:t,params:n,branch:e,status:a,error:r,route:o,form:s}){let i="never";if(P&&(t.pathname===P||t.pathname===P+"/"))i="always";else for(const d of e)(d==null?void 0:d.slash)!==void 0&&(i=d.slash);t.pathname=le(t.pathname,i),t.search=t.search;const c={type:"loaded",state:{url:t,params:n,branch:e,error:r,route:o},props:{constructors:Ve(e).map(d=>d.node.component),page:I}};s!==void 0&&(c.props.form=s);let f={},u=!I,h=0;for(let d=0;d(i&&(c.route=!0),l[m])}),params:new Proxy(a,{get:(l,m)=>(i&&c.params.add(m),l[m])}),data:(o==null?void 0:o.data)??null,url:he(e,()=>{i&&(c.url=!0)},l=>{i&&c.search_params.add(l)}),async fetch(l,m){let b;l instanceof Request?(b=l.url,m={body:l.method==="GET"||l.method==="HEAD"?void 0:await l.blob(),cache:l.cache,credentials:l.credentials,headers:l.headers,integrity:l.integrity,keepalive:l.keepalive,method:l.method,mode:l.mode,redirect:l.redirect,referrer:l.referrer,referrerPolicy:l.referrerPolicy,signal:l.signal,...m}):b=l;const A=new URL(b,e);return i&&d(A.href),A.origin===e.origin&&(b=A.href.slice(e.origin.length)),Q?ve(b,A.href,m):we(b,m)},setHeaders:()=>{},depends:d,parent(){return i&&(c.parent=!0),n()},untrack(l){i=!1;try{return l()}finally{i=!0}}};s=await f.universal.load.call(null,_)??null}return{node:f,loader:t,server:o,universal:(h=f.universal)!=null&&h.load?{type:"data",data:s,uses:c}:null,data:s??(o==null?void 0:o.data)??null,slash:((g=f.universal)==null?void 0:g.trailingSlash)??(o==null?void 0:o.slash)}}function Nt(t,n,e,a,r,o){if(vt)return!0;if(!r)return!1;if(r.parent&&t||r.route&&n||r.url&&e)return!0;for(const s of r.search_params)if(a.has(s))return!0;for(const s of r.params)if(o[s]!==y.params[s])return!0;for(const s of r.dependencies)if(Yt.some(i=>i(new URL(s))))return!0;return!1}function kt(t,n){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?n??null:null}function Ye(t,n){if(!t)return new Set(n.searchParams.keys());const e=new Set([...t.searchParams.keys(),...n.searchParams.keys()]);for(const a of e){const r=t.searchParams.getAll(a),o=n.searchParams.getAll(a);r.every(s=>o.includes(s))&&o.every(s=>r.includes(s))&&e.delete(a)}return e}function Ot({error:t,url:n,route:e,params:a}){return{type:"loaded",state:{error:t,url:n,route:e,params:a,branch:[]},props:{page:I,constructors:[]}}}async function te({id:t,invalidating:n,url:e,params:a,route:r,preload:o}){if((R==null?void 0:R.id)===t)return G.delete(R.token),R.promise;const{errors:s,layouts:i,leaf:c}=r,f=[...i,c];s.forEach(p=>p==null?void 0:p().catch(()=>{})),f.forEach(p=>p==null?void 0:p[1]().catch(()=>{}));let u=null;const h=y.url?t!==y.url.pathname+y.url.search:!1,g=y.route?r.id!==y.route.id:!1,d=Ye(y.url,e);let _=!1;const l=f.map((p,v)=>{var U;const E=y.branch[v],k=!!(p!=null&&p[0])&&((E==null?void 0:E.loader)!==p[1]||Nt(_,g,h,d,(U=E.server)==null?void 0:U.uses,a));return k&&(_=!0),k});if(l.some(Boolean)){try{u=await re(e,l)}catch(p){const v=await $(p,{url:e,params:a,route:{id:t}});return G.has(o)?Ot({error:v,url:e,params:a,route:r}):ot({status:z(p),error:v,url:e,route:r})}if(u.type==="redirect")return u}const m=u==null?void 0:u.nodes;let b=!1;const A=f.map(async(p,v)=>{var it;if(!p)return;const E=y.branch[v],k=m==null?void 0:m[v];if((!k||k.type==="skip")&&p[1]===(E==null?void 0:E.loader)&&!Nt(b,g,h,d,(it=E.universal)==null?void 0:it.uses,a))return E;if(b=!0,(k==null?void 0:k.type)==="error")throw k;return Et({loader:p[1],url:e,params:a,route:r,parent:async()=>{var Rt;const At={};for(let st=0;st{});const w=[];for(let p=0;pPromise.resolve({}),server_data_node:kt(o)}),c={node:await X(),loader:X,universal:null,server:null,data:null};return await et({url:e,params:r,branch:[i,c],status:t,error:n,route:null})}function St(t,n){if(!t||nt(t,P))return;let e;try{e=V.hooks.reroute({url:new URL(t)})??t.pathname}catch{return}const a=ee(e);for(const r of rt){const o=r.exec(a);if(o)return{id:t.pathname+t.search,invalidating:n,route:r,params:ue(o),url:t}}}function ee(t){return fe(t.slice(P.length)||"/")}function ne({url:t,type:n,intent:e,delta:a}){let r=!1;const o=ie(y,e,t,n);a!==void 0&&(o.navigation.delta=a);const s={...o.navigation,cancel:()=>{r=!0,o.reject(new Error("navigation cancelled"))}};return B||Jt.forEach(i=>i(s)),r?null:o}async function Y({type:t,url:n,popped:e,keepfocus:a,noscroll:r,replace_state:o,state:s={},redirect_count:i=0,nav_token:c={},accept:f=Tt,block:u=Tt}){const h=St(n,!1),g=ne({url:n,type:t,delta:e==null?void 0:e.delta,intent:h});if(!g){u();return}const d=S,_=L;f(),B=!0,Q&&x.navigating.set(g.navigation),tt=c;let l=h&&await te(h);if(!l){if(nt(n,P))return await C(n);l=await ae(n,{id:null},await $(new _t(404,"Not Found",`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404)}if(n=(h==null?void 0:h.url)||n,tt!==c)return g.reject(new Error("navigation aborted")),!1;if(l.type==="redirect")if(i>=20)l=await ot({status:500,error:await $(new Error("Redirect loop"),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}});else return Zt(new URL(l.location,n).href,{},i+1,c),!1;else l.props.page.status>=400&&await x.updated.check()&&await C(n);if(Be(),yt(d),zt(_),l.props.page.url.pathname!==n.pathname&&(n.pathname=l.props.page.url.pathname),s=e?e.state:s,!e){const w=o?0:1,p={[D]:S+=w,[M]:L+=w,[qt]:s};(o?history.replaceState:history.pushState).call(history,p,"",n),o||Me(S,L)}if(R=null,l.props.page.state=s,Q){y=l.state,l.props.page&&(l.props.page.url=n);const w=(await Promise.all(He.map(p=>p(g.navigation)))).filter(p=>typeof p=="function");if(w.length>0){let p=function(){N=N.filter(v=>!w.includes(v))};w.push(p),N.push(...w)}bt.$set(l.props),Wt=!0}else Qt(l,ht);const{activeElement:m}=document;await se();const b=e?e.scroll:r?mt():null;if(xt){const w=n.hash&&document.getElementById(decodeURIComponent(n.hash.slice(1)));b?scrollTo(b.x,b.y):w?w.scrollIntoView():scrollTo(0,0)}const A=document.activeElement!==m&&document.activeElement!==document.body;!a&&!A&&tn(),xt=!0,l.props.page&&(I=l.props.page),B=!1,t==="popstate"&&Xt(L),g.fulfil(void 0),N.forEach(w=>w(g.navigation)),x.navigating.set(null)}async function ae(t,n,e,a){return t.origin===K&&t.pathname===location.pathname&&!wt?await ot({status:a,error:e,url:t,route:n}):await C(t)}function We(){let t;T.addEventListener("mousemove",o=>{const s=o.target;clearTimeout(t),t=setTimeout(()=>{a(s,2)},20)});function n(o){a(o.composedPath()[0],1)}T.addEventListener("mousedown",n),T.addEventListener("touchstart",n,{passive:!0});const e=new IntersectionObserver(o=>{for(const s of o)s.isIntersecting&&(ft(s.target.href),e.unobserve(s.target))},{threshold:0});function a(o,s){const i=Ht(o,T);if(!i)return;const{url:c,external:f,download:u}=ut(i,P);if(f||u)return;const h=W(i);if(!h.reload)if(s<=h.preload_data){const g=St(c,!1);g&&Ke(g)}else s<=h.preload_code&&ft(c.pathname)}function r(){e.disconnect();for(const o of T.querySelectorAll("a")){const{url:s,external:i,download:c}=ut(o,P);if(i||c)continue;const f=W(o);f.reload||(f.preload_code===J.viewport&&e.observe(o),f.preload_code===J.eager&&ft(s.pathname))}}N.push(r),r()}function $(t,n){if(t instanceof at)return t.body;const e=z(t),a=Ge(t);return V.hooks.handleError({error:t,event:n,status:e,message:a})??{message:a}}function ze(t,n){ce(()=>(t.push(n),()=>{const e=t.indexOf(n);t.splice(e,1)}))}function rn(t){ze(N,t)}function Xe(t,n={}){return t=Gt(t),t.origin!==K?Promise.reject(new Error("goto: invalid URL")):Zt(t,n,0)}function Ze(){var n;history.scrollRestoration="manual",addEventListener("beforeunload",e=>{let a=!1;if(Ut(),!B){const r=ie(y,void 0,null,"leave"),o={...r.navigation,cancel:()=>{a=!0,r.reject(new Error("navigation cancelled"))}};Jt.forEach(s=>s(o))}a?(e.preventDefault(),e.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ut()}),(n=navigator.connection)!=null&&n.saveData||We(),T.addEventListener("click",e=>{var g;if(e.button||e.which!==1||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;const a=Ht(e.composedPath()[0],T);if(!a)return;const{url:r,external:o,target:s,download:i}=ut(a,P);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const c=W(a);if(!(a instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||i)return;if(o||c.reload){ne({url:r,type:"link"})?B=!0:e.preventDefault();return}const[u,h]=r.href.split("#");if(h!==void 0&&u===ct(location)){const[,d]=y.url.href.split("#");if(d===h){e.preventDefault(),h===""||h==="top"&&a.ownerDocument.getElementById("top")===null?window.scrollTo({top:0}):(g=a.ownerDocument.getElementById(h))==null||g.scrollIntoView();return}if(F=!0,yt(S),t(r),!c.replace_state)return;F=!1}e.preventDefault(),Y({type:"link",url:r,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??r.href===location.href})}),T.addEventListener("submit",e=>{if(e.defaultPrevented)return;const a=HTMLFormElement.prototype.cloneNode.call(e.target),r=e.submitter;if(((r==null?void 0:r.formMethod)||a.method)!=="get")return;const s=new URL((r==null?void 0:r.hasAttribute("formaction"))&&(r==null?void 0:r.formAction)||a.action);if(nt(s,P))return;const i=e.target,c=W(i);if(c.reload)return;e.preventDefault(),e.stopPropagation();const f=new FormData(i),u=r==null?void 0:r.getAttribute("name");u&&f.append(u,(r==null?void 0:r.getAttribute("value"))??""),s.search=new URLSearchParams(f).toString(),Y({type:"form",url:s,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??s.href===location.href})}),addEventListener("popstate",async e=>{var a;if((a=e.state)!=null&&a[D]){const r=e.state[D];if(tt={},r===S)return;const o=O[r],s=e.state[qt]??{},i=new URL(e.state[Pe]??location.href),c=e.state[M],f=ct(location)===ct(y.url);if(c===L&&(Wt||f)){t(i),O[S]=mt(),o&&scrollTo(o.x,o.y),s!==I.state&&(I={...I,state:s},bt.$set({page:I})),S=r;return}const h=r-S;await Y({type:"popstate",url:i,popped:{state:s,scroll:o,delta:h},accept:()=>{S=r,L=c},block:()=>{history.go(-h)},nav_token:tt})}else if(!F){const r=new URL(location.href);t(r)}}),addEventListener("hashchange",()=>{F&&(F=!1,history.replaceState({...history.state,[D]:++S,[M]:L},"",location.href))});for(const e of document.querySelectorAll("link"))e.rel==="icon"&&(e.href=e.href);addEventListener("pageshow",e=>{e.persisted&&x.navigating.set(null)});function t(e){y.url=e,x.page.set({...I,url:e}),x.page.notify()}}async function Qe(t,{status:n=200,error:e,node_ids:a,params:r,route:o,data:s,form:i}){wt=!0;const c=new URL(location.href);({params:r={},route:o={id:null}}=St(c,!1)||{});let f;try{const u=a.map(async(d,_)=>{const l=s[_];return l!=null&&l.uses&&(l.uses=oe(l.uses)),Et({loader:V.nodes[d],url:c,params:r,route:o,parent:async()=>{const m={};for(let b=0;b<_;b+=1)Object.assign(m,(await u[b]).data);return m},server_data_node:kt(l)})}),h=await Promise.all(u),g=rt.find(({id:d})=>d===o.id);if(g){const d=g.layouts;for(let _=0;_o?"1":"0").join(""));const a=await $t(e.href);if(!a.ok){let o;throw(r=a.headers.get("content-type"))!=null&&r.includes("application/json")?o=await a.json():a.status===404?o="Not Found":a.status===500&&(o="Internal Error"),new at(a.status,o)}return new Promise(async o=>{var h;const s=new Map,i=a.body.getReader(),c=new TextDecoder;function f(g){return $e(g,{Promise:d=>new Promise((_,l)=>{s.set(d,{fulfil:_,reject:l})})})}let u="";for(;;){const{done:g,value:d}=await i.read();if(g&&!u)break;for(u+=!d&&u?` -`:c.decode(d,{stream:!0});;){const _=u.indexOf(` -`);if(_===-1)break;const l=JSON.parse(u.slice(0,_));if(u=u.slice(_+1),l.type==="redirect")return o(l);if(l.type==="data")(h=l.nodes)==null||h.forEach(m=>{(m==null?void 0:m.type)==="data"&&(m.uses=oe(m.uses),m.data=f(m.data))}),o(l);else if(l.type==="chunk"){const{id:m,data:b,error:A}=l,w=s.get(m);s.delete(m),A?w.reject(f(A)):w.fulfil(f(b))}}}})}function oe(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}function tn(){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=document.body,e=n.getAttribute("tabindex");n.tabIndex=-1,n.focus({preventScroll:!0,focusVisible:!1}),e!==null?n.setAttribute("tabindex",e):n.removeAttribute("tabindex");const a=getSelection();if(a&&a.type!=="None"){const r=[];for(let o=0;o{if(a.rangeCount===r.length){for(let o=0;o{r=u,o=h});return s.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url},to:e&&{params:(n==null?void 0:n.params)??null,route:{id:((f=n==null?void 0:n.route)==null?void 0:f.id)??null},url:e},willUnload:!n,type:a,complete:s},fulfil:r,reject:o}}export{rn as a,P as b,an as c,x as s}; diff --git a/_app/immutable/chunks/entry.BG6Jkd3x.js b/_app/immutable/chunks/entry.BG6Jkd3x.js new file mode 100644 index 000000000..475ee311f --- /dev/null +++ b/_app/immutable/chunks/entry.BG6Jkd3x.js @@ -0,0 +1,3 @@ +import{t as ie,o as ce}from"./scheduler.kPUuJgHu.js";import{w as pt}from"./index.Dpzj3rtZ.js";new URL("sveltekit-internal://");function le(t,n){return t==="/"||n==="ignore"?t:n==="never"?t.endsWith("/")?t.slice(0,-1):t:n==="always"&&!t.endsWith("/")?t+"/":t}function fe(t){return t.split("%25").map(decodeURI).join("%25")}function ue(t){for(const n in t)t[n]=decodeURIComponent(t[n]);return t}function ct({href:t}){return t.split("#")[0]}const de=["href","pathname","search","toString","toJSON"];function he(t,n,e){const a=new URL(t);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(r,o){if(o==="get"||o==="getAll"||o==="has")return s=>(e(s),r[o](s));n();const i=Reflect.get(r,o);return typeof i=="function"?i.bind(r):i}}),enumerable:!0,configurable:!0});for(const r of de)Object.defineProperty(a,r,{get(){return n(),t[r]},enumerable:!0,configurable:!0});return a}const pe="/__data.json",ge=".html__data.json";function me(t){return t.endsWith(".html")?t.replace(/\.html$/,ge):t.replace(/\/$/,"")+pe}function _e(...t){let n=5381;for(const e of t)if(typeof e=="string"){let a=e.length;for(;a;)n=n*33^e.charCodeAt(--a)}else if(ArrayBuffer.isView(e)){const a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);let r=a.length;for(;r;)n=n*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(n>>>0).toString(36)}function ye(t){const n=atob(t),e=new Uint8Array(n.length);for(let a=0;a((t instanceof Request?t.method:(n==null?void 0:n.method)||"GET")!=="GET"&&q.delete(gt(t)),$t(t,n));const q=new Map;function we(t,n){const e=gt(t,n),a=document.querySelector(e);if(a!=null&&a.textContent){let{body:r,...o}=JSON.parse(a.textContent);const i=a.getAttribute("data-ttl");return i&&q.set(e,{body:r,init:o,ttl:1e3*Number(i)}),a.getAttribute("data-b64")!==null&&(r=ye(r)),Promise.resolve(new Response(r,o))}return window.fetch(t,n)}function ve(t,n,e){if(q.size>0){const a=gt(t,e),r=q.get(a);if(r){if(performance.now(){const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return n.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const o=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(o)return n.push({name:o[1],matcher:o[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const i=a.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return lt(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return lt(String.fromCharCode(...c.slice(2).split("-").map(l=>parseInt(l,16))));const u=be.exec(c),[,h,g,d,_]=u;return n.push({name:d,matcher:_,optional:!!h,rest:!!g,chained:g?f===1&&i[0]==="":!1}),g?"(.*?)":h?"([^/]*)?":"([^/]+?)"}return lt(c)}).join("")}).join("")}/?$`),params:n}}function ke(t){return!/^\([^)]+\)$/.test(t)}function Se(t){return t.slice(1).split("/").filter(ke)}function Ae(t,n,e){const a={},r=t.slice(1),o=r.filter(s=>s!==void 0);let i=0;for(let s=0;su).join("/"),i=0),f===void 0){c.rest&&(a[c.name]="");continue}if(!c.matcher||e[c.matcher](f)){a[c.name]=f;const u=n[s+1],h=r[s+1];u&&!u.rest&&u.optional&&h&&c.chained&&(i=0),!u&&!h&&Object.keys(a).length===o.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return a}function lt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Re({nodes:t,server_loads:n,dictionary:e,matchers:a}){const r=new Set(n);return Object.entries(e).map(([s,[c,f,u]])=>{const{pattern:h,params:g}=Ee(s),d={id:s,exec:_=>{const l=h.exec(_);if(l)return Ae(l,g,a)},errors:[1,...u||[]].map(_=>t[_]),layouts:[0,...f||[]].map(i),leaf:o(c)};return d.errors.length=d.layouts.length=Math.max(d.errors.length,d.layouts.length),d});function o(s){const c=s<0;return c&&(s=~s),[c,t[s]]}function i(s){return s===void 0?s:[r.has(s),t[s]]}}function Ct(t,n=JSON.parse){try{return n(sessionStorage[t])}catch{}}function It(t,n,e=JSON.stringify){const a=e(n);try{sessionStorage[t]=a}catch{}}var jt;const P=((jt=globalThis.__sveltekit_4rr3dq)==null?void 0:jt.base)??"/Closing-The-Gap-In-Non-Latin-Script-Data";var Dt;const Ie=((Dt=globalThis.__sveltekit_4rr3dq)==null?void 0:Dt.assets)??P,Le="1712398049472",Vt="sveltekit:snapshot",Ft="sveltekit:scroll",qt="sveltekit:states",Pe="sveltekit:pageurl",D="sveltekit:history",M="sveltekit:navigation",J={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},K=location.origin;function Gt(t){if(t instanceof URL)return t;let n=document.baseURI;if(!n){const e=document.getElementsByTagName("base");n=e.length?e[0].href:document.URL}return new URL(t,n)}function mt(){return{x:pageXOffset,y:pageYOffset}}function j(t,n){return t.getAttribute(`data-sveltekit-${n}`)}const Lt={...J,"":J.hover};function Mt(t){let n=t.assignedSlot??t.parentNode;return(n==null?void 0:n.nodeType)===11&&(n=n.host),n}function Ht(t,n){for(;t&&t!==n;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=Mt(t)}}function ut(t,n){let e;try{e=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI)}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,r=!e||!!a||nt(e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(e==null?void 0:e.origin)===K&&t.hasAttribute("download");return{url:e,external:r,target:a,download:o}}function W(t){let n=null,e=null,a=null,r=null,o=null,i=null,s=t;for(;s&&s!==document.documentElement;)a===null&&(a=j(s,"preload-code")),r===null&&(r=j(s,"preload-data")),n===null&&(n=j(s,"keepfocus")),e===null&&(e=j(s,"noscroll")),o===null&&(o=j(s,"reload")),i===null&&(i=j(s,"replacestate")),s=Mt(s);function c(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Lt[a??"off"],preload_data:Lt[r??"off"],keepfocus:c(n),noscroll:c(e),reload:c(o),replace_state:c(i)}}function Pt(t){const n=pt(t);let e=!0;function a(){e=!0,n.update(i=>i)}function r(i){e=!1,n.set(i)}function o(i){let s;return n.subscribe(c=>{(s===void 0||e&&c!==s)&&i(s=c)})}return{notify:a,set:r,subscribe:o}}function Te(){const{set:t,subscribe:n}=pt(!1);let e;async function a(){clearTimeout(e);try{const r=await fetch(`${Ie}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const i=(await r.json()).version!==Le;return i&&(t(!0),clearTimeout(e)),i}catch{return!1}}return{subscribe:n,check:a}}function nt(t,n){return t.origin!==K||!t.pathname.startsWith(n)}const xe=-1,Ue=-2,Ne=-3,Oe=-4,je=-5,De=-6;function $e(t,n){if(typeof t=="number")return r(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const e=t,a=Array(e.length);function r(o,i=!1){if(o===xe)return;if(o===Ne)return NaN;if(o===Oe)return 1/0;if(o===je)return-1/0;if(o===De)return-0;if(i)throw new Error("Invalid input");if(o in a)return a[o];const s=e[o];if(!s||typeof s!="object")a[o]=s;else if(Array.isArray(s))if(typeof s[0]=="string"){const c=s[0],f=n==null?void 0:n[c];if(f)return a[o]=f(r(s[1]));switch(c){case"Date":a[o]=new Date(s[1]);break;case"Set":const u=new Set;a[o]=u;for(let d=1;dn!=null)}class at{constructor(n,e){this.status=n,typeof e=="string"?this.body={message:e}:e?this.body=e:this.body={message:`Error: ${n}`}}toString(){return JSON.stringify(this.body)}}class Kt{constructor(n,e){this.status=n,this.location=e}}class _t extends Error{constructor(n,e,a){super(a),this.status=n,this.text=e}}const Fe="x-sveltekit-invalidated",qe="x-sveltekit-trailing-slash";function z(t){return t instanceof at||t instanceof _t?t.status:500}function Ge(t){return t instanceof _t?t.text:"Internal Error"}const O=Ct(Ft)??{},H=Ct(Vt)??{},x={url:Pt({}),page:Pt({}),navigating:pt(null),updated:Te()};function yt(t){O[t]=mt()}function Me(t,n){let e=t+1;for(;O[e];)delete O[e],e+=1;for(e=n+1;H[e];)delete H[e],e+=1}function C(t){return location.href=t.href,new Promise(()=>{})}function Tt(){}let rt,dt,X,T,ht,V;const Yt=[],Z=[];let R=null;const Jt=[],He=[];let N=[],y={branch:[],error:null,url:null},wt=!1,Q=!1,xt=!0,B=!1,F=!1,Wt=!1,vt=!1,bt,S,L,I,tt;const G=new Set;async function an(t,n,e){var r,o;document.URL!==location.href&&(location.href=location.href),V=t,rt=Re(t),T=document.documentElement,ht=n,dt=t.nodes[0],X=t.nodes[1],dt(),X(),S=(r=history.state)==null?void 0:r[D],L=(o=history.state)==null?void 0:o[M],S||(S=L=Date.now(),history.replaceState({...history.state,[D]:S,[M]:L},""));const a=O[S];a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y)),e?await Qe(ht,e):Xe(location.href,{replaceState:!0}),Ze()}function Be(){Yt.length=0,vt=!1}function zt(t){Z.some(n=>n==null?void 0:n.snapshot)&&(H[t]=Z.map(n=>{var e;return(e=n==null?void 0:n.snapshot)==null?void 0:e.capture()}))}function Xt(t){var n;(n=H[t])==null||n.forEach((e,a)=>{var r,o;(o=(r=Z[a])==null?void 0:r.snapshot)==null||o.restore(e)})}function Ut(){yt(S),It(Ft,O),zt(L),It(Vt,H)}async function Zt(t,n,e,a){return Y({type:"goto",url:Gt(t),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:e,nav_token:a,accept:()=>{n.invalidateAll&&(vt=!0)}})}async function Ke(t){if(t.id!==(R==null?void 0:R.id)){const n={};G.add(n),R={id:t.id,token:n,promise:te({...t,preload:n}).then(e=>(G.delete(n),e.type==="loaded"&&e.state.error&&(R=null),e))}}return R.promise}async function ft(t){const n=rt.find(e=>e.exec(ee(t)));n&&await Promise.all([...n.layouts,n.leaf].map(e=>e==null?void 0:e[1]()))}function Qt(t,n,e){var o;y=t.state;const a=document.querySelector("style[data-sveltekit]");a&&a.remove(),I=t.props.page,bt=new V.root({target:n,props:{...t.props,stores:x,components:Z},hydrate:e}),Xt(L);const r={from:null,to:{params:y.params,route:{id:((o=y.route)==null?void 0:o.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};N.forEach(i=>i(r)),Q=!0}async function et({url:t,params:n,branch:e,status:a,error:r,route:o,form:i}){let s="never";if(P&&(t.pathname===P||t.pathname===P+"/"))s="always";else for(const d of e)(d==null?void 0:d.slash)!==void 0&&(s=d.slash);t.pathname=le(t.pathname,s),t.search=t.search;const c={type:"loaded",state:{url:t,params:n,branch:e,error:r,route:o},props:{constructors:Ve(e).map(d=>d.node.component),page:I}};i!==void 0&&(c.props.form=i);let f={},u=!I,h=0;for(let d=0;d(s&&(c.route=!0),l[m])}),params:new Proxy(a,{get:(l,m)=>(s&&c.params.add(m),l[m])}),data:(o==null?void 0:o.data)??null,url:he(e,()=>{s&&(c.url=!0)},l=>{s&&c.search_params.add(l)}),async fetch(l,m){let b;l instanceof Request?(b=l.url,m={body:l.method==="GET"||l.method==="HEAD"?void 0:await l.blob(),cache:l.cache,credentials:l.credentials,headers:l.headers,integrity:l.integrity,keepalive:l.keepalive,method:l.method,mode:l.mode,redirect:l.redirect,referrer:l.referrer,referrerPolicy:l.referrerPolicy,signal:l.signal,...m}):b=l;const A=new URL(b,e);return s&&d(A.href),A.origin===e.origin&&(b=A.href.slice(e.origin.length)),Q?ve(b,A.href,m):we(b,m)},setHeaders:()=>{},depends:d,parent(){return s&&(c.parent=!0),n()},untrack(l){s=!1;try{return l()}finally{s=!0}}};i=await f.universal.load.call(null,_)??null}return{node:f,loader:t,server:o,universal:(h=f.universal)!=null&&h.load?{type:"data",data:i,uses:c}:null,data:i??(o==null?void 0:o.data)??null,slash:((g=f.universal)==null?void 0:g.trailingSlash)??(o==null?void 0:o.slash)}}function Nt(t,n,e,a,r,o){if(vt)return!0;if(!r)return!1;if(r.parent&&t||r.route&&n||r.url&&e)return!0;for(const i of r.search_params)if(a.has(i))return!0;for(const i of r.params)if(o[i]!==y.params[i])return!0;for(const i of r.dependencies)if(Yt.some(s=>s(new URL(i))))return!0;return!1}function kt(t,n){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?n??null:null}function Ye(t,n){if(!t)return new Set(n.searchParams.keys());const e=new Set([...t.searchParams.keys(),...n.searchParams.keys()]);for(const a of e){const r=t.searchParams.getAll(a),o=n.searchParams.getAll(a);r.every(i=>o.includes(i))&&o.every(i=>r.includes(i))&&e.delete(a)}return e}function Ot({error:t,url:n,route:e,params:a}){return{type:"loaded",state:{error:t,url:n,route:e,params:a,branch:[]},props:{page:I,constructors:[]}}}async function te({id:t,invalidating:n,url:e,params:a,route:r,preload:o}){if((R==null?void 0:R.id)===t)return G.delete(R.token),R.promise;const{errors:i,layouts:s,leaf:c}=r,f=[...s,c];i.forEach(p=>p==null?void 0:p().catch(()=>{})),f.forEach(p=>p==null?void 0:p[1]().catch(()=>{}));let u=null;const h=y.url?t!==y.url.pathname+y.url.search:!1,g=y.route?r.id!==y.route.id:!1,d=Ye(y.url,e);let _=!1;const l=f.map((p,v)=>{var U;const E=y.branch[v],k=!!(p!=null&&p[0])&&((E==null?void 0:E.loader)!==p[1]||Nt(_,g,h,d,(U=E.server)==null?void 0:U.uses,a));return k&&(_=!0),k});if(l.some(Boolean)){try{u=await re(e,l)}catch(p){const v=await $(p,{url:e,params:a,route:{id:t}});return G.has(o)?Ot({error:v,url:e,params:a,route:r}):ot({status:z(p),error:v,url:e,route:r})}if(u.type==="redirect")return u}const m=u==null?void 0:u.nodes;let b=!1;const A=f.map(async(p,v)=>{var st;if(!p)return;const E=y.branch[v],k=m==null?void 0:m[v];if((!k||k.type==="skip")&&p[1]===(E==null?void 0:E.loader)&&!Nt(b,g,h,d,(st=E.universal)==null?void 0:st.uses,a))return E;if(b=!0,(k==null?void 0:k.type)==="error")throw k;return Et({loader:p[1],url:e,params:a,route:r,parent:async()=>{var Rt;const At={};for(let it=0;it{});const w=[];for(let p=0;pPromise.resolve({}),server_data_node:kt(o)}),c={node:await X(),loader:X,universal:null,server:null,data:null};return await et({url:e,params:r,branch:[s,c],status:t,error:n,route:null})}function St(t,n){if(!t||nt(t,P))return;let e;try{e=V.hooks.reroute({url:new URL(t)})??t.pathname}catch{return}const a=ee(e);for(const r of rt){const o=r.exec(a);if(o)return{id:t.pathname+t.search,invalidating:n,route:r,params:ue(o),url:t}}}function ee(t){return fe(t.slice(P.length)||"/")}function ne({url:t,type:n,intent:e,delta:a}){let r=!1;const o=se(y,e,t,n);a!==void 0&&(o.navigation.delta=a);const i={...o.navigation,cancel:()=>{r=!0,o.reject(new Error("navigation cancelled"))}};return B||Jt.forEach(s=>s(i)),r?null:o}async function Y({type:t,url:n,popped:e,keepfocus:a,noscroll:r,replace_state:o,state:i={},redirect_count:s=0,nav_token:c={},accept:f=Tt,block:u=Tt}){const h=St(n,!1),g=ne({url:n,type:t,delta:e==null?void 0:e.delta,intent:h});if(!g){u();return}const d=S,_=L;f(),B=!0,Q&&x.navigating.set(g.navigation),tt=c;let l=h&&await te(h);if(!l){if(nt(n,P))return await C(n);l=await ae(n,{id:null},await $(new _t(404,"Not Found",`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404)}if(n=(h==null?void 0:h.url)||n,tt!==c)return g.reject(new Error("navigation aborted")),!1;if(l.type==="redirect")if(s>=20)l=await ot({status:500,error:await $(new Error("Redirect loop"),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}});else return Zt(new URL(l.location,n).href,{},s+1,c),!1;else l.props.page.status>=400&&await x.updated.check()&&await C(n);if(Be(),yt(d),zt(_),l.props.page.url.pathname!==n.pathname&&(n.pathname=l.props.page.url.pathname),i=e?e.state:i,!e){const w=o?0:1,p={[D]:S+=w,[M]:L+=w,[qt]:i};(o?history.replaceState:history.pushState).call(history,p,"",n),o||Me(S,L)}if(R=null,l.props.page.state=i,Q){y=l.state,l.props.page&&(l.props.page.url=n);const w=(await Promise.all(He.map(p=>p(g.navigation)))).filter(p=>typeof p=="function");if(w.length>0){let p=function(){N=N.filter(v=>!w.includes(v))};w.push(p),N.push(...w)}bt.$set(l.props),Wt=!0}else Qt(l,ht,!1);const{activeElement:m}=document;await ie();const b=e?e.scroll:r?mt():null;if(xt){const w=n.hash&&document.getElementById(decodeURIComponent(n.hash.slice(1)));b?scrollTo(b.x,b.y):w?w.scrollIntoView():scrollTo(0,0)}const A=document.activeElement!==m&&document.activeElement!==document.body;!a&&!A&&tn(),xt=!0,l.props.page&&(I=l.props.page),B=!1,t==="popstate"&&Xt(L),g.fulfil(void 0),N.forEach(w=>w(g.navigation)),x.navigating.set(null)}async function ae(t,n,e,a){return t.origin===K&&t.pathname===location.pathname&&!wt?await ot({status:a,error:e,url:t,route:n}):await C(t)}function We(){let t;T.addEventListener("mousemove",o=>{const i=o.target;clearTimeout(t),t=setTimeout(()=>{a(i,2)},20)});function n(o){a(o.composedPath()[0],1)}T.addEventListener("mousedown",n),T.addEventListener("touchstart",n,{passive:!0});const e=new IntersectionObserver(o=>{for(const i of o)i.isIntersecting&&(ft(i.target.href),e.unobserve(i.target))},{threshold:0});function a(o,i){const s=Ht(o,T);if(!s)return;const{url:c,external:f,download:u}=ut(s,P);if(f||u)return;const h=W(s);if(!h.reload)if(i<=h.preload_data){const g=St(c,!1);g&&Ke(g)}else i<=h.preload_code&&ft(c.pathname)}function r(){e.disconnect();for(const o of T.querySelectorAll("a")){const{url:i,external:s,download:c}=ut(o,P);if(s||c)continue;const f=W(o);f.reload||(f.preload_code===J.viewport&&e.observe(o),f.preload_code===J.eager&&ft(i.pathname))}}N.push(r),r()}function $(t,n){if(t instanceof at)return t.body;const e=z(t),a=Ge(t);return V.hooks.handleError({error:t,event:n,status:e,message:a})??{message:a}}function ze(t,n){ce(()=>(t.push(n),()=>{const e=t.indexOf(n);t.splice(e,1)}))}function rn(t){ze(N,t)}function Xe(t,n={}){return t=Gt(t),t.origin!==K?Promise.reject(new Error("goto: invalid URL")):Zt(t,n,0)}function Ze(){var n;history.scrollRestoration="manual",addEventListener("beforeunload",e=>{let a=!1;if(Ut(),!B){const r=se(y,void 0,null,"leave"),o={...r.navigation,cancel:()=>{a=!0,r.reject(new Error("navigation cancelled"))}};Jt.forEach(i=>i(o))}a?(e.preventDefault(),e.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ut()}),(n=navigator.connection)!=null&&n.saveData||We(),T.addEventListener("click",e=>{var g;if(e.button||e.which!==1||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;const a=Ht(e.composedPath()[0],T);if(!a)return;const{url:r,external:o,target:i,download:s}=ut(a,P);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=W(a);if(!(a instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;if(o||c.reload){ne({url:r,type:"link"})?B=!0:e.preventDefault();return}const[u,h]=r.href.split("#");if(h!==void 0&&u===ct(location)){const[,d]=y.url.href.split("#");if(d===h){e.preventDefault(),h===""||h==="top"&&a.ownerDocument.getElementById("top")===null?window.scrollTo({top:0}):(g=a.ownerDocument.getElementById(h))==null||g.scrollIntoView();return}if(F=!0,yt(S),t(r),!c.replace_state)return;F=!1}e.preventDefault(),Y({type:"link",url:r,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??r.href===location.href})}),T.addEventListener("submit",e=>{if(e.defaultPrevented)return;const a=HTMLFormElement.prototype.cloneNode.call(e.target),r=e.submitter;if(((r==null?void 0:r.formMethod)||a.method)!=="get")return;const i=new URL((r==null?void 0:r.hasAttribute("formaction"))&&(r==null?void 0:r.formAction)||a.action);if(nt(i,P))return;const s=e.target,c=W(s);if(c.reload)return;e.preventDefault(),e.stopPropagation();const f=new FormData(s),u=r==null?void 0:r.getAttribute("name");u&&f.append(u,(r==null?void 0:r.getAttribute("value"))??""),i.search=new URLSearchParams(f).toString(),Y({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href})}),addEventListener("popstate",async e=>{var a;if((a=e.state)!=null&&a[D]){const r=e.state[D];if(tt={},r===S)return;const o=O[r],i=e.state[qt]??{},s=new URL(e.state[Pe]??location.href),c=e.state[M],f=ct(location)===ct(y.url);if(c===L&&(Wt||f)){t(s),O[S]=mt(),o&&scrollTo(o.x,o.y),i!==I.state&&(I={...I,state:i},bt.$set({page:I})),S=r;return}const h=r-S;await Y({type:"popstate",url:s,popped:{state:i,scroll:o,delta:h},accept:()=>{S=r,L=c},block:()=>{history.go(-h)},nav_token:tt})}else if(!F){const r=new URL(location.href);t(r)}}),addEventListener("hashchange",()=>{F&&(F=!1,history.replaceState({...history.state,[D]:++S,[M]:L},"",location.href))});for(const e of document.querySelectorAll("link"))e.rel==="icon"&&(e.href=e.href);addEventListener("pageshow",e=>{e.persisted&&x.navigating.set(null)});function t(e){y.url=e,x.page.set({...I,url:e}),x.page.notify()}}async function Qe(t,{status:n=200,error:e,node_ids:a,params:r,route:o,data:i,form:s}){wt=!0;const c=new URL(location.href);({params:r={},route:o={id:null}}=St(c,!1)||{});let f;try{const u=a.map(async(d,_)=>{const l=i[_];return l!=null&&l.uses&&(l.uses=oe(l.uses)),Et({loader:V.nodes[d],url:c,params:r,route:o,parent:async()=>{const m={};for(let b=0;b<_;b+=1)Object.assign(m,(await u[b]).data);return m},server_data_node:kt(l)})}),h=await Promise.all(u),g=rt.find(({id:d})=>d===o.id);if(g){const d=g.layouts;for(let _=0;_o?"1":"0").join(""));const a=await $t(e.href);if(!a.ok){let o;throw(r=a.headers.get("content-type"))!=null&&r.includes("application/json")?o=await a.json():a.status===404?o="Not Found":a.status===500&&(o="Internal Error"),new at(a.status,o)}return new Promise(async o=>{var h;const i=new Map,s=a.body.getReader(),c=new TextDecoder;function f(g){return $e(g,{Promise:d=>new Promise((_,l)=>{i.set(d,{fulfil:_,reject:l})})})}let u="";for(;;){const{done:g,value:d}=await s.read();if(g&&!u)break;for(u+=!d&&u?` +`:c.decode(d,{stream:!0});;){const _=u.indexOf(` +`);if(_===-1)break;const l=JSON.parse(u.slice(0,_));if(u=u.slice(_+1),l.type==="redirect")return o(l);if(l.type==="data")(h=l.nodes)==null||h.forEach(m=>{(m==null?void 0:m.type)==="data"&&(m.uses=oe(m.uses),m.data=f(m.data))}),o(l);else if(l.type==="chunk"){const{id:m,data:b,error:A}=l,w=i.get(m);i.delete(m),A?w.reject(f(A)):w.fulfil(f(b))}}}})}function oe(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}function tn(){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=document.body,e=n.getAttribute("tabindex");n.tabIndex=-1,n.focus({preventScroll:!0,focusVisible:!1}),e!==null?n.setAttribute("tabindex",e):n.removeAttribute("tabindex");const a=getSelection();if(a&&a.type!=="None"){const r=[];for(let o=0;o{if(a.rangeCount===r.length){for(let o=0;o{r=u,o=h});return i.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url},to:e&&{params:(n==null?void 0:n.params)??null,route:{id:((f=n==null?void 0:n.route)==null?void 0:f.id)??null},url:e},willUnload:!n,type:a,complete:i},fulfil:r,reject:o}}export{rn as a,P as b,an as c,x as s}; diff --git a/_app/immutable/chunks/preload-helper.BQ24v_F8.js b/_app/immutable/chunks/preload-helper.BQ24v_F8.js deleted file mode 100644 index 31c270324..000000000 --- a/_app/immutable/chunks/preload-helper.BQ24v_F8.js +++ /dev/null @@ -1 +0,0 @@ -const d="modulepreload",m=function(a,l){return new URL(a,l).href},f={},E=function(l,i,c){let u=Promise.resolve();if(i&&i.length>0){const n=document.getElementsByTagName("link");u=Promise.all(i.map(e=>{if(e=m(e,c),e in f)return;f[e]=!0;const r=e.endsWith(".css"),h=r?'[rel="stylesheet"]':"";if(!!c)for(let s=n.length-1;s>=0;s--){const o=n[s];if(o.href===e&&(!r||o.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${e}"]${h}`))return;const t=document.createElement("link");if(t.rel=r?"stylesheet":d,r||(t.as="script",t.crossOrigin=""),t.href=e,document.head.appendChild(t),r)return new Promise((s,o)=>{t.addEventListener("load",s),t.addEventListener("error",()=>o(new Error(`Unable to preload CSS for ${e}`)))})}))}return u.then(()=>l()).catch(n=>{const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=n,window.dispatchEvent(e),!e.defaultPrevented)throw n})};export{E as _}; diff --git a/_app/immutable/chunks/preload-helper.D6kgxu3v.js b/_app/immutable/chunks/preload-helper.D6kgxu3v.js new file mode 100644 index 000000000..e9c408936 --- /dev/null +++ b/_app/immutable/chunks/preload-helper.D6kgxu3v.js @@ -0,0 +1 @@ +const v="modulepreload",y=function(a,l){return new URL(a,l).href},d={},w=function(l,c,u){let f=Promise.resolve();if(c&&c.length>0){const r=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),h=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));f=Promise.all(c.map(t=>{if(t=y(t,u),t in d)return;d[t]=!0;const s=t.endsWith(".css"),m=s?'[rel="stylesheet"]':"";if(!!u)for(let o=r.length-1;o>=0;o--){const i=r[o];if(i.href===t&&(!s||i.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${t}"]${m}`))return;const n=document.createElement("link");if(n.rel=s?"stylesheet":v,s||(n.as="script",n.crossOrigin=""),n.href=t,h&&n.setAttribute("nonce",h),document.head.appendChild(n),s)return new Promise((o,i)=>{n.addEventListener("load",o),n.addEventListener("error",()=>i(new Error(`Unable to preload CSS for ${t}`)))})}))}return f.then(()=>l()).catch(r=>{const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=r,window.dispatchEvent(e),!e.defaultPrevented)throw r})};export{w as _}; diff --git a/_app/immutable/chunks/stores.DDkG-L5E.js b/_app/immutable/chunks/stores.BzntDiba.js similarity index 72% rename from _app/immutable/chunks/stores.DDkG-L5E.js rename to _app/immutable/chunks/stores.BzntDiba.js index f4aa02cc9..29147bbdf 100644 --- a/_app/immutable/chunks/stores.DDkG-L5E.js +++ b/_app/immutable/chunks/stores.BzntDiba.js @@ -1 +1 @@ -import{s as e}from"./entry.1DvTSu7v.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p}; +import{s as e}from"./entry.BG6Jkd3x.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p}; diff --git a/_app/immutable/entry/app.C1vQAsRk.js b/_app/immutable/entry/app.B2yfCCKL.js similarity index 80% rename from _app/immutable/entry/app.C1vQAsRk.js rename to _app/immutable/entry/app.B2yfCCKL.js index 3c5a8f041..30acad45c 100644 --- a/_app/immutable/entry/app.C1vQAsRk.js +++ b/_app/immutable/entry/app.B2yfCCKL.js @@ -1,7 +1,7 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["../nodes/0.aOW80DIr.js","../chunks/scheduler.kPUuJgHu.js","../chunks/index.CYrHsBOq.js","../chunks/entry.1DvTSu7v.js","../chunks/index.Dpzj3rtZ.js","../chunks/stores.DDkG-L5E.js","../assets/0.BaH7aKf_.css","../nodes/1.CaSIGmoy.js","../nodes/2.CMJBNSYY.js","../chunks/each.D6YF6ztN.js","../chunks/utils.kS56dN66.js","../chunks/ENTRIES.B8oTZR8-.js","../nodes/3.D3Py6qqR.js","../nodes/4.DGZO03kB.js","../chunks/globals.D0QH3NT1.js","../nodes/5.F-ngw3cO.js","../nodes/6.DRjXiQVp.js","../chunks/preload-helper.BQ24v_F8.js","../assets/6.jCI8mrZJ.css","../nodes/7.YYAwZ01d.js","../nodes/8.BdTXSc0t.js","../chunks/_commonjsHelpers.Cpj98o6Y.js"] + __vite__mapDeps.viteFileDeps = ["../nodes/0.D4zn0ymL.js","../chunks/scheduler.kPUuJgHu.js","../chunks/index.CYrHsBOq.js","../chunks/entry.BG6Jkd3x.js","../chunks/index.Dpzj3rtZ.js","../chunks/stores.BzntDiba.js","../assets/0.eUnnmWwc.css","../nodes/1.Jgj0K9e6.js","../nodes/2.CAAVRP3F.js","../chunks/each.D6YF6ztN.js","../chunks/utils.kS56dN66.js","../chunks/ENTRIES.B8oTZR8-.js","../nodes/3.D3Py6qqR.js","../nodes/4.DGZO03kB.js","../chunks/globals.D0QH3NT1.js","../nodes/5.F-ngw3cO.js","../nodes/6.BWudGx52.js","../chunks/preload-helper.D6kgxu3v.js","../assets/6.jCI8mrZJ.css","../nodes/7.YYAwZ01d.js","../nodes/8.D-fQwb2A.js","../chunks/_commonjsHelpers.Cpj98o6Y.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } -import{_ as m}from"../chunks/preload-helper.BQ24v_F8.js";import{s as S,d as j,o as z,b as R,t as B}from"../chunks/scheduler.kPUuJgHu.js";import{S as C,i as M,s as U,o as d,f as F,g as b,q as h,r as I,u as g,d as w,e as G,c as H,a as J,m as V,v as p,t as K,b as Q,j as W,w as P,x as k,y as v,z as L,A,B as D}from"../chunks/index.CYrHsBOq.js";const nt={};function X(o){let t,i,n;var r=o[1][0];function c(e,s){return{props:{data:e[3],form:e[2]}}}return r&&(t=k(r,c(o)),o[12](t)),{c(){t&&v(t.$$.fragment),i=d()},l(e){t&&L(t.$$.fragment,e),i=d()},m(e,s){t&&A(t,e,s),b(e,i,s),n=!0},p(e,s){if(s&2&&r!==(r=e[1][0])){if(t){P();const a=t;h(a.$$.fragment,1,0,()=>{D(a,1)}),I()}r?(t=k(r,c(e)),e[12](t),v(t.$$.fragment),g(t.$$.fragment,1),A(t,i.parentNode,i)):t=null}else if(r){const a={};s&8&&(a.data=e[3]),s&4&&(a.form=e[2]),t.$set(a)}},i(e){n||(t&&g(t.$$.fragment,e),n=!0)},o(e){t&&h(t.$$.fragment,e),n=!1},d(e){e&&w(i),o[12](null),t&&D(t,e)}}}function Y(o){let t,i,n;var r=o[1][0];function c(e,s){return{props:{data:e[3],$$slots:{default:[Z]},$$scope:{ctx:e}}}}return r&&(t=k(r,c(o)),o[11](t)),{c(){t&&v(t.$$.fragment),i=d()},l(e){t&&L(t.$$.fragment,e),i=d()},m(e,s){t&&A(t,e,s),b(e,i,s),n=!0},p(e,s){if(s&2&&r!==(r=e[1][0])){if(t){P();const a=t;h(a.$$.fragment,1,0,()=>{D(a,1)}),I()}r?(t=k(r,c(e)),e[11](t),v(t.$$.fragment),g(t.$$.fragment,1),A(t,i.parentNode,i)):t=null}else if(r){const a={};s&8&&(a.data=e[3]),s&8215&&(a.$$scope={dirty:s,ctx:e}),t.$set(a)}},i(e){n||(t&&g(t.$$.fragment,e),n=!0)},o(e){t&&h(t.$$.fragment,e),n=!1},d(e){e&&w(i),o[11](null),t&&D(t,e)}}}function Z(o){let t,i,n;var r=o[1][1];function c(e,s){return{props:{data:e[4],form:e[2]}}}return r&&(t=k(r,c(o)),o[10](t)),{c(){t&&v(t.$$.fragment),i=d()},l(e){t&&L(t.$$.fragment,e),i=d()},m(e,s){t&&A(t,e,s),b(e,i,s),n=!0},p(e,s){if(s&2&&r!==(r=e[1][1])){if(t){P();const a=t;h(a.$$.fragment,1,0,()=>{D(a,1)}),I()}r?(t=k(r,c(e)),e[10](t),v(t.$$.fragment),g(t.$$.fragment,1),A(t,i.parentNode,i)):t=null}else if(r){const a={};s&16&&(a.data=e[4]),s&4&&(a.form=e[2]),t.$set(a)}},i(e){n||(t&&g(t.$$.fragment,e),n=!0)},o(e){t&&h(t.$$.fragment,e),n=!1},d(e){e&&w(i),o[10](null),t&&D(t,e)}}}function O(o){let t,i=o[6]&&T(o);return{c(){t=G("div"),i&&i.c(),this.h()},l(n){t=H(n,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var r=J(t);i&&i.l(r),r.forEach(w),this.h()},h(){V(t,"id","svelte-announcer"),V(t,"aria-live","assertive"),V(t,"aria-atomic","true"),p(t,"position","absolute"),p(t,"left","0"),p(t,"top","0"),p(t,"clip","rect(0 0 0 0)"),p(t,"clip-path","inset(50%)"),p(t,"overflow","hidden"),p(t,"white-space","nowrap"),p(t,"width","1px"),p(t,"height","1px")},m(n,r){b(n,t,r),i&&i.m(t,null)},p(n,r){n[6]?i?i.p(n,r):(i=T(n),i.c(),i.m(t,null)):i&&(i.d(1),i=null)},d(n){n&&w(t),i&&i.d()}}}function T(o){let t;return{c(){t=K(o[7])},l(i){t=Q(i,o[7])},m(i,n){b(i,t,n)},p(i,n){n&128&&W(t,i[7])},d(i){i&&w(t)}}}function $(o){let t,i,n,r,c;const e=[Y,X],s=[];function a(_,u){return _[1][1]?0:1}t=a(o),i=s[t]=e[t](o);let l=o[5]&&O(o);return{c(){i.c(),n=U(),l&&l.c(),r=d()},l(_){i.l(_),n=F(_),l&&l.l(_),r=d()},m(_,u){s[t].m(_,u),b(_,n,u),l&&l.m(_,u),b(_,r,u),c=!0},p(_,[u]){let E=t;t=a(_),t===E?s[t].p(_,u):(P(),h(s[E],1,1,()=>{s[E]=null}),I(),i=s[t],i?i.p(_,u):(i=s[t]=e[t](_),i.c()),g(i,1),i.m(n.parentNode,n)),_[5]?l?l.p(_,u):(l=O(_),l.c(),l.m(r.parentNode,r)):l&&(l.d(1),l=null)},i(_){c||(g(i),c=!0)},o(_){h(i),c=!1},d(_){_&&(w(n),w(r)),s[t].d(_),l&&l.d(_)}}}function x(o,t,i){let{stores:n}=t,{page:r}=t,{constructors:c}=t,{components:e=[]}=t,{form:s}=t,{data_0:a=null}=t,{data_1:l=null}=t;j(n.page.notify);let _=!1,u=!1,E=null;z(()=>{const f=n.page.subscribe(()=>{_&&(i(6,u=!0),B().then(()=>{i(7,E=document.title||"untitled page")}))});return i(5,_=!0),f});function y(f){R[f?"unshift":"push"](()=>{e[1]=f,i(0,e)})}function N(f){R[f?"unshift":"push"](()=>{e[0]=f,i(0,e)})}function q(f){R[f?"unshift":"push"](()=>{e[0]=f,i(0,e)})}return o.$$set=f=>{"stores"in f&&i(8,n=f.stores),"page"in f&&i(9,r=f.page),"constructors"in f&&i(1,c=f.constructors),"components"in f&&i(0,e=f.components),"form"in f&&i(2,s=f.form),"data_0"in f&&i(3,a=f.data_0),"data_1"in f&&i(4,l=f.data_1)},o.$$.update=()=>{o.$$.dirty&768&&n.page.set(r)},[e,c,s,a,l,_,u,E,n,r,y,N,q]}class rt extends C{constructor(t){super(),M(this,t,x,$,S,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const st=[()=>m(()=>import("../nodes/0.aOW80DIr.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),()=>m(()=>import("../nodes/1.CaSIGmoy.js"),__vite__mapDeps([7,1,2,5,3,4]),import.meta.url),()=>m(()=>import("../nodes/2.CMJBNSYY.js"),__vite__mapDeps([8,1,2,9,3,4,10,11]),import.meta.url),()=>m(()=>import("../nodes/3.D3Py6qqR.js"),__vite__mapDeps([12,1,2]),import.meta.url),()=>m(()=>import("../nodes/4.DGZO03kB.js"),__vite__mapDeps([13,1,2,14]),import.meta.url),()=>m(()=>import("../nodes/5.F-ngw3cO.js"),__vite__mapDeps([15,1,2,14,9,11]),import.meta.url),()=>m(()=>import("../nodes/6.DRjXiQVp.js"),__vite__mapDeps([16,17,1,2,10,4,11,18]),import.meta.url),()=>m(()=>import("../nodes/7.YYAwZ01d.js"),__vite__mapDeps([19,1,2,9,11]),import.meta.url),()=>m(()=>import("../nodes/8.BdTXSc0t.js"),__vite__mapDeps([20,1,2,21]),import.meta.url)],ot=[],at={"/":[2],"/about":[3],"/contribute":[4],"/entry":[5],"/map":[6],"/timeline":[7],"/visualisations":[8]},_t={handleError:({error:o})=>{console.error(o)},reroute:()=>{}};export{at as dictionary,_t as hooks,nt as matchers,st as nodes,rt as root,ot as server_loads}; +import{_ as m}from"../chunks/preload-helper.D6kgxu3v.js";import{s as S,d as j,o as z,b as R,t as B}from"../chunks/scheduler.kPUuJgHu.js";import{S as C,i as M,s as U,o as d,f as F,g as b,q as h,r as I,u as g,d as w,e as G,c as H,a as J,m as V,v as p,t as K,b as Q,j as W,w as P,x as k,y as v,z as L,A,B as D}from"../chunks/index.CYrHsBOq.js";const nt={};function X(o){let t,i,n;var r=o[1][0];function c(e,s){return{props:{data:e[3],form:e[2]}}}return r&&(t=k(r,c(o)),o[12](t)),{c(){t&&v(t.$$.fragment),i=d()},l(e){t&&L(t.$$.fragment,e),i=d()},m(e,s){t&&A(t,e,s),b(e,i,s),n=!0},p(e,s){if(s&2&&r!==(r=e[1][0])){if(t){P();const a=t;h(a.$$.fragment,1,0,()=>{D(a,1)}),I()}r?(t=k(r,c(e)),e[12](t),v(t.$$.fragment),g(t.$$.fragment,1),A(t,i.parentNode,i)):t=null}else if(r){const a={};s&8&&(a.data=e[3]),s&4&&(a.form=e[2]),t.$set(a)}},i(e){n||(t&&g(t.$$.fragment,e),n=!0)},o(e){t&&h(t.$$.fragment,e),n=!1},d(e){e&&w(i),o[12](null),t&&D(t,e)}}}function Y(o){let t,i,n;var r=o[1][0];function c(e,s){return{props:{data:e[3],$$slots:{default:[Z]},$$scope:{ctx:e}}}}return r&&(t=k(r,c(o)),o[11](t)),{c(){t&&v(t.$$.fragment),i=d()},l(e){t&&L(t.$$.fragment,e),i=d()},m(e,s){t&&A(t,e,s),b(e,i,s),n=!0},p(e,s){if(s&2&&r!==(r=e[1][0])){if(t){P();const a=t;h(a.$$.fragment,1,0,()=>{D(a,1)}),I()}r?(t=k(r,c(e)),e[11](t),v(t.$$.fragment),g(t.$$.fragment,1),A(t,i.parentNode,i)):t=null}else if(r){const a={};s&8&&(a.data=e[3]),s&8215&&(a.$$scope={dirty:s,ctx:e}),t.$set(a)}},i(e){n||(t&&g(t.$$.fragment,e),n=!0)},o(e){t&&h(t.$$.fragment,e),n=!1},d(e){e&&w(i),o[11](null),t&&D(t,e)}}}function Z(o){let t,i,n;var r=o[1][1];function c(e,s){return{props:{data:e[4],form:e[2]}}}return r&&(t=k(r,c(o)),o[10](t)),{c(){t&&v(t.$$.fragment),i=d()},l(e){t&&L(t.$$.fragment,e),i=d()},m(e,s){t&&A(t,e,s),b(e,i,s),n=!0},p(e,s){if(s&2&&r!==(r=e[1][1])){if(t){P();const a=t;h(a.$$.fragment,1,0,()=>{D(a,1)}),I()}r?(t=k(r,c(e)),e[10](t),v(t.$$.fragment),g(t.$$.fragment,1),A(t,i.parentNode,i)):t=null}else if(r){const a={};s&16&&(a.data=e[4]),s&4&&(a.form=e[2]),t.$set(a)}},i(e){n||(t&&g(t.$$.fragment,e),n=!0)},o(e){t&&h(t.$$.fragment,e),n=!1},d(e){e&&w(i),o[10](null),t&&D(t,e)}}}function O(o){let t,i=o[6]&&T(o);return{c(){t=G("div"),i&&i.c(),this.h()},l(n){t=H(n,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var r=J(t);i&&i.l(r),r.forEach(w),this.h()},h(){V(t,"id","svelte-announcer"),V(t,"aria-live","assertive"),V(t,"aria-atomic","true"),p(t,"position","absolute"),p(t,"left","0"),p(t,"top","0"),p(t,"clip","rect(0 0 0 0)"),p(t,"clip-path","inset(50%)"),p(t,"overflow","hidden"),p(t,"white-space","nowrap"),p(t,"width","1px"),p(t,"height","1px")},m(n,r){b(n,t,r),i&&i.m(t,null)},p(n,r){n[6]?i?i.p(n,r):(i=T(n),i.c(),i.m(t,null)):i&&(i.d(1),i=null)},d(n){n&&w(t),i&&i.d()}}}function T(o){let t;return{c(){t=K(o[7])},l(i){t=Q(i,o[7])},m(i,n){b(i,t,n)},p(i,n){n&128&&W(t,i[7])},d(i){i&&w(t)}}}function $(o){let t,i,n,r,c;const e=[Y,X],s=[];function a(_,u){return _[1][1]?0:1}t=a(o),i=s[t]=e[t](o);let l=o[5]&&O(o);return{c(){i.c(),n=U(),l&&l.c(),r=d()},l(_){i.l(_),n=F(_),l&&l.l(_),r=d()},m(_,u){s[t].m(_,u),b(_,n,u),l&&l.m(_,u),b(_,r,u),c=!0},p(_,[u]){let E=t;t=a(_),t===E?s[t].p(_,u):(P(),h(s[E],1,1,()=>{s[E]=null}),I(),i=s[t],i?i.p(_,u):(i=s[t]=e[t](_),i.c()),g(i,1),i.m(n.parentNode,n)),_[5]?l?l.p(_,u):(l=O(_),l.c(),l.m(r.parentNode,r)):l&&(l.d(1),l=null)},i(_){c||(g(i),c=!0)},o(_){h(i),c=!1},d(_){_&&(w(n),w(r)),s[t].d(_),l&&l.d(_)}}}function x(o,t,i){let{stores:n}=t,{page:r}=t,{constructors:c}=t,{components:e=[]}=t,{form:s}=t,{data_0:a=null}=t,{data_1:l=null}=t;j(n.page.notify);let _=!1,u=!1,E=null;z(()=>{const f=n.page.subscribe(()=>{_&&(i(6,u=!0),B().then(()=>{i(7,E=document.title||"untitled page")}))});return i(5,_=!0),f});function y(f){R[f?"unshift":"push"](()=>{e[1]=f,i(0,e)})}function N(f){R[f?"unshift":"push"](()=>{e[0]=f,i(0,e)})}function q(f){R[f?"unshift":"push"](()=>{e[0]=f,i(0,e)})}return o.$$set=f=>{"stores"in f&&i(8,n=f.stores),"page"in f&&i(9,r=f.page),"constructors"in f&&i(1,c=f.constructors),"components"in f&&i(0,e=f.components),"form"in f&&i(2,s=f.form),"data_0"in f&&i(3,a=f.data_0),"data_1"in f&&i(4,l=f.data_1)},o.$$.update=()=>{o.$$.dirty&768&&n.page.set(r)},[e,c,s,a,l,_,u,E,n,r,y,N,q]}class rt extends C{constructor(t){super(),M(this,t,x,$,S,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const st=[()=>m(()=>import("../nodes/0.D4zn0ymL.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),()=>m(()=>import("../nodes/1.Jgj0K9e6.js"),__vite__mapDeps([7,1,2,5,3,4]),import.meta.url),()=>m(()=>import("../nodes/2.CAAVRP3F.js"),__vite__mapDeps([8,1,2,9,3,4,10,11]),import.meta.url),()=>m(()=>import("../nodes/3.D3Py6qqR.js"),__vite__mapDeps([12,1,2]),import.meta.url),()=>m(()=>import("../nodes/4.DGZO03kB.js"),__vite__mapDeps([13,1,2,14]),import.meta.url),()=>m(()=>import("../nodes/5.F-ngw3cO.js"),__vite__mapDeps([15,1,2,14,9,11]),import.meta.url),()=>m(()=>import("../nodes/6.BWudGx52.js"),__vite__mapDeps([16,17,1,2,10,4,11,18]),import.meta.url),()=>m(()=>import("../nodes/7.YYAwZ01d.js"),__vite__mapDeps([19,1,2,9,11]),import.meta.url),()=>m(()=>import("../nodes/8.D-fQwb2A.js"),__vite__mapDeps([20,1,2,21,11]),import.meta.url)],ot=[],at={"/":[2],"/about":[3],"/contribute":[4],"/entry":[5],"/map":[6],"/timeline":[7],"/visualisations":[8]},_t={handleError:({error:o})=>{console.error(o)},reroute:()=>{}};export{at as dictionary,_t as hooks,nt as matchers,st as nodes,rt as root,ot as server_loads}; diff --git a/_app/immutable/entry/start.CtThyE5r.js b/_app/immutable/entry/start.CtThyE5r.js new file mode 100644 index 000000000..fe034b717 --- /dev/null +++ b/_app/immutable/entry/start.CtThyE5r.js @@ -0,0 +1 @@ +import{c as a}from"../chunks/entry.BG6Jkd3x.js";export{a as start}; diff --git a/_app/immutable/entry/start.JlUhvKjU.js b/_app/immutable/entry/start.JlUhvKjU.js deleted file mode 100644 index 50674ac6f..000000000 --- a/_app/immutable/entry/start.JlUhvKjU.js +++ /dev/null @@ -1 +0,0 @@ -import{c as a}from"../chunks/entry.1DvTSu7v.js";export{a as start}; diff --git a/_app/immutable/nodes/0.aOW80DIr.js b/_app/immutable/nodes/0.D4zn0ymL.js similarity index 96% rename from _app/immutable/nodes/0.aOW80DIr.js rename to _app/immutable/nodes/0.D4zn0ymL.js index 21d84c218..9a26d6a49 100644 --- a/_app/immutable/nodes/0.aOW80DIr.js +++ b/_app/immutable/nodes/0.D4zn0ymL.js @@ -1 +1 @@ -import{s as P,n as E,c as R,e as F,u as J,g as K,f as Q}from"../chunks/scheduler.kPUuJgHu.js";import{S as k,i as B,e as g,s as $,c as x,l as b,f as y,a as G,d as S,m as i,C as f,g as w,h as d,y as U,z as W,A as X,u as N,q as O,B as Y}from"../chunks/index.CYrHsBOq.js";import{b as A}from"../chunks/entry.1DvTSu7v.js";import{p as Z}from"../chunks/stores.DDkG-L5E.js";const ee=!0,te="always",de=Object.freeze(Object.defineProperty({__proto__:null,prerender:ee,trailingSlash:te},Symbol.toStringTag,{value:"Module"}));function ne(s){let n,c='

Closing the Gap

in Non-Latin-Script Data

',a,r,e,t,C="Projects",D,m,M="Map",L,p,q="Timeline",T,h,z="Relations",j,_,H="Contribute",I,v,V="About";return{c(){n=g("div"),n.innerHTML=c,a=$(),r=g("div"),e=g("div"),t=g("a"),t.textContent=C,D=$(),m=g("a"),m.textContent=M,L=$(),p=g("a"),p.textContent=q,T=$(),h=g("a"),h.textContent=z,j=$(),_=g("a"),_.textContent=H,I=$(),v=g("a"),v.textContent=V,this.h()},l(l){n=x(l,"DIV",{class:!0,"data-svelte-h":!0}),b(n)!=="svelte-r4zqeb"&&(n.innerHTML=c),a=y(l),r=x(l,"DIV",{class:!0});var o=G(r);e=x(o,"DIV",{class:!0});var u=G(e);t=x(u,"A",{href:!0,class:!0,"data-svelte-h":!0}),b(t)!=="svelte-1j9bhpr"&&(t.textContent=C),D=y(u),m=x(u,"A",{href:!0,class:!0,"data-svelte-h":!0}),b(m)!=="svelte-twdkt4"&&(m.textContent=M),L=y(u),p=x(u,"A",{href:!0,class:!0,"data-svelte-h":!0}),b(p)!=="svelte-ytth9t"&&(p.textContent=q),T=y(u),h=x(u,"A",{href:!0,class:!0,"data-svelte-h":!0}),b(h)!=="svelte-cgml3"&&(h.textContent=z),j=y(u),_=x(u,"A",{href:!0,class:!0,"data-svelte-h":!0}),b(_)!=="svelte-guusch"&&(_.textContent=H),I=y(u),v=x(u,"A",{href:!0,class:!0,"data-svelte-h":!0}),b(v)!=="svelte-198ch93"&&(v.textContent=V),u.forEach(S),o.forEach(S),this.h()},h(){i(n,"class","mx-auto mb-4 max-w-[76rem] px-4 text-gray-50"),i(t,"href",A+"/"),i(t,"class","underline-offset-2 hover:underline"),f(t,"underline",s[0].route.id==="/"),i(m,"href",A+"/map/"),i(m,"class","underline-offset-2 hover:underline"),f(m,"underline",s[0].route.id==="/map"),i(p,"href",A+"/timeline/"),i(p,"class","underline-offset-2 hover:underline"),f(p,"underline",s[0].route.id==="/timeline"),i(h,"href",A+"/visualisations/"),i(h,"class","underline-offset-2 hover:underline"),f(h,"underline",s[0].route.id==="/visualisations"),i(_,"href",A+"/contribute/"),i(_,"class","underline-offset-2 hover:underline"),f(_,"underline",s[0].route.id==="/contribute"),i(v,"href",A+"/about/"),i(v,"class","underline-offset-2 hover:underline"),f(v,"underline",s[0].route.id==="/about"),i(e,"class","mx-auto flex max-w-[76rem] flex-wrap gap-x-4 gap-y-2 px-4 text-xl font-normal"),i(r,"class","mb-4 bg-ctgorange py-3")},m(l,o){w(l,n,o),w(l,a,o),w(l,r,o),d(r,e),d(e,t),d(e,D),d(e,m),d(e,L),d(e,p),d(e,T),d(e,h),d(e,j),d(e,_),d(e,I),d(e,v)},p(l,[o]){o&1&&f(t,"underline",l[0].route.id==="/"),o&1&&f(m,"underline",l[0].route.id==="/map"),o&1&&f(p,"underline",l[0].route.id==="/timeline"),o&1&&f(h,"underline",l[0].route.id==="/visualisations"),o&1&&f(_,"underline",l[0].route.id==="/contribute"),o&1&&f(v,"underline",l[0].route.id==="/about")},i:E,o:E,d(l){l&&(S(n),S(a),S(r))}}}function se(s,n,c){let a;return R(s,Z,r=>c(0,a=r)),[a]}class ae extends k{constructor(n){super(),B(this,n,se,ne,P,{})}}function re(s){let n,c,a;n=new ae({});const r=s[1].default,e=F(r,s,s[0],null);return{c(){U(n.$$.fragment),c=$(),e&&e.c()},l(t){W(n.$$.fragment,t),c=y(t),e&&e.l(t)},m(t,C){X(n,t,C),w(t,c,C),e&&e.m(t,C),a=!0},p(t,[C]){e&&e.p&&(!a||C&1)&&J(e,r,t,t[0],a?Q(r,t[0],C,null):K(t[0]),null)},i(t){a||(N(n.$$.fragment,t),N(e,t),a=!0)},o(t){O(n.$$.fragment,t),O(e,t),a=!1},d(t){t&&S(c),Y(n,t),e&&e.d(t)}}}function le(s,n,c){let{$$slots:a={},$$scope:r}=n;return s.$$set=e=>{"$$scope"in e&&c(0,r=e.$$scope)},[r,a]}class ce extends k{constructor(n){super(),B(this,n,le,re,P,{})}}export{ce as component,de as universal}; +import{s as P,n as E,c as R,e as F,u as J,g as K,f as Q}from"../chunks/scheduler.kPUuJgHu.js";import{S as k,i as B,e as g,s as $,c as x,l as b,f as y,a as G,d as S,m as i,C as f,g as w,h as d,y as U,z as W,A as X,u as N,q as O,B as Y}from"../chunks/index.CYrHsBOq.js";import{b as A}from"../chunks/entry.BG6Jkd3x.js";import{p as Z}from"../chunks/stores.BzntDiba.js";const ee=!0,te="always",de=Object.freeze(Object.defineProperty({__proto__:null,prerender:ee,trailingSlash:te},Symbol.toStringTag,{value:"Module"}));function ne(s){let n,c='

Closing the Gap

in Non-Latin-Script Data

',a,r,e,t,C="Projects",D,m,M="Map",L,p,q="Timeline",T,h,z="Relations",j,_,H="Contribute",I,v,V="About";return{c(){n=g("div"),n.innerHTML=c,a=$(),r=g("div"),e=g("div"),t=g("a"),t.textContent=C,D=$(),m=g("a"),m.textContent=M,L=$(),p=g("a"),p.textContent=q,T=$(),h=g("a"),h.textContent=z,j=$(),_=g("a"),_.textContent=H,I=$(),v=g("a"),v.textContent=V,this.h()},l(l){n=x(l,"DIV",{class:!0,"data-svelte-h":!0}),b(n)!=="svelte-r4zqeb"&&(n.innerHTML=c),a=y(l),r=x(l,"DIV",{class:!0});var o=G(r);e=x(o,"DIV",{class:!0});var u=G(e);t=x(u,"A",{href:!0,class:!0,"data-svelte-h":!0}),b(t)!=="svelte-1j9bhpr"&&(t.textContent=C),D=y(u),m=x(u,"A",{href:!0,class:!0,"data-svelte-h":!0}),b(m)!=="svelte-twdkt4"&&(m.textContent=M),L=y(u),p=x(u,"A",{href:!0,class:!0,"data-svelte-h":!0}),b(p)!=="svelte-ytth9t"&&(p.textContent=q),T=y(u),h=x(u,"A",{href:!0,class:!0,"data-svelte-h":!0}),b(h)!=="svelte-cgml3"&&(h.textContent=z),j=y(u),_=x(u,"A",{href:!0,class:!0,"data-svelte-h":!0}),b(_)!=="svelte-guusch"&&(_.textContent=H),I=y(u),v=x(u,"A",{href:!0,class:!0,"data-svelte-h":!0}),b(v)!=="svelte-198ch93"&&(v.textContent=V),u.forEach(S),o.forEach(S),this.h()},h(){i(n,"class","mx-auto mb-4 max-w-[76rem] px-4 text-gray-50"),i(t,"href",A+"/"),i(t,"class","underline-offset-2 hover:underline"),f(t,"underline",s[0].route.id==="/"),i(m,"href",A+"/map/"),i(m,"class","underline-offset-2 hover:underline"),f(m,"underline",s[0].route.id==="/map"),i(p,"href",A+"/timeline/"),i(p,"class","underline-offset-2 hover:underline"),f(p,"underline",s[0].route.id==="/timeline"),i(h,"href",A+"/visualisations/"),i(h,"class","underline-offset-2 hover:underline"),f(h,"underline",s[0].route.id==="/visualisations"),i(_,"href",A+"/contribute/"),i(_,"class","underline-offset-2 hover:underline"),f(_,"underline",s[0].route.id==="/contribute"),i(v,"href",A+"/about/"),i(v,"class","underline-offset-2 hover:underline"),f(v,"underline",s[0].route.id==="/about"),i(e,"class","mx-auto flex max-w-[76rem] flex-wrap gap-x-4 gap-y-2 px-4 text-xl font-normal"),i(r,"class","mb-4 bg-ctgorange py-3")},m(l,o){w(l,n,o),w(l,a,o),w(l,r,o),d(r,e),d(e,t),d(e,D),d(e,m),d(e,L),d(e,p),d(e,T),d(e,h),d(e,j),d(e,_),d(e,I),d(e,v)},p(l,[o]){o&1&&f(t,"underline",l[0].route.id==="/"),o&1&&f(m,"underline",l[0].route.id==="/map"),o&1&&f(p,"underline",l[0].route.id==="/timeline"),o&1&&f(h,"underline",l[0].route.id==="/visualisations"),o&1&&f(_,"underline",l[0].route.id==="/contribute"),o&1&&f(v,"underline",l[0].route.id==="/about")},i:E,o:E,d(l){l&&(S(n),S(a),S(r))}}}function se(s,n,c){let a;return R(s,Z,r=>c(0,a=r)),[a]}class ae extends k{constructor(n){super(),B(this,n,se,ne,P,{})}}function re(s){let n,c,a;n=new ae({});const r=s[1].default,e=F(r,s,s[0],null);return{c(){U(n.$$.fragment),c=$(),e&&e.c()},l(t){W(n.$$.fragment,t),c=y(t),e&&e.l(t)},m(t,C){X(n,t,C),w(t,c,C),e&&e.m(t,C),a=!0},p(t,[C]){e&&e.p&&(!a||C&1)&&J(e,r,t,t[0],a?Q(r,t[0],C,null):K(t[0]),null)},i(t){a||(N(n.$$.fragment,t),N(e,t),a=!0)},o(t){O(n.$$.fragment,t),O(e,t),a=!1},d(t){t&&S(c),Y(n,t),e&&e.d(t)}}}function le(s,n,c){let{$$slots:a={},$$scope:r}=n;return s.$$set=e=>{"$$scope"in e&&c(0,r=e.$$scope)},[r,a]}class ce extends k{constructor(n){super(),B(this,n,le,re,P,{})}}export{ce as component,de as universal}; diff --git a/_app/immutable/nodes/1.CaSIGmoy.js b/_app/immutable/nodes/1.Jgj0K9e6.js similarity index 92% rename from _app/immutable/nodes/1.CaSIGmoy.js rename to _app/immutable/nodes/1.Jgj0K9e6.js index 93343e3fd..6354b2562 100644 --- a/_app/immutable/nodes/1.CaSIGmoy.js +++ b/_app/immutable/nodes/1.Jgj0K9e6.js @@ -1 +1 @@ -import{s as x,n as u,c as S}from"../chunks/scheduler.kPUuJgHu.js";import{S as j,i as q,e as h,t as d,s as y,c as v,a as g,b,d as c,f as C,g as _,h as E,j as $}from"../chunks/index.CYrHsBOq.js";import{p as H}from"../chunks/stores.DDkG-L5E.js";function P(p){var f;let a,s=p[0].status+"",r,o,n,i=((f=p[0].error)==null?void 0:f.message)+"",m;return{c(){a=h("h1"),r=d(s),o=y(),n=h("p"),m=d(i)},l(e){a=v(e,"H1",{});var t=g(a);r=b(t,s),t.forEach(c),o=C(e),n=v(e,"P",{});var l=g(n);m=b(l,i),l.forEach(c)},m(e,t){_(e,a,t),E(a,r),_(e,o,t),_(e,n,t),E(n,m)},p(e,[t]){var l;t&1&&s!==(s=e[0].status+"")&&$(r,s),t&1&&i!==(i=((l=e[0].error)==null?void 0:l.message)+"")&&$(m,i)},i:u,o:u,d(e){e&&(c(a),c(o),c(n))}}}function k(p,a,s){let r;return S(p,H,o=>s(0,r=o)),[r]}class B extends j{constructor(a){super(),q(this,a,k,P,x,{})}}export{B as component}; +import{s as x,n as u,c as S}from"../chunks/scheduler.kPUuJgHu.js";import{S as j,i as q,e as h,t as d,s as y,c as v,a as g,b,d as c,f as C,g as _,h as E,j as $}from"../chunks/index.CYrHsBOq.js";import{p as H}from"../chunks/stores.BzntDiba.js";function P(p){var f;let a,s=p[0].status+"",r,o,n,i=((f=p[0].error)==null?void 0:f.message)+"",m;return{c(){a=h("h1"),r=d(s),o=y(),n=h("p"),m=d(i)},l(e){a=v(e,"H1",{});var t=g(a);r=b(t,s),t.forEach(c),o=C(e),n=v(e,"P",{});var l=g(n);m=b(l,i),l.forEach(c)},m(e,t){_(e,a,t),E(a,r),_(e,o,t),_(e,n,t),E(n,m)},p(e,[t]){var l;t&1&&s!==(s=e[0].status+"")&&$(r,s),t&1&&i!==(i=((l=e[0].error)==null?void 0:l.message)+"")&&$(m,i)},i:u,o:u,d(e){e&&(c(a),c(o),c(n))}}}function k(p,a,s){let r;return S(p,H,o=>s(0,r=o)),[r]}class B extends j{constructor(a){super(),q(this,a,k,P,x,{})}}export{B as component}; diff --git a/_app/immutable/nodes/2.CMJBNSYY.js b/_app/immutable/nodes/2.CAAVRP3F.js similarity index 99% rename from _app/immutable/nodes/2.CMJBNSYY.js rename to _app/immutable/nodes/2.CAAVRP3F.js index 7a05b0715..3e168a964 100644 --- a/_app/immutable/nodes/2.CMJBNSYY.js +++ b/_app/immutable/nodes/2.CAAVRP3F.js @@ -1 +1 @@ -import{s as se,n as G,r as ft}from"../chunks/scheduler.kPUuJgHu.js";import{S as ie,i as oe,G as W,H as X,a as p,d as h,m as f,g as z,h as g,e as k,s as S,t as Y,y as ce,c as w,f as A,b as Z,z as ue,A as fe,u as U,w as be,q as R,r as pe,j as x,n as ne,B as he,l as ve,C as M,p as le,D as Ae,o as ye,k as vt}from"../chunks/index.CYrHsBOq.js";import{e as q}from"../chunks/each.D6YF6ztN.js";import{a as bt}from"../chunks/entry.1DvTSu7v.js";import{s as Ce,a as ke,b as je,r as Ve,c as pt,d as ht,u as Te,g as kt,e as wt,h as Et,f as He,i as dt}from"../chunks/utils.kS56dN66.js";import{e as gt}from"../chunks/ENTRIES.B8oTZR8-.js";function Ct(r){let e,t;return{c(){e=W("svg"),t=W("path"),this.h()},l(l){e=X(l,"svg",{xmlns:!0,viewBox:!0,fill:!0});var a=p(e);t=X(a,"path",{"fill-rule":!0,d:!0,"clip-rule":!0}),p(t).forEach(h),a.forEach(h),this.h()},h(){f(t,"fill-rule","evenodd"),f(t,"d","M12.293 5.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.414-1.414L14.586 11H3a1 1 0 1 1 0-2h11.586l-2.293-2.293a1 1 0 0 1 0-1.414z"),f(t,"clip-rule","evenodd"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"viewBox","0 0 20 20"),f(e,"fill","currentColor")},m(l,a){z(l,e,a),g(e,t)},p:G,i:G,o:G,d(l){l&&h(e)}}}class Vt extends ie{constructor(e){super(),oe(this,e,null,Ct,se,{})}}function yt(r){let e,t;return{c(){e=W("svg"),t=W("path"),this.h()},l(l){e=X(l,"svg",{viewBox:!0,xmlns:!0,fill:!0});var a=p(e);t=X(a,"path",{d:!0}),p(t).forEach(h),a.forEach(h),this.h()},h(){f(t,"d","M6 6a2 2 0 0 1 2-2 1 1 0 0 0 0-2 4 4 0 0 0-4 4v3a2 2 0 0 1-2 2 1 1 0 0 0 0 2 2 2 0 0 1 2 2v3a4 4 0 0 0 4 4 1 1 0 0 0 0-2 2 2 0 0 1-2-2v-3a4 4 0 0 0-1.38-3A4 4 0 0 0 6 9Zm16 5a2 2 0 0 1-2-2V6a4 4 0 0 0-4-4 1 1 0 0 0 0 2 2 2 0 0 1 2 2v3a4 4 0 0 0 1.38 3A4 4 0 0 0 18 15v3a2 2 0 0 1-2 2 1 1 0 0 0 0 2 4 4 0 0 0 4-4v-3a2 2 0 0 1 2-2 1 1 0 0 0 0-2Z"),f(e,"viewBox","0 0 24 24"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"fill","currentColor")},m(l,a){z(l,e,a),g(e,t)},p:G,i:G,o:G,d(l){l&&h(e)}}}class Dt extends ie{constructor(e){super(),oe(this,e,null,yt,se,{})}}function jt(r){let e,t;return{c(){e=W("svg"),t=W("path"),this.h()},l(l){e=X(l,"svg",{xmlns:!0,fill:!0,viewBox:!0,stroke:!0});var a=p(e);t=X(a,"path",{"stroke-linecap":!0,"stroke-linejoin":!0,d:!0}),p(t).forEach(h),a.forEach(h),this.h()},h(){f(t,"stroke-linecap","round"),f(t,"stroke-linejoin","round"),f(t,"d","M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2z"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"fill","none"),f(e,"viewBox","0 0 24 24"),f(e,"stroke","currentColor")},m(l,a){z(l,e,a),g(e,t)},p:G,i:G,o:G,d(l){l&&h(e)}}}class Tt extends ie{constructor(e){super(),oe(this,e,null,jt,se,{})}}function It(r){let e,t;return{c(){e=W("svg"),t=W("path"),this.h()},l(l){e=X(l,"svg",{xmlns:!0,fill:!0,viewBox:!0,stroke:!0});var a=p(e);t=X(a,"path",{"stroke-linecap":!0,"stroke-linejoin":!0,d:!0}),p(t).forEach(h),a.forEach(h),this.h()},h(){f(t,"stroke-linecap","round"),f(t,"stroke-linejoin","round"),f(t,"d","M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 0 1 6.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"fill","none"),f(e,"viewBox","0 0 24 24"),f(e,"stroke","currentColor")},m(l,a){z(l,e,a),g(e,t)},p:G,i:G,o:G,d(l){l&&h(e)}}}class Lt extends ie{constructor(e){super(),oe(this,e,null,It,se,{})}}function Bt(r){let e,t,l;return{c(){e=W("svg"),t=W("path"),l=W("path"),this.h()},l(a){e=X(a,"svg",{xmlns:!0,viewBox:!0,fill:!0});var i=p(e);t=X(i,"path",{d:!0}),p(t).forEach(h),l=X(i,"path",{d:!0}),p(l).forEach(h),i.forEach(h),this.h()},h(){f(t,"d","M11 3a1 1 0 1 0 0 2h2.586l-6.293 6.293a1 1 0 1 0 1.414 1.414L15 6.414V9a1 1 0 1 0 2 0V4a1 1 0 0 0-1-1h-5z"),f(l,"d","M5 5a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-3a1 1 0 1 0-2 0v3H5V7h3a1 1 0 0 0 0-2H5z"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"viewBox","0 0 20 20"),f(e,"fill","currentColor")},m(a,i){z(a,e,i),g(e,t),g(e,l)},p:G,i:G,o:G,d(a){a&&h(e)}}}class Mt extends ie{constructor(e){super(),oe(this,e,null,Bt,se,{})}}function zt(r){let e,t;return{c(){e=W("svg"),t=W("path"),this.h()},l(l){e=X(l,"svg",{xmlns:!0,viewBox:!0,fill:!0});var a=p(e);t=X(a,"path",{"fill-rule":!0,d:!0,"clip-rule":!0}),p(t).forEach(h),a.forEach(h),this.h()},h(){f(t,"fill-rule","evenodd"),f(t,"d","M5.05 4.05a7 7 0 1 1 9.9 9.9L10 18.9l-4.95-4.95a7 7 0 0 1 0-9.9zM10 11a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"),f(t,"clip-rule","evenodd"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"viewBox","0 0 20 20"),f(e,"fill","currentColor")},m(l,a){z(l,e,a),g(e,t)},p:G,i:G,o:G,d(l){l&&h(e)}}}class Ot extends ie{constructor(e){super(),oe(this,e,null,zt,se,{})}}function Ne(r,e,t){const l=r.slice();return l[13]=e[t],l}function Ue(r,e,t){const l=r.slice();return l[16]=e[t],l}function Ge(r,e,t){const l=r.slice();return l[19]=e[t],l[21]=t,l}function Ke(r,e,t){const l=r.slice();return l[22]=e[t],l}function Je(r,e,t){const l=r.slice();return l[25]=e[t],l[21]=t,l}function Re(r){let e,t,l,a,i,s;l=new Ot({});let n=q(r[2]),c=[];for(let o=0;o0&&Re(r),ge=q(r[9]),H=[];for(let v=0;vR(H[v],1,1,()=>{H[v]=null});let J=r[3].length>0&&Ze(r),me=q(r[6]),F=[];for(let v=0;vR(N[v],1,1,()=>{N[v]=null});return L=new Dt({}),{c(){e=k("div"),t=k("div"),K&&K.c(),l=S(),a=k("h3"),i=k("a"),s=Y(r[0]),c=S(),o=k("div"),u=k("div");for(let v=0;v0?K?(K.p(v,B),B&4&&U(K,1)):(K=Re(v),K.c(),U(K,1),K.m(t,l)):K&&(be(),R(K,1,1,()=>{K=null}),pe()),(!ae||B&1)&&x(s,v[0]),(!ae||B&128&&n!==(n="entry/#"+v[7]))&&f(i,"href",n),B&512){ge=q(v[9]);let m;for(m=0;m0?J?(J.p(v,B),B&8&&U(J,1)):(J=Ze(v),J.c(),U(J,1),J.m(o,null)):J&&(be(),R(J,1,1,()=>{J=null}),pe()),(!ae||B&2)&&x(E,v[1]),B&64){me=q(v[6]);let m;for(m=0;m{"title"in _&&t(0,s=_.title),"description"in _&&t(1,n=_.description),"periods"in _&&t(10,c=_.periods),"places"in _&&t(2,o=_.places),"languages"in _&&t(3,u=_.languages),"websiteLinks"in _&&t(4,b=_.websiteLinks),"url"in _&&t(11,I=_.url),"lastEdited"in _&&t(5,y=_.lastEdited),"keywords"in _&&t(6,E=_.keywords),"uuid"in _&&t(7,V=_.uuid)},r.$$.update=()=>{r.$$.dirty&1024&&t(9,l=c.filter(_=>_.from)),r.$$.dirty&2048&&t(12,a=I.split("/PROJECTS/")[1]),r.$$.dirty&4096&&t(8,i=St+a)},[s,n,o,u,b,y,E,V,i,l,c,I,a]}class Ht extends ie{constructor(e){super(),oe(this,e,At,Pt,se,{title:0,description:1,periods:10,places:2,languages:3,websiteLinks:4,url:11,lastEdited:5,keywords:6,uuid:7})}}const $e={akk:"Akkadian",amh:"Amharic",ara:"Arabic",arc:"Official Aramaic (700-300 BCE)",atz:"Arta",ave:"Avestan",bam:"Bambara",ben:"Bengali",bod:"Tibetan",bqi:"Bakhtiari",chg:"Chagatai",cop:"Coptic",dan:"Danish",dar:"Dargwa",deu:"German",efi:"Efik",egy:"Egyptian (Ancient)",elx:"Elamite",eng:"English",erk:"South Efate",fas:"Persian",fra:"French",ful:"Fulah",gez:"Geez",gml:"Middle Low German",got:"Gothic",grc:"Ancient Greek (to 1453)",guj:"Gujarati",hac:"Gurani",hau:"Hausa",heb:"Hebrew",hin:"Hindi",hit:"Hittite",hun:"Hungarian",hye:"Armenian",imy:"Milyan",ind:"Indonesian",ita:"Italian",jav:"Javanese",jpn:"Japanese",jpr:"Judeo-Persian",jrb:"Judeo-Arabic",kac:"Kachin",kan:"Kannada",kas:"Kashmiri",kbl:"Kanembu",kgv:"Karas",khm:"Khmer",kur:"Kurdish",lat:"Latin",lav:"Latvian",lit:"Lithuanian",lzz:"Laz",mal:"Malayalam",mar:"Marathi",mku:"Konyanka Maninka",mlt:"Maltese",mon:"Mongolian",mzn:"Mazanderani",nep:"Nepali (macrolanguage)",nld:"Flemish",nrp:"North Picene",ofs:"Old Frisian",oge:"Old Georgian",orv:"Old Russian",osc:"Oscan",oss:"Ossetic",osx:"Old Saxon",pal:"Pahlavi",pli:"Pali",por:"Portuguese",que:"Quechua",raj:"Rajasthani",rus:"Russian",san:"Sanskrit",snd:"Sindhi",snk:"Soninke",sog:"Sogdian",spa:"Spanish",sqi:"Albanian",sux:"Sumerian",sva:"Svan",swe:"Swedish",syr:"Syriac",tab:"Tabassaran",tam:"Tamil",tdn:"Tondano",tel:"Telugu",tio:"Teop",tir:"Tigrinya",tks:"Takestani",tru:"Turoyo",tuh:"Taulil",tur:"Turkish",udi:"Udi",uga:"Ugaritic",und:"Undetermined",urd:"Urdu",vra:"Vera'a",wlm:"Middle Welsh",xbc:"Bactrian",xbm:"Middle Breton",xcr:"Carian",xeb:"Eblan",xlc:"Lycian",xld:"Lydian",xlp:"Lepontic",xpg:"Phrygian",xpr:"Parthian",xsa:"Sabaean",xum:"Umbrian",xur:"Urartian",yid:"Yiddish",yor:"Yoruba",zho:"Chinese",zum:"Kumzari"};function et(r,e,t){const l=r.slice();return l[21]=e[t],l[23]=t,l}function tt(r,e,t){const l=r.slice();return l[24]=e[t],l}function lt(r,e,t){const l=r.slice();return l[18]=e[t],l}function rt(r){let e,t,l="Clear selection",a,i;return{c(){e=k("p"),t=k("button"),t.textContent=l,this.h()},l(s){e=w(s,"P",{class:!0});var n=p(e);t=w(n,"BUTTON",{class:!0,"data-svelte-h":!0}),ve(t)!=="svelte-1llc9mw"&&(t.textContent=l),n.forEach(h),this.h()},h(){f(t,"class","cursor-pointer font-normal text-red-900 underline"),f(e,"class","-mt-1 mb-3.5")},m(s,n){z(s,e,n),g(e,t),a||(i=le(t,"click",Ve),a=!0)},d(s){s&&h(e),a=!1,i()}}}function Nt(r){let e,t,l,a,i,s=r[4]&&at(r);return{c(){e=k("div"),t=k("input"),l=S(),s&&s.c(),this.h()},l(n){e=w(n,"DIV",{class:!0});var c=p(e);t=w(c,"INPUT",{type:!0,autocorrect:!0,autocapitalize:!0,class:!0}),l=A(c),s&&s.l(c),c.forEach(h),this.h()},h(){f(t,"type","text"),f(t,"autocorrect","off"),f(t,"autocapitalize","none"),f(t,"class","w-56 rounded border border-ctgblue bg-gray-100 px-2 py-1"),f(e,"class","flex gap-2 font-normal")},m(n,c){z(n,e,c),g(e,t),Ae(t,r[4]),g(e,l),s&&s.m(e,null),a||(i=[le(t,"input",r[12]),le(t,"keydown",r[13])],a=!0)},p(n,c){c&16&&t.value!==n[4]&&Ae(t,n[4]),n[4]?s||(s=at(n),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(n){n&&h(e),s&&s.d(),a=!1,ft(i)}}}function Ut(r){let e,t=q(Object.keys(r[0])),l=[];for(let a=0;a{t(4,n=d)}),ke.subscribe(d=>{t(2,c=d)}),je.subscribe(d=>{t(3,o=d)});let u;function b(){clearTimeout(u),u=setTimeout(()=>{Ce.set(n);const d=pt(s,n);ht.set(d)},500)}function I(d,L,O,P){if(P==="search")return!1;const Q=Object.values(d).flat(),re=P==="keywords"?Q:L;if(re.length===0)return!1;for(const $ of O)re.includes($)||je.update(de=>(de.delete($),de));return O.size!==0}const y=()=>{ke.set("search"),Ve()},E=()=>{ke.set("keywords"),Ve()},V=()=>{ke.set("languages"),Ve()},_=d=>{Te("languages",d)},D=d=>{Te("keywords",d)};function j(){n=this.value,t(4,n)}const C=()=>{b()},T=()=>{Ce.set("")};return r.$$set=d=>{"keywordsCategorized"in d&&t(0,a=d.keywordsCategorized),"languages"in d&&t(1,i=d.languages)},r.$$.update=()=>{r.$$.dirty&15&&t(5,l=I(a,i,o,c))},[a,i,c,o,n,l,b,y,E,V,_,D,j,C,T]}class Ft extends ie{constructor(e){super(),oe(this,e,qt,Rt,se,{keywordsCategorized:0,languages:1})}}function ct(r,e,t){const l=r.slice();return l[11]=e[t][0],l[12]=e[t][1],l}function ut(r){let e,t;return e=new Ht({props:{title:r[12].project.title,description:r[12].project.project_desc,periods:r[12].project.date,places:He(r[12].project.places),languages:r[12].project.lang,websiteLinks:r[12].project.websites,url:r[11],lastEdited:r[12].record_metadata.last_edited_on||r[12].record_metadata.record_created_on,keywords:r[12].project.keywords,uuid:r[12].record_metadata.uuid}}),{c(){ce(e.$$.fragment)},l(l){ue(e.$$.fragment,l)},m(l,a){fe(e,l,a),t=!0},p(l,a){const i={};a&1&&(i.title=l[12].project.title),a&1&&(i.description=l[12].project.project_desc),a&1&&(i.periods=l[12].project.date),a&1&&(i.places=He(l[12].project.places)),a&1&&(i.languages=l[12].project.lang),a&1&&(i.websiteLinks=l[12].project.websites),a&1&&(i.url=l[11]),a&1&&(i.lastEdited=l[12].record_metadata.last_edited_on||l[12].record_metadata.record_created_on),a&1&&(i.keywords=l[12].project.keywords),a&1&&(i.uuid=l[12].record_metadata.uuid),e.$set(i)},i(l){t||(U(e.$$.fragment,l),t=!0)},o(l){R(e.$$.fragment,l),t=!1},d(l){he(e,l)}}}function Yt(r){let e,t,l,a,i,s,n,c=r[0].length+"",o,u,b=r[0].length===1?"item":"items",I,y,E,V,_,D;a=new Ft({props:{keywordsCategorized:r[2],languages:r[1]}});let j=q(r[0]),C=[];for(let d=0;dR(C[d],1,1,()=>{C[d]=null});return{c(){e=k("meta"),t=S(),l=k("div"),ce(a.$$.fragment),i=S(),s=k("p"),n=k("code"),o=Y(c),u=S(),I=Y(b),y=S(),E=k("div");for(let d=0;d{t(3,o=E)});let u;ht.subscribe(E=>{u=E});let b;ke.subscribe(E=>{t(4,b=E)});let I;je.subscribe(E=>{t(5,I=E)});function y(E,V,_,D){if(_==="search")return V?u:E;if(D.size===0)return E;const j=_==="keywords"?s:c;let C=[],T=!0;for(const d of D){if(!j[d])return Te(_,d),E;const L=j[d];if(T){C=L,T=!1;continue}C=C.filter(O=>L.includes(O))}return E.filter(([d])=>C.includes(d))}return bt(dt),r.$$.update=()=>{r.$$.dirty&56&&t(0,a=y(i,o,b,I))},t(1,l=Object.keys(c).sort()),[a,l,n,o,b,I]}class tl extends ie{constructor(e){super(),oe(this,e,Zt,Yt,se,{})}}export{tl as component}; +import{s as se,n as G,r as ft}from"../chunks/scheduler.kPUuJgHu.js";import{S as ie,i as oe,G as W,H as X,a as p,d as h,m as f,g as z,h as g,e as k,s as S,t as Y,y as ce,c as w,f as A,b as Z,z as ue,A as fe,u as U,w as be,q as R,r as pe,j as x,n as ne,B as he,l as ve,C as M,p as le,D as Ae,o as ye,k as vt}from"../chunks/index.CYrHsBOq.js";import{e as q}from"../chunks/each.D6YF6ztN.js";import{a as bt}from"../chunks/entry.BG6Jkd3x.js";import{s as Ce,a as ke,b as je,r as Ve,c as pt,d as ht,u as Te,g as kt,e as wt,h as Et,f as He,i as dt}from"../chunks/utils.kS56dN66.js";import{e as gt}from"../chunks/ENTRIES.B8oTZR8-.js";function Ct(r){let e,t;return{c(){e=W("svg"),t=W("path"),this.h()},l(l){e=X(l,"svg",{xmlns:!0,viewBox:!0,fill:!0});var a=p(e);t=X(a,"path",{"fill-rule":!0,d:!0,"clip-rule":!0}),p(t).forEach(h),a.forEach(h),this.h()},h(){f(t,"fill-rule","evenodd"),f(t,"d","M12.293 5.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.414-1.414L14.586 11H3a1 1 0 1 1 0-2h11.586l-2.293-2.293a1 1 0 0 1 0-1.414z"),f(t,"clip-rule","evenodd"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"viewBox","0 0 20 20"),f(e,"fill","currentColor")},m(l,a){z(l,e,a),g(e,t)},p:G,i:G,o:G,d(l){l&&h(e)}}}class Vt extends ie{constructor(e){super(),oe(this,e,null,Ct,se,{})}}function yt(r){let e,t;return{c(){e=W("svg"),t=W("path"),this.h()},l(l){e=X(l,"svg",{viewBox:!0,xmlns:!0,fill:!0});var a=p(e);t=X(a,"path",{d:!0}),p(t).forEach(h),a.forEach(h),this.h()},h(){f(t,"d","M6 6a2 2 0 0 1 2-2 1 1 0 0 0 0-2 4 4 0 0 0-4 4v3a2 2 0 0 1-2 2 1 1 0 0 0 0 2 2 2 0 0 1 2 2v3a4 4 0 0 0 4 4 1 1 0 0 0 0-2 2 2 0 0 1-2-2v-3a4 4 0 0 0-1.38-3A4 4 0 0 0 6 9Zm16 5a2 2 0 0 1-2-2V6a4 4 0 0 0-4-4 1 1 0 0 0 0 2 2 2 0 0 1 2 2v3a4 4 0 0 0 1.38 3A4 4 0 0 0 18 15v3a2 2 0 0 1-2 2 1 1 0 0 0 0 2 4 4 0 0 0 4-4v-3a2 2 0 0 1 2-2 1 1 0 0 0 0-2Z"),f(e,"viewBox","0 0 24 24"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"fill","currentColor")},m(l,a){z(l,e,a),g(e,t)},p:G,i:G,o:G,d(l){l&&h(e)}}}class Dt extends ie{constructor(e){super(),oe(this,e,null,yt,se,{})}}function jt(r){let e,t;return{c(){e=W("svg"),t=W("path"),this.h()},l(l){e=X(l,"svg",{xmlns:!0,fill:!0,viewBox:!0,stroke:!0});var a=p(e);t=X(a,"path",{"stroke-linecap":!0,"stroke-linejoin":!0,d:!0}),p(t).forEach(h),a.forEach(h),this.h()},h(){f(t,"stroke-linecap","round"),f(t,"stroke-linejoin","round"),f(t,"d","M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2z"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"fill","none"),f(e,"viewBox","0 0 24 24"),f(e,"stroke","currentColor")},m(l,a){z(l,e,a),g(e,t)},p:G,i:G,o:G,d(l){l&&h(e)}}}class Tt extends ie{constructor(e){super(),oe(this,e,null,jt,se,{})}}function It(r){let e,t;return{c(){e=W("svg"),t=W("path"),this.h()},l(l){e=X(l,"svg",{xmlns:!0,fill:!0,viewBox:!0,stroke:!0});var a=p(e);t=X(a,"path",{"stroke-linecap":!0,"stroke-linejoin":!0,d:!0}),p(t).forEach(h),a.forEach(h),this.h()},h(){f(t,"stroke-linecap","round"),f(t,"stroke-linejoin","round"),f(t,"d","M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 0 1 6.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"fill","none"),f(e,"viewBox","0 0 24 24"),f(e,"stroke","currentColor")},m(l,a){z(l,e,a),g(e,t)},p:G,i:G,o:G,d(l){l&&h(e)}}}class Lt extends ie{constructor(e){super(),oe(this,e,null,It,se,{})}}function Bt(r){let e,t,l;return{c(){e=W("svg"),t=W("path"),l=W("path"),this.h()},l(a){e=X(a,"svg",{xmlns:!0,viewBox:!0,fill:!0});var i=p(e);t=X(i,"path",{d:!0}),p(t).forEach(h),l=X(i,"path",{d:!0}),p(l).forEach(h),i.forEach(h),this.h()},h(){f(t,"d","M11 3a1 1 0 1 0 0 2h2.586l-6.293 6.293a1 1 0 1 0 1.414 1.414L15 6.414V9a1 1 0 1 0 2 0V4a1 1 0 0 0-1-1h-5z"),f(l,"d","M5 5a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-3a1 1 0 1 0-2 0v3H5V7h3a1 1 0 0 0 0-2H5z"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"viewBox","0 0 20 20"),f(e,"fill","currentColor")},m(a,i){z(a,e,i),g(e,t),g(e,l)},p:G,i:G,o:G,d(a){a&&h(e)}}}class Mt extends ie{constructor(e){super(),oe(this,e,null,Bt,se,{})}}function zt(r){let e,t;return{c(){e=W("svg"),t=W("path"),this.h()},l(l){e=X(l,"svg",{xmlns:!0,viewBox:!0,fill:!0});var a=p(e);t=X(a,"path",{"fill-rule":!0,d:!0,"clip-rule":!0}),p(t).forEach(h),a.forEach(h),this.h()},h(){f(t,"fill-rule","evenodd"),f(t,"d","M5.05 4.05a7 7 0 1 1 9.9 9.9L10 18.9l-4.95-4.95a7 7 0 0 1 0-9.9zM10 11a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"),f(t,"clip-rule","evenodd"),f(e,"xmlns","http://www.w3.org/2000/svg"),f(e,"viewBox","0 0 20 20"),f(e,"fill","currentColor")},m(l,a){z(l,e,a),g(e,t)},p:G,i:G,o:G,d(l){l&&h(e)}}}class Ot extends ie{constructor(e){super(),oe(this,e,null,zt,se,{})}}function Ne(r,e,t){const l=r.slice();return l[13]=e[t],l}function Ue(r,e,t){const l=r.slice();return l[16]=e[t],l}function Ge(r,e,t){const l=r.slice();return l[19]=e[t],l[21]=t,l}function Ke(r,e,t){const l=r.slice();return l[22]=e[t],l}function Je(r,e,t){const l=r.slice();return l[25]=e[t],l[21]=t,l}function Re(r){let e,t,l,a,i,s;l=new Ot({});let n=q(r[2]),c=[];for(let o=0;o0&&Re(r),ge=q(r[9]),H=[];for(let v=0;vR(H[v],1,1,()=>{H[v]=null});let J=r[3].length>0&&Ze(r),me=q(r[6]),F=[];for(let v=0;vR(N[v],1,1,()=>{N[v]=null});return L=new Dt({}),{c(){e=k("div"),t=k("div"),K&&K.c(),l=S(),a=k("h3"),i=k("a"),s=Y(r[0]),c=S(),o=k("div"),u=k("div");for(let v=0;v0?K?(K.p(v,B),B&4&&U(K,1)):(K=Re(v),K.c(),U(K,1),K.m(t,l)):K&&(be(),R(K,1,1,()=>{K=null}),pe()),(!ae||B&1)&&x(s,v[0]),(!ae||B&128&&n!==(n="entry/#"+v[7]))&&f(i,"href",n),B&512){ge=q(v[9]);let m;for(m=0;m0?J?(J.p(v,B),B&8&&U(J,1)):(J=Ze(v),J.c(),U(J,1),J.m(o,null)):J&&(be(),R(J,1,1,()=>{J=null}),pe()),(!ae||B&2)&&x(E,v[1]),B&64){me=q(v[6]);let m;for(m=0;m{"title"in _&&t(0,s=_.title),"description"in _&&t(1,n=_.description),"periods"in _&&t(10,c=_.periods),"places"in _&&t(2,o=_.places),"languages"in _&&t(3,u=_.languages),"websiteLinks"in _&&t(4,b=_.websiteLinks),"url"in _&&t(11,I=_.url),"lastEdited"in _&&t(5,y=_.lastEdited),"keywords"in _&&t(6,E=_.keywords),"uuid"in _&&t(7,V=_.uuid)},r.$$.update=()=>{r.$$.dirty&1024&&t(9,l=c.filter(_=>_.from)),r.$$.dirty&2048&&t(12,a=I.split("/PROJECTS/")[1]),r.$$.dirty&4096&&t(8,i=St+a)},[s,n,o,u,b,y,E,V,i,l,c,I,a]}class Ht extends ie{constructor(e){super(),oe(this,e,At,Pt,se,{title:0,description:1,periods:10,places:2,languages:3,websiteLinks:4,url:11,lastEdited:5,keywords:6,uuid:7})}}const $e={akk:"Akkadian",amh:"Amharic",ara:"Arabic",arc:"Official Aramaic (700-300 BCE)",atz:"Arta",ave:"Avestan",bam:"Bambara",ben:"Bengali",bod:"Tibetan",bqi:"Bakhtiari",chg:"Chagatai",cop:"Coptic",dan:"Danish",dar:"Dargwa",deu:"German",efi:"Efik",egy:"Egyptian (Ancient)",elx:"Elamite",eng:"English",erk:"South Efate",fas:"Persian",fra:"French",ful:"Fulah",gez:"Geez",gml:"Middle Low German",got:"Gothic",grc:"Ancient Greek (to 1453)",guj:"Gujarati",hac:"Gurani",hau:"Hausa",heb:"Hebrew",hin:"Hindi",hit:"Hittite",hun:"Hungarian",hye:"Armenian",imy:"Milyan",ind:"Indonesian",ita:"Italian",jav:"Javanese",jpn:"Japanese",jpr:"Judeo-Persian",jrb:"Judeo-Arabic",kac:"Kachin",kan:"Kannada",kas:"Kashmiri",kbl:"Kanembu",kgv:"Karas",khm:"Khmer",kur:"Kurdish",lat:"Latin",lav:"Latvian",lit:"Lithuanian",lzz:"Laz",mal:"Malayalam",mar:"Marathi",mku:"Konyanka Maninka",mlt:"Maltese",mon:"Mongolian",mzn:"Mazanderani",nep:"Nepali (macrolanguage)",nld:"Flemish",nrp:"North Picene",ofs:"Old Frisian",oge:"Old Georgian",orv:"Old Russian",osc:"Oscan",oss:"Ossetic",osx:"Old Saxon",pal:"Pahlavi",pli:"Pali",por:"Portuguese",que:"Quechua",raj:"Rajasthani",rus:"Russian",san:"Sanskrit",snd:"Sindhi",snk:"Soninke",sog:"Sogdian",spa:"Spanish",sqi:"Albanian",sux:"Sumerian",sva:"Svan",swe:"Swedish",syr:"Syriac",tab:"Tabassaran",tam:"Tamil",tdn:"Tondano",tel:"Telugu",tio:"Teop",tir:"Tigrinya",tks:"Takestani",tru:"Turoyo",tuh:"Taulil",tur:"Turkish",udi:"Udi",uga:"Ugaritic",und:"Undetermined",urd:"Urdu",vra:"Vera'a",wlm:"Middle Welsh",xbc:"Bactrian",xbm:"Middle Breton",xcr:"Carian",xeb:"Eblan",xlc:"Lycian",xld:"Lydian",xlp:"Lepontic",xpg:"Phrygian",xpr:"Parthian",xsa:"Sabaean",xum:"Umbrian",xur:"Urartian",yid:"Yiddish",yor:"Yoruba",zho:"Chinese",zum:"Kumzari"};function et(r,e,t){const l=r.slice();return l[21]=e[t],l[23]=t,l}function tt(r,e,t){const l=r.slice();return l[24]=e[t],l}function lt(r,e,t){const l=r.slice();return l[18]=e[t],l}function rt(r){let e,t,l="Clear selection",a,i;return{c(){e=k("p"),t=k("button"),t.textContent=l,this.h()},l(s){e=w(s,"P",{class:!0});var n=p(e);t=w(n,"BUTTON",{class:!0,"data-svelte-h":!0}),ve(t)!=="svelte-1llc9mw"&&(t.textContent=l),n.forEach(h),this.h()},h(){f(t,"class","cursor-pointer font-normal text-red-900 underline"),f(e,"class","-mt-1 mb-3.5")},m(s,n){z(s,e,n),g(e,t),a||(i=le(t,"click",Ve),a=!0)},d(s){s&&h(e),a=!1,i()}}}function Nt(r){let e,t,l,a,i,s=r[4]&&at(r);return{c(){e=k("div"),t=k("input"),l=S(),s&&s.c(),this.h()},l(n){e=w(n,"DIV",{class:!0});var c=p(e);t=w(c,"INPUT",{type:!0,autocorrect:!0,autocapitalize:!0,class:!0}),l=A(c),s&&s.l(c),c.forEach(h),this.h()},h(){f(t,"type","text"),f(t,"autocorrect","off"),f(t,"autocapitalize","none"),f(t,"class","w-56 rounded border border-ctgblue bg-gray-100 px-2 py-1"),f(e,"class","flex gap-2 font-normal")},m(n,c){z(n,e,c),g(e,t),Ae(t,r[4]),g(e,l),s&&s.m(e,null),a||(i=[le(t,"input",r[12]),le(t,"keydown",r[13])],a=!0)},p(n,c){c&16&&t.value!==n[4]&&Ae(t,n[4]),n[4]?s||(s=at(n),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(n){n&&h(e),s&&s.d(),a=!1,ft(i)}}}function Ut(r){let e,t=q(Object.keys(r[0])),l=[];for(let a=0;a{t(4,n=d)}),ke.subscribe(d=>{t(2,c=d)}),je.subscribe(d=>{t(3,o=d)});let u;function b(){clearTimeout(u),u=setTimeout(()=>{Ce.set(n);const d=pt(s,n);ht.set(d)},500)}function I(d,L,O,P){if(P==="search")return!1;const Q=Object.values(d).flat(),re=P==="keywords"?Q:L;if(re.length===0)return!1;for(const $ of O)re.includes($)||je.update(de=>(de.delete($),de));return O.size!==0}const y=()=>{ke.set("search"),Ve()},E=()=>{ke.set("keywords"),Ve()},V=()=>{ke.set("languages"),Ve()},_=d=>{Te("languages",d)},D=d=>{Te("keywords",d)};function j(){n=this.value,t(4,n)}const C=()=>{b()},T=()=>{Ce.set("")};return r.$$set=d=>{"keywordsCategorized"in d&&t(0,a=d.keywordsCategorized),"languages"in d&&t(1,i=d.languages)},r.$$.update=()=>{r.$$.dirty&15&&t(5,l=I(a,i,o,c))},[a,i,c,o,n,l,b,y,E,V,_,D,j,C,T]}class Ft extends ie{constructor(e){super(),oe(this,e,qt,Rt,se,{keywordsCategorized:0,languages:1})}}function ct(r,e,t){const l=r.slice();return l[11]=e[t][0],l[12]=e[t][1],l}function ut(r){let e,t;return e=new Ht({props:{title:r[12].project.title,description:r[12].project.project_desc,periods:r[12].project.date,places:He(r[12].project.places),languages:r[12].project.lang,websiteLinks:r[12].project.websites,url:r[11],lastEdited:r[12].record_metadata.last_edited_on||r[12].record_metadata.record_created_on,keywords:r[12].project.keywords,uuid:r[12].record_metadata.uuid}}),{c(){ce(e.$$.fragment)},l(l){ue(e.$$.fragment,l)},m(l,a){fe(e,l,a),t=!0},p(l,a){const i={};a&1&&(i.title=l[12].project.title),a&1&&(i.description=l[12].project.project_desc),a&1&&(i.periods=l[12].project.date),a&1&&(i.places=He(l[12].project.places)),a&1&&(i.languages=l[12].project.lang),a&1&&(i.websiteLinks=l[12].project.websites),a&1&&(i.url=l[11]),a&1&&(i.lastEdited=l[12].record_metadata.last_edited_on||l[12].record_metadata.record_created_on),a&1&&(i.keywords=l[12].project.keywords),a&1&&(i.uuid=l[12].record_metadata.uuid),e.$set(i)},i(l){t||(U(e.$$.fragment,l),t=!0)},o(l){R(e.$$.fragment,l),t=!1},d(l){he(e,l)}}}function Yt(r){let e,t,l,a,i,s,n,c=r[0].length+"",o,u,b=r[0].length===1?"item":"items",I,y,E,V,_,D;a=new Ft({props:{keywordsCategorized:r[2],languages:r[1]}});let j=q(r[0]),C=[];for(let d=0;dR(C[d],1,1,()=>{C[d]=null});return{c(){e=k("meta"),t=S(),l=k("div"),ce(a.$$.fragment),i=S(),s=k("p"),n=k("code"),o=Y(c),u=S(),I=Y(b),y=S(),E=k("div");for(let d=0;d{t(3,o=E)});let u;ht.subscribe(E=>{u=E});let b;ke.subscribe(E=>{t(4,b=E)});let I;je.subscribe(E=>{t(5,I=E)});function y(E,V,_,D){if(_==="search")return V?u:E;if(D.size===0)return E;const j=_==="keywords"?s:c;let C=[],T=!0;for(const d of D){if(!j[d])return Te(_,d),E;const L=j[d];if(T){C=L,T=!1;continue}C=C.filter(O=>L.includes(O))}return E.filter(([d])=>C.includes(d))}return bt(dt),r.$$.update=()=>{r.$$.dirty&56&&t(0,a=y(i,o,b,I))},t(1,l=Object.keys(c).sort()),[a,l,n,o,b,I]}class tl extends ie{constructor(e){super(),oe(this,e,Zt,Yt,se,{})}}export{tl as component}; diff --git a/_app/immutable/nodes/6.DRjXiQVp.js b/_app/immutable/nodes/6.BWudGx52.js similarity index 97% rename from _app/immutable/nodes/6.DRjXiQVp.js rename to _app/immutable/nodes/6.BWudGx52.js index f176cf09d..29e6ac450 100644 --- a/_app/immutable/nodes/6.DRjXiQVp.js +++ b/_app/immutable/nodes/6.BWudGx52.js @@ -4,7 +4,7 @@ function __vite__mapDeps(indexes) { } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } -import{_ as j}from"../chunks/preload-helper.BQ24v_F8.js";import{s as k,n as u,o as E,a as P,b as S}from"../chunks/scheduler.kPUuJgHu.js";import{S as D,i as $,s as F,e as g,k as I,d as p,f as L,c as _,a as x,m as v,g as w,h as T}from"../chunks/index.CYrHsBOq.js";import{f as C}from"../chunks/utils.kS56dN66.js";import{e as M}from"../chunks/ENTRIES.B8oTZR8-.js";function O(m){let n,a,e;return{c(){n=F(),a=g("div"),e=g("div"),this.h()},l(t){I("svelte-1w6dn8w",document.head).forEach(p),n=L(t),a=_(t,"DIV",{class:!0});var d=x(a);e=_(d,"DIV",{class:!0}),x(e).forEach(p),d.forEach(p),this.h()},h(){document.title="Closing the Gap in Non-Latin-Script Data – Map",v(e,"class","h-[34rem] rounded-md font-normal"),v(a,"class","mx-auto max-w-6xl px-4")},m(t,o){w(t,n,o),w(t,a,o),T(a,e),m[1](e)},p:u,i:u,o:u,d(t){t&&(p(n),p(a)),m[1](null)}}}const R="https://github.com/M-L-D-H/Closing-The-Gap-In-Non-Latin-Script-Data/blob/master/PROJECTS/";function V(m,n,a){let e,t;const o={};E(async()=>{const r=await j(()=>import("../chunks/leaflet-src.CKS_39_u.js").then(s=>s.l),__vite__mapDeps([0,1]),import.meta.url);t=r.map(e).setView([51.53443,9.93228],5),r.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors'}).addTo(t);const b=M;for(const[s,i]of b){const h=C(i.project.places),l=`${R}${s.split("/PROJECTS/")[1]}`;for(const c of h){const f=c.place_name.text+c.coordinates.lat.split(".")[0]+c.coordinates.lng.split(".")[0];if(o[f])o[f].projects.push({title:i.project.title,url:l});else{const y={lat:c.coordinates.lat,lng:c.coordinates.lng,projects:[{title:i.project.title,url:l}]};o[f]=y}}}for(const[,s]of Object.entries(o)){const i=s.projects.map(l=>`{const r=await j(()=>import("../chunks/leaflet-src.CKS_39_u.js").then(s=>s.l),__vite__mapDeps([0,1]),import.meta.url);t=r.map(e).setView([51.53443,9.93228],5),r.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors'}).addTo(t);const b=M;for(const[s,i]of b){const h=C(i.project.places),l=`${R}${s.split("/PROJECTS/")[1]}`;for(const c of h){const f=c.place_name.text+c.coordinates.lat.split(".")[0]+c.coordinates.lng.split(".")[0];if(o[f])o[f].projects.push({title:i.project.title,url:l});else{const y={lat:c.coordinates.lat,lng:c.coordinates.lng,projects:[{title:i.project.title,url:l}]};o[f]=y}}}for(const[,s]of Object.entries(o)){const i=s.projects.map(l=>`=48&&r<=57){t++;continue}return!1}return!0}function ks(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function W_(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Om(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;t0&&u[l-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&d===void 0&&(c[h]===void 0?d=u.slice(0,l).join("/"):l==f-1&&(d=t.path),d!==void 0&&g(t,0,e,d)),l++,Array.isArray(c)){if(h==="-")h=c.length;else{if(n&&!Dm(h))throw new Xe("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);Dm(h)&&(h=~~h)}if(l>=f){if(n&&t.op==="add"&&h>c.length)throw new Xe("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var s=qD[t.op].call(t,c,h,e);if(s.test===!1)throw new Xe("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}}else if(l>=f){var s=tu[t.op].call(t,c,h,e);if(s.test===!1)throw new Xe("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}if(c=c[h],n&&l0)throw new Xe('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new Xe("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new Xe("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&Om(e.value))throw new Xe("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n){if(e.op=="add"){var i=e.path.split("/").length,a=r.split("/").length;if(i!==a+1&&i!==a)throw new Xe("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==r)throw new Xe("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if(e.op==="move"||e.op==="copy"){var s={op:"_get",path:e.from,value:void 0},o=G_([s],n);if(o&&o.name==="OPERATION_PATH_UNRESOLVABLE")throw new Xe("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new Xe("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function G_(e,t,n){try{if(!Array.isArray(e))throw new Xe("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)K0(Tn(t),Tn(e),n||!0);else{n=n||mh;for(var r=0;r0&&(e.patches=[],e.callback&&e.callback(r)),r}function Wy(e,t,n,r,i){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var a=Nm(t),s=Nm(e),o=!1,u=s.length-1;u>=0;u--){var c=s[u],l=e[c];if(Tm(t,c)&&!(t[c]===void 0&&l!==void 0&&Array.isArray(t)===!1)){var f=t[c];typeof l=="object"&&l!=null&&typeof f=="object"&&f!=null&&Array.isArray(l)===Array.isArray(f)?Wy(l,f,n,r+"/"+ks(c),i):l!==f&&(i&&n.push({op:"test",path:r+"/"+ks(c),value:Tn(l)}),n.push({op:"replace",path:r+"/"+ks(c),value:Tn(f)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+ks(c),value:Tn(l)}),n.push({op:"remove",path:r+"/"+ks(c)}),o=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}))}if(!(!o&&a.length==s.length))for(var u=0;u0)return[v,r+d.join(`, -`+b),l].join(` -`+u)}return x}(t,"",0)};const i1=zD(nO);function $n(e,t,n){return e.fields=t||[],e.fname=n,e}function Je(e){return e==null?null:e.fname}function Bt(e){return e==null?null:e.fields}function Y_(e){return e.length===1?rO(e[0]):iO(e)}const rO=e=>function(t){return t[e]},iO=e=>{const t=e.length;return function(n){for(let r=0;rs?c():s=o+1:u==="["?(o>s&&c(),i=s=o+1):u==="]"&&(i||R("Access path missing open bracket: "+e),i>0&&c(),i=0,s=o+1)}return i&&R("Access path missing closing bracket: "+e),r&&R("Access path missing closing quote: "+e),o>s&&(o++,c()),t}function Zn(e,t,n){const r=di(e);return e=r.length===1?r[0]:e,$n((n&&n.get||Y_)(r),[e],t||e)}const mf=Zn("id"),Wt=$n(e=>e,[],"identity"),ya=$n(()=>0,[],"zero"),Zu=$n(()=>1,[],"one"),er=$n(()=>!0,[],"true"),la=$n(()=>!1,[],"false");function aO(e,t,n){const r=[t].concat([].slice.call(n));console[e].apply(console,r)}const X_=0,Hy=1,Gy=2,V_=3,K_=4;function Yy(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:aO,r=e||X_;return{level(i){return arguments.length?(r=+i,this):r},error(){return r>=Hy&&n(t||"error","ERROR",arguments),this},warn(){return r>=Gy&&n(t||"warn","WARN",arguments),this},info(){return r>=V_&&n(t||"log","INFO",arguments),this},debug(){return r>=K_&&n(t||"log","DEBUG",arguments),this}}}var P=Array.isArray;function V(e){return e===Object(e)}const m8=e=>e!=="__proto__";function ec(){for(var e=arguments.length,t=new Array(e),n=0;n{for(const a in i)if(a==="signals")r.signals=sO(r.signals,i.signals);else{const s=a==="legend"?{layout:1}:a==="style"?!0:null;tc(r,a,i[a],s)}return r},{})}function tc(e,t,n,r){if(!m8(t))return;let i,a;if(V(n)&&!P(n)){a=V(e[t])?e[t]:e[t]={};for(i in n)r&&(r===!0||r[i])?tc(a,i,n[i]):m8(i)&&(a[i]=n[i])}else e[t]=n}function sO(e,t){if(e==null)return t;const n={},r=[];function i(a){n[a.name]||(n[a.name]=1,r.push(a))}return t.forEach(i),e.forEach(i),r}function xe(e){return e[e.length-1]}function Pt(e){return e==null||e===""?null:+e}const J_=e=>t=>e*Math.exp(t),Q_=e=>t=>Math.log(e*t),Z_=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),ew=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,bh=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function J0(e,t,n,r){const i=n(e[0]),a=n(xe(e)),s=(a-i)*t;return[r(i-s),r(a-s)]}function tw(e,t){return J0(e,t,Pt,Wt)}function nw(e,t){var n=Math.sign(e[0]);return J0(e,t,Q_(n),J_(n))}function rw(e,t,n){return J0(e,t,bh(n),bh(1/n))}function iw(e,t,n){return J0(e,t,Z_(n),ew(n))}function Q0(e,t,n,r,i){const a=r(e[0]),s=r(xe(e)),o=t!=null?r(t):(a+s)/2;return[i(o+(a-o)*n),i(o+(s-o)*n)]}function Xy(e,t,n){return Q0(e,t,n,Pt,Wt)}function Vy(e,t,n){const r=Math.sign(e[0]);return Q0(e,t,n,Q_(r),J_(r))}function yh(e,t,n,r){return Q0(e,t,n,bh(r),bh(1/r))}function Ky(e,t,n,r){return Q0(e,t,n,Z_(r),ew(r))}function aw(e){return 1+~~(new Date(e).getMonth()/3)}function sw(e){return 1+~~(new Date(e).getUTCMonth()/3)}function Y(e){return e!=null?P(e)?e:[e]:[]}function ow(e,t,n){let r=e[0],i=e[1],a;return i=n-t?[t,n]:[r=Math.min(Math.max(r,t),n-a),r+a]}function le(e){return typeof e=="function"}const oO="descending";function Jy(e,t,n){n=n||{},t=Y(t)||[];const r=[],i=[],a={},s=n.comparator||uO;return Y(e).forEach((o,u)=>{o!=null&&(r.push(t[u]===oO?-1:1),i.push(o=le(o)?o:Zn(o,null,n)),(Bt(o)||[]).forEach(c=>a[c]=1))}),i.length===0?null:$n(s(i,r),Object.keys(a))}const Z0=(e,t)=>(et||t==null)&&e!=null?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0),uO=(e,t)=>e.length===1?cO(e[0],t[0]):lO(e,t,e.length),cO=(e,t)=>function(n,r){return Z0(e(n),e(r))*t},lO=(e,t,n)=>(t.push(0),function(r,i){let a,s=0,o=-1;for(;s===0&&++oe}function Qy(e,t){let n;return r=>{n&&clearTimeout(n),n=setTimeout(()=>(t(r),n=null),e)}}function ce(e){for(let t,n,r=1,i=arguments.length;rs&&(s=i))}else{for(i=t(e[n]);ns&&(s=i))}return[a,s]}function uw(e,t){const n=e.length;let r=-1,i,a,s,o,u;if(t==null){for(;++r=a){i=s=a;break}if(r===n)return[-1,-1];for(o=u=r;++ra&&(i=a,o=r),s=a){i=s=a;break}if(r===n)return[-1,-1];for(o=u=r;++ra&&(i=a,o=r),s{i.set(a,e[a])}),i}function cw(e,t,n,r,i,a){if(!n&&n!==0)return a;const s=+n;let o=e[0],u=xe(e),c;ua&&(s=i,i=a,a=s),n=n===void 0||n,r=r===void 0||r,(n?i<=e:io.replace(/\\(.)/g,"$1")):Y(e));const r=e&&e.length,i=n&&n.get||Y_,a=o=>i(t?[o]:di(o));let s;if(!r)s=function(){return""};else if(r===1){const o=a(e[0]);s=function(u){return""+o(u)}}else{const o=e.map(a);s=function(u){let c=""+o[0](u),l=0;for(;++l{t={},n={},r=0},a=(s,o)=>(++r>e&&(n=t,t={},r=1),t[s]=o);return i(),{clear:i,has:s=>ie(t,s)||ie(n,s),get:s=>ie(t,s)?t[s]:ie(n,s)?a(s,n[s]):void 0,set:(s,o)=>ie(t,s)?t[s]=o:a(s,o)}}function gw(e,t,n,r){const i=t.length,a=n.length;if(!a)return t;if(!i)return n;const s=r||new t.constructor(i+a);let o=0,u=0,c=0;for(;o0?n[u++]:t[o++];for(;o=0;)n+=e;return n}function pw(e,t,n,r){const i=n||" ",a=e+"",s=t-a.length;return s<=0?a:r==="left"?Kc(i,s)+a:r==="center"?Kc(i,~~(s/2))+a+Kc(i,Math.ceil(s/2)):a+Kc(i,s)}function bf(e){return e&&xe(e)-e[0]||0}function H(e){return P(e)?"["+e.map(H)+"]":V(e)||X(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function e2(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const hO=e=>we(e)||Ca(e)?e:Date.parse(e);function t2(e,t){return t=t||hO,e==null||e===""?null:t(e)}function n2(e){return e==null||e===""?null:e+""}function Ar(e){const t={},n=e.length;for(let r=0;r9999?"+"+fn(e,6):fn(e,4)}function mO(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":pO(e.getUTCFullYear())+"-"+fn(e.getUTCMonth()+1,2)+"-"+fn(e.getUTCDate(),2)+(i?"T"+fn(t,2)+":"+fn(n,2)+":"+fn(r,2)+"."+fn(i,3)+"Z":r?"T"+fn(t,2)+":"+fn(n,2)+":"+fn(r,2)+"Z":n||t?"T"+fn(t,2)+":"+fn(n,2)+"Z":"")}function bO(e){var t=new RegExp('["'+e+` -\r]`),n=e.charCodeAt(0);function r(f,d){var h,g,p=i(f,function(m,b){if(h)return h(m,b-1);g=m,h=d?gO(m,d):bw(m)});return p.columns=g||[],p}function i(f,d){var h=[],g=f.length,p=0,m=0,b,y=g<=0,v=!1;f.charCodeAt(g-1)===Sc&&--g,f.charCodeAt(g-1)===o1&&--g;function x(){if(y)return a1;if(v)return v=!1,b8;var E,w=p,S;if(f.charCodeAt(w)===s1){for(;p++=g?y=!0:(S=f.charCodeAt(p++))===Sc?v=!0:S===o1&&(v=!0,f.charCodeAt(p)===Sc&&++p),f.slice(w+1,E-1).replace(/""/g,'"')}for(;p1)r=$O(e,t,n);else for(i=0,r=new Array(a=e.arcs.length);it?1:e>=t?0:NaN}function AO(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function rc(e){let t,n,r;e.length!==2?(t=ji,n=(o,u)=>ji(e(o),u),r=(o,u)=>e(o)-u):(t=e===ji||e===AO?e:kO,n=e,r=e);function i(o,u,c=0,l=o.length){if(c>>1;n(o[f],u)<0?c=f+1:l=f}while(c>>1;n(o[f],u)<=0?c=f+1:l=f}while(cc&&r(o[f-1],u)>-r(o[f],u)?f-1:f}return{left:i,center:s,right:a}}function kO(){return 0}function vw(e){return e===null?NaN:+e}function*CO(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const xw=rc(ji),Oa=xw.right,FO=xw.left;rc(vw).center;function MO(e,t){let n=0,r,i=0,a=0;if(t===void 0)for(let s of e)s!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,a+=r*(s-i));else{let s=-1;for(let o of e)(o=t(o,++s,e))!=null&&(o=+o)>=o&&(r=o-i,i+=r/++n,a+=r*(o-i))}if(n>1)return a/(n-1)}function TO(e,t){const n=MO(e,t);return n&&Math.sqrt(n)}class nn{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let r=0;for(let i=0;i0){for(s=t[--n];n>0&&(r=s,i=t[--n],s=r+i,a=i-(s-r),!a););n>0&&(a<0&&t[n-1]<0||a>0&&t[n-1]>0)&&(i=a*2,r=s+i,i==r-s&&(s=r))}return s}}class x8 extends Map{constructor(t,n=Ew){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(Lm(this,t))}has(t){return super.has(Lm(this,t))}set(t,n){return super.set(_w(this,t),n)}delete(t){return super.delete(ww(this,t))}}class vh extends Set{constructor(t,n=Ew){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const r of t)this.add(r)}has(t){return super.has(Lm(this,t))}add(t){return super.add(_w(this,t))}delete(t){return super.delete(ww(this,t))}}function Lm({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function _w({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function ww({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Ew(e){return e!==null&&typeof e=="object"?e.valueOf():e}function NO(e,t){return Array.from(t,n=>e[n])}function DO(e=ji){if(e===ji)return Sw;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Sw(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const OO=Math.sqrt(50),RO=Math.sqrt(10),LO=Math.sqrt(2);function xh(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),s=a>=OO?10:a>=RO?5:a>=LO?2:1;let o,u,c;return i<0?(c=Math.pow(10,-i)/s,o=Math.round(e*c),u=Math.round(t*c),o/ct&&--u,c=-c):(c=Math.pow(10,i)*s,o=Math.round(e/c),u=Math.round(t/c),o*ct&&--u),u0))return[];if(e===t)return[e];const r=t=i))return[];const o=a-i+1,u=new Array(o);if(r)if(s<0)for(let c=0;c=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function zm(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function $w(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?Sw:DO(i);r>n;){if(r-n>600){const u=r-n+1,c=t-n+1,l=Math.log(u),f=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*f*(u-f)/u)*(c-u/2<0?-1:1),h=Math.max(n,Math.floor(t-c*f/u+d)),g=Math.min(r,Math.floor(t+(u-c)*f/u+d));$w(e,t,h,g,i)}const a=e[t];let s=n,o=r;for($c(e,n,t),i(e[r],a)>0&&$c(e,n,r);s0;)--o}i(e[n],a)===0?$c(e,n,o):(++o,$c(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function $c(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Bm(e,t,n){if(e=Float64Array.from(CO(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return zm(e);if(t>=1)return js(e);var r,i=(r-1)*t,a=Math.floor(i),s=js($w(e,a).subarray(0,a+1)),o=zm(e.subarray(a+1));return s+(o-s)*(i-a)}}function Aw(e,t,n=vw){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),s=+n(e[a],a,e),o=+n(e[a+1],a+1,e);return s+(o-s)*(i-a)}}function PO(e,t){let n=0,r=0;if(t===void 0)for(let i of e)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}function kw(e,t){return Bm(e,.5,t)}function*IO(e){for(const t of e)yield*t}function Cw(e){return Array.from(IO(e))}function Nn(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function _h(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function vu(e){return e=_h(Math.abs(e)),e?e[1]:NaN}function qO(e,t){return function(n,r){for(var i=n.length,a=[],s=0,o=e[0],u=0;i>0&&o>0&&(u+o+1>r&&(o=Math.max(1,r-u)),a.push(n.substring(i-=o,i+o)),!((u+=o+1)>r));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}function WO(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var HO=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Js(e){if(!(t=HO.exec(e)))throw new Error("invalid format: "+e);var t;return new r2({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Js.prototype=r2.prototype;function r2(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}r2.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 GO(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Mw;function YO(e,t){var n=_h(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(Mw=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return a===s?r:a>s?r+new Array(a-s+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+_h(e,Math.max(0,t+a-1))[0]}function _8(e,t){var n=_h(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const w8={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:jO,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>_8(e*100,t),r:_8,s:YO,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function E8(e){return e}var S8=Array.prototype.map,$8=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Tw(e){var t=e.grouping===void 0||e.thousands===void 0?E8:qO(S8.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?E8:WO(S8.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function c(f){f=Js(f);var d=f.fill,h=f.align,g=f.sign,p=f.symbol,m=f.zero,b=f.width,y=f.comma,v=f.precision,x=f.trim,_=f.type;_==="n"?(y=!0,_="g"):w8[_]||(v===void 0&&(v=12),x=!0,_="g"),(m||d==="0"&&h==="=")&&(m=!0,d="0",h="=");var E=p==="$"?n:p==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",w=p==="$"?r:/[%p]/.test(_)?s:"",S=w8[_],$=/[defgprs%]/.test(_);v=v===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function F(k){var D=E,A=w,M,C,T;if(_==="c")A=S(k)+A,k="";else{k=+k;var L=k<0||1/k<0;if(k=isNaN(k)?u:S(Math.abs(k),v),x&&(k=GO(k)),L&&+k==0&&g!=="+"&&(L=!1),D=(L?g==="("?g:o:g==="-"||g==="("?"":g)+D,A=(_==="s"?$8[8+Mw/3]:"")+A+(L&&g==="("?")":""),$){for(M=-1,C=k.length;++MT||T>57){A=(T===46?i+k.slice(M+1):k.slice(M))+A,k=k.slice(0,M);break}}}y&&!m&&(k=t(k,1/0));var I=D.length+k.length+A.length,z=I>1)+D+k+A+z.slice(I);break;default:k=z+D+k+A;break}return a(k)}return F.toString=function(){return f+""},F}function l(f,d){var h=c((f=Js(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(vu(d)/3)))*3,p=Math.pow(10,-g),m=$8[8+g/3];return function(b){return h(p*b)+m}}return{format:c,formatPrefix:l}}var sd,eg,i2;XO({thousands:",",grouping:[3],currency:["$",""]});function XO(e){return sd=Tw(e),eg=sd.format,i2=sd.formatPrefix,sd}function Nw(e){return Math.max(0,-vu(Math.abs(e)))}function Dw(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vu(t)/3)))*3-vu(Math.abs(e)))}function Ow(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vu(t)-vu(e))+1}const u1=new Date,c1=new Date;function ut(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),o=i.ceil(a);return a-s(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,o)=>{const u=[];if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a0))return u;let c;do u.push(c=new Date(+a)),t(a,o),e(a);while(cut(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!a(s););else for(;--o>=0;)for(;t(s,1),!a(s););}),n&&(i.count=(a,s)=>(u1.setTime(+a),c1.setTime(+s),e(u1),e(c1),Math.floor(n(u1,c1))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?s=>r(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const xu=ut(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);xu.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ut(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):xu);xu.range;const Li=1e3,Yn=Li*60,Pi=Yn*60,Vi=Pi*24,a2=Vi*7,A8=Vi*30,l1=Vi*365,Ii=ut(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Li)},(e,t)=>(t-e)/Li,e=>e.getUTCSeconds());Ii.range;const tg=ut(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Li)},(e,t)=>{e.setTime(+e+t*Yn)},(e,t)=>(t-e)/Yn,e=>e.getMinutes());tg.range;const ng=ut(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Yn)},(e,t)=>(t-e)/Yn,e=>e.getUTCMinutes());ng.range;const rg=ut(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Li-e.getMinutes()*Yn)},(e,t)=>{e.setTime(+e+t*Pi)},(e,t)=>(t-e)/Pi,e=>e.getHours());rg.range;const ig=ut(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Pi)},(e,t)=>(t-e)/Pi,e=>e.getUTCHours());ig.range;const qi=ut(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Yn)/Vi,e=>e.getDate()-1);qi.range;const Fa=ut(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Vi,e=>e.getUTCDate()-1);Fa.range;const Rw=ut(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Vi,e=>Math.floor(e/Vi));Rw.range;function _o(e){return ut(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Yn)/a2)}const ic=_o(0),wh=_o(1),VO=_o(2),KO=_o(3),_u=_o(4),JO=_o(5),QO=_o(6);ic.range;wh.range;VO.range;KO.range;_u.range;JO.range;QO.range;function wo(e){return ut(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/a2)}const ac=wo(0),Eh=wo(1),ZO=wo(2),eR=wo(3),wu=wo(4),tR=wo(5),nR=wo(6);ac.range;Eh.range;ZO.range;eR.range;wu.range;tR.range;nR.range;const Ll=ut(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Ll.range;const Pl=ut(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Pl.range;const ii=ut(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ii.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ut(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});ii.range;const ai=ut(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ai.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ut(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ai.range;function Lw(e,t,n,r,i,a){const s=[[Ii,1,Li],[Ii,5,5*Li],[Ii,15,15*Li],[Ii,30,30*Li],[a,1,Yn],[a,5,5*Yn],[a,15,15*Yn],[a,30,30*Yn],[i,1,Pi],[i,3,3*Pi],[i,6,6*Pi],[i,12,12*Pi],[r,1,Vi],[r,2,2*Vi],[n,1,a2],[t,1,A8],[t,3,3*A8],[e,1,l1]];function o(c,l,f){const d=lm).right(s,d);if(h===s.length)return e.every(Ra(c/l1,l/l1,f));if(h===0)return xu.every(Math.max(Ra(c,l,f),1));const[g,p]=s[d/s[h-1][2](e[t]=1+n,e),{});function o2(e){const t=Y(e).slice(),n={};return t.length||R("Missing time unit."),t.forEach(i=>{ie(f1,i)?n[i]=1:R(`Invalid time unit: ${i}.`)}),(n[at]||n[Lt]?1:0)+(n[vn]||n[Ut]||n[xn]?1:0)+(n[si]?1:0)>1&&R(`Incompatible time units: ${e}`),t.sort((i,a)=>f1[i]-f1[a]),t}const oR={[At]:"%Y ",[vn]:"Q%q ",[Ut]:"%b ",[xn]:"%d ",[at]:"W%U ",[Lt]:"%a ",[si]:"%j ",[Pn]:"%H:00",[In]:"00:%M",[tr]:":%S",[kr]:".%L",[`${At}-${Ut}`]:"%Y-%m ",[`${At}-${Ut}-${xn}`]:"%Y-%m-%d ",[`${Pn}-${In}`]:"%H:%M"};function Pw(e,t){const n=ce({},oR,t),r=o2(e),i=r.length;let a="",s=0,o,u;for(s=0;ss;--o)if(u=r.slice(s,o).join("-"),n[u]!=null){a+=n[u],s=o;break}return a.trim()}const Ms=new Date;function u2(e){return Ms.setFullYear(e),Ms.setMonth(0),Ms.setDate(1),Ms.setHours(0,0,0,0),Ms}function Iw(e){return Bw(new Date(e))}function zw(e){return Um(new Date(e))}function Bw(e){return qi.count(u2(e.getFullYear())-1,e)}function Um(e){return ic.count(u2(e.getFullYear())-1,e)}function jm(e){return u2(e).getDay()}function uR(e,t,n,r,i,a,s){if(0<=e&&e<100){const o=new Date(-1,t,n,r,i,a,s);return o.setFullYear(e),o}return new Date(e,t,n,r,i,a,s)}function Uw(e){return qw(new Date(e))}function jw(e){return qm(new Date(e))}function qw(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return Fa.count(t-1,e)}function qm(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return ac.count(t-1,e)}function Wm(e){return Ms.setTime(Date.UTC(e,0,1)),Ms.getUTCDay()}function cR(e,t,n,r,i,a,s){if(0<=e&&e<100){const o=new Date(Date.UTC(-1,t,n,r,i,a,s));return o.setUTCFullYear(n.y),o}return new Date(Date.UTC(e,t,n,r,i,a,s))}function Ww(e,t,n,r,i){const a=t||1,s=xe(e),o=(b,y,v)=>(v=v||b,lR(n[v],r[v],b===s&&a,y)),u=new Date,c=Ar(e),l=c[At]?o(At):Ht(2012),f=c[Ut]?o(Ut):c[vn]?o(vn):ya,d=c[at]&&c[Lt]?o(Lt,1,at+Lt):c[at]?o(at,1):c[Lt]?o(Lt,1):c[xn]?o(xn,1):c[si]?o(si,1):Zu,h=c[Pn]?o(Pn):ya,g=c[In]?o(In):ya,p=c[tr]?o(tr):ya,m=c[kr]?o(kr):ya;return function(b){u.setTime(+b);const y=l(u);return i(y,f(u),d(u,y),h(u),g(u),p(u),m(u))}}function lR(e,t,n,r){const i=n<=1?e:r?(a,s)=>r+n*Math.floor((e(a,s)-r)/n):(a,s)=>n*Math.floor(e(a,s)/n);return t?(a,s)=>t(i(a,s),s):i}function Eu(e,t,n){return t+e*7-(n+6)%7}const fR={[At]:e=>e.getFullYear(),[vn]:e=>Math.floor(e.getMonth()/3),[Ut]:e=>e.getMonth(),[xn]:e=>e.getDate(),[Pn]:e=>e.getHours(),[In]:e=>e.getMinutes(),[tr]:e=>e.getSeconds(),[kr]:e=>e.getMilliseconds(),[si]:e=>Bw(e),[at]:e=>Um(e),[at+Lt]:(e,t)=>Eu(Um(e),e.getDay(),jm(t)),[Lt]:(e,t)=>Eu(1,e.getDay(),jm(t))},dR={[vn]:e=>3*e,[at]:(e,t)=>Eu(e,0,jm(t))};function Hw(e,t){return Ww(e,t||1,fR,dR,uR)}const hR={[At]:e=>e.getUTCFullYear(),[vn]:e=>Math.floor(e.getUTCMonth()/3),[Ut]:e=>e.getUTCMonth(),[xn]:e=>e.getUTCDate(),[Pn]:e=>e.getUTCHours(),[In]:e=>e.getUTCMinutes(),[tr]:e=>e.getUTCSeconds(),[kr]:e=>e.getUTCMilliseconds(),[si]:e=>qw(e),[at]:e=>qm(e),[Lt]:(e,t)=>Eu(1,e.getUTCDay(),Wm(t)),[at+Lt]:(e,t)=>Eu(qm(e),e.getUTCDay(),Wm(t))},gR={[vn]:e=>3*e,[at]:(e,t)=>Eu(e,0,Wm(t))};function Gw(e,t){return Ww(e,t||1,hR,gR,cR)}const pR={[At]:ii,[vn]:Ll.every(3),[Ut]:Ll,[at]:ic,[xn]:qi,[Lt]:qi,[si]:qi,[Pn]:rg,[In]:tg,[tr]:Ii,[kr]:xu},mR={[At]:ai,[vn]:Pl.every(3),[Ut]:Pl,[at]:ac,[xn]:Fa,[Lt]:Fa,[si]:Fa,[Pn]:ig,[In]:ng,[tr]:Ii,[kr]:xu};function sc(e){return pR[e]}function oc(e){return mR[e]}function Yw(e,t,n){return e?e.offset(t,n):void 0}function Xw(e,t,n){return Yw(sc(e),t,n)}function Vw(e,t,n){return Yw(oc(e),t,n)}function Kw(e,t,n,r){return e?e.range(t,n,r):void 0}function Jw(e,t,n,r){return Kw(sc(e),t,n,r)}function Qw(e,t,n,r){return Kw(oc(e),t,n,r)}const Jc=1e3,Qc=Jc*60,Zc=Qc*60,ag=Zc*24,bR=ag*7,k8=ag*30,Hm=ag*365,Zw=[At,Ut,xn,Pn,In,tr,kr],el=Zw.slice(0,-1),tl=el.slice(0,-1),nl=tl.slice(0,-1),yR=nl.slice(0,-1),vR=[At,at],C8=[At,Ut],eE=[At],Ac=[[el,1,Jc],[el,5,5*Jc],[el,15,15*Jc],[el,30,30*Jc],[tl,1,Qc],[tl,5,5*Qc],[tl,15,15*Qc],[tl,30,30*Qc],[nl,1,Zc],[nl,3,3*Zc],[nl,6,6*Zc],[nl,12,12*Zc],[yR,1,ag],[vR,1,bR],[C8,1,k8],[C8,3,3*k8],[eE,1,Hm]];function tE(e){const t=e.extent,n=e.maxbins||40,r=Math.abs(bf(t))/n;let i=rc(o=>o[2]).right(Ac,r),a,s;return i===Ac.length?(a=eE,s=Ra(t[0]/Hm,t[1]/Hm,n)):i?(i=Ac[r/Ac[i-1][2]53)return null;"w"in q||(q.w=1),"Z"in q?(Ce=h1(kc(q.y,0,1)),Mt=Ce.getUTCDay(),Ce=Mt>4||Mt===0?Eh.ceil(Ce):Eh(Ce),Ce=Fa.offset(Ce,(q.V-1)*7),q.y=Ce.getUTCFullYear(),q.m=Ce.getUTCMonth(),q.d=Ce.getUTCDate()+(q.w+6)%7):(Ce=d1(kc(q.y,0,1)),Mt=Ce.getDay(),Ce=Mt>4||Mt===0?wh.ceil(Ce):wh(Ce),Ce=qi.offset(Ce,(q.V-1)*7),q.y=Ce.getFullYear(),q.m=Ce.getMonth(),q.d=Ce.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),Mt="Z"in q?h1(kc(q.y,0,1)).getUTCDay():d1(kc(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(Mt+5)%7:q.w+q.U*7-(Mt+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,h1(q)):d1(q)}}function S(K,de,ge,q){for(var wt=0,Ce=de.length,Mt=ge.length,Gt,ps;wt=Mt)return-1;if(Gt=de.charCodeAt(wt++),Gt===37){if(Gt=de.charAt(wt++),ps=_[Gt in F8?de.charAt(wt++):Gt],!ps||(q=ps(K,ge,q))<0)return-1}else if(Gt!=ge.charCodeAt(q++))return-1}return q}function $(K,de,ge){var q=c.exec(de.slice(ge));return q?(K.p=l.get(q[0].toLowerCase()),ge+q[0].length):-1}function F(K,de,ge){var q=h.exec(de.slice(ge));return q?(K.w=g.get(q[0].toLowerCase()),ge+q[0].length):-1}function k(K,de,ge){var q=f.exec(de.slice(ge));return q?(K.w=d.get(q[0].toLowerCase()),ge+q[0].length):-1}function D(K,de,ge){var q=b.exec(de.slice(ge));return q?(K.m=y.get(q[0].toLowerCase()),ge+q[0].length):-1}function A(K,de,ge){var q=p.exec(de.slice(ge));return q?(K.m=m.get(q[0].toLowerCase()),ge+q[0].length):-1}function M(K,de,ge){return S(K,t,de,ge)}function C(K,de,ge){return S(K,n,de,ge)}function T(K,de,ge){return S(K,r,de,ge)}function L(K){return s[K.getDay()]}function I(K){return a[K.getDay()]}function z(K){return u[K.getMonth()]}function Z(K){return o[K.getMonth()]}function ee(K){return i[+(K.getHours()>=12)]}function fe(K){return 1+~~(K.getMonth()/3)}function Ee(K){return s[K.getUTCDay()]}function me(K){return a[K.getUTCDay()]}function Ie(K){return u[K.getUTCMonth()]}function Si(K){return o[K.getUTCMonth()]}function Io(K){return i[+(K.getUTCHours()>=12)]}function gs(K){return 1+~~(K.getUTCMonth()/3)}return{format:function(K){var de=E(K+="",v);return de.toString=function(){return K},de},parse:function(K){var de=w(K+="",!1);return de.toString=function(){return K},de},utcFormat:function(K){var de=E(K+="",x);return de.toString=function(){return K},de},utcParse:function(K){var de=w(K+="",!0);return de.toString=function(){return K},de}}}var F8={"-":"",_:" ",0:"0"},xt=/^\s*\d+/,xR=/^%/,_R=/[\\^$*+?|[\]().{}]/g;function $e(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a[t.toLowerCase(),n]))}function ER(e,t,n){var r=xt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function SR(e,t,n){var r=xt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function $R(e,t,n){var r=xt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function AR(e,t,n){var r=xt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function kR(e,t,n){var r=xt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function M8(e,t,n){var r=xt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function T8(e,t,n){var r=xt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function CR(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function FR(e,t,n){var r=xt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function MR(e,t,n){var r=xt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function N8(e,t,n){var r=xt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function TR(e,t,n){var r=xt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function D8(e,t,n){var r=xt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function NR(e,t,n){var r=xt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function DR(e,t,n){var r=xt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function OR(e,t,n){var r=xt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function RR(e,t,n){var r=xt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function LR(e,t,n){var r=xR.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function PR(e,t,n){var r=xt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function IR(e,t,n){var r=xt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function O8(e,t){return $e(e.getDate(),t,2)}function zR(e,t){return $e(e.getHours(),t,2)}function BR(e,t){return $e(e.getHours()%12||12,t,2)}function UR(e,t){return $e(1+qi.count(ii(e),e),t,3)}function rE(e,t){return $e(e.getMilliseconds(),t,3)}function jR(e,t){return rE(e,t)+"000"}function qR(e,t){return $e(e.getMonth()+1,t,2)}function WR(e,t){return $e(e.getMinutes(),t,2)}function HR(e,t){return $e(e.getSeconds(),t,2)}function GR(e){var t=e.getDay();return t===0?7:t}function YR(e,t){return $e(ic.count(ii(e)-1,e),t,2)}function iE(e){var t=e.getDay();return t>=4||t===0?_u(e):_u.ceil(e)}function XR(e,t){return e=iE(e),$e(_u.count(ii(e),e)+(ii(e).getDay()===4),t,2)}function VR(e){return e.getDay()}function KR(e,t){return $e(wh.count(ii(e)-1,e),t,2)}function JR(e,t){return $e(e.getFullYear()%100,t,2)}function QR(e,t){return e=iE(e),$e(e.getFullYear()%100,t,2)}function ZR(e,t){return $e(e.getFullYear()%1e4,t,4)}function eL(e,t){var n=e.getDay();return e=n>=4||n===0?_u(e):_u.ceil(e),$e(e.getFullYear()%1e4,t,4)}function tL(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+$e(t/60|0,"0",2)+$e(t%60,"0",2)}function R8(e,t){return $e(e.getUTCDate(),t,2)}function nL(e,t){return $e(e.getUTCHours(),t,2)}function rL(e,t){return $e(e.getUTCHours()%12||12,t,2)}function iL(e,t){return $e(1+Fa.count(ai(e),e),t,3)}function aE(e,t){return $e(e.getUTCMilliseconds(),t,3)}function aL(e,t){return aE(e,t)+"000"}function sL(e,t){return $e(e.getUTCMonth()+1,t,2)}function oL(e,t){return $e(e.getUTCMinutes(),t,2)}function uL(e,t){return $e(e.getUTCSeconds(),t,2)}function cL(e){var t=e.getUTCDay();return t===0?7:t}function lL(e,t){return $e(ac.count(ai(e)-1,e),t,2)}function sE(e){var t=e.getUTCDay();return t>=4||t===0?wu(e):wu.ceil(e)}function fL(e,t){return e=sE(e),$e(wu.count(ai(e),e)+(ai(e).getUTCDay()===4),t,2)}function dL(e){return e.getUTCDay()}function hL(e,t){return $e(Eh.count(ai(e)-1,e),t,2)}function gL(e,t){return $e(e.getUTCFullYear()%100,t,2)}function pL(e,t){return e=sE(e),$e(e.getUTCFullYear()%100,t,2)}function mL(e,t){return $e(e.getUTCFullYear()%1e4,t,4)}function bL(e,t){var n=e.getUTCDay();return e=n>=4||n===0?wu(e):wu.ceil(e),$e(e.getUTCFullYear()%1e4,t,4)}function yL(){return"+0000"}function L8(){return"%"}function P8(e){return+e}function I8(e){return Math.floor(+e/1e3)}var zo,c2,oE,l2,uE;vL({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 vL(e){return zo=nE(e),c2=zo.format,oE=zo.parse,l2=zo.utcFormat,uE=zo.utcParse,zo}function rl(e){const t={};return n=>t[n]||(t[n]=e(n))}function xL(e,t){return n=>{const r=e(n),i=r.indexOf(t);if(i<0)return r;let a=_L(r,i);const s=ai;)if(r[a]!=="0"){++a;break}return r.slice(0,a)+s}}function _L(e,t){let n=e.lastIndexOf("e"),r;if(n>0)return n;for(n=e.length;--n>t;)if(r=e.charCodeAt(n),r>=48&&r<=57)return n+1}function cE(e){const t=rl(e.format),n=e.formatPrefix;return{format:t,formatPrefix:n,formatFloat(r){const i=Js(r||",");if(i.precision==null){switch(i.precision=12,i.type){case"%":i.precision-=2;break;case"e":i.precision-=1;break}return xL(t(i),t(".1f")(1)[1])}else return t(i)},formatSpan(r,i,a,s){s=Js(s??",f");const o=Ra(r,i,a),u=Math.max(Math.abs(r),Math.abs(i));let c;if(s.precision==null)switch(s.type){case"s":return isNaN(c=Dw(o,u))||(s.precision=c),n(s,u);case"":case"e":case"g":case"p":case"r":{isNaN(c=Ow(o,u))||(s.precision=c-(s.type==="e"));break}case"f":case"%":{isNaN(c=Nw(o))||(s.precision=c-(s.type==="%")*2);break}}return t(s)}}}let Gm;lE();function lE(){return Gm=cE({format:eg,formatPrefix:i2})}function fE(e){return cE(Tw(e))}function Sh(e){return arguments.length?Gm=fE(e):Gm}function z8(e,t,n){n=n||{},V(n)||R(`Invalid time multi-format specifier: ${n}`);const r=t(tr),i=t(In),a=t(Pn),s=t(xn),o=t(at),u=t(Ut),c=t(vn),l=t(At),f=e(n[kr]||".%L"),d=e(n[tr]||":%S"),h=e(n[In]||"%I:%M"),g=e(n[Pn]||"%I %p"),p=e(n[xn]||n[Lt]||"%a %d"),m=e(n[at]||"%b %d"),b=e(n[Ut]||"%B"),y=e(n[vn]||"%B"),v=e(n[At]||"%Y");return x=>(r(x)X(r)?t(r):z8(t,sc,r),utcFormat:r=>X(r)?n(r):z8(n,oc,r),timeParse:rl(e.parse),utcParse:rl(e.utcParse)}}let Ym;hE();function hE(){return Ym=dE({format:c2,parse:oE,utcFormat:l2,utcParse:uE})}function gE(e){return dE(nE(e))}function Il(e){return arguments.length?Ym=gE(e):Ym}const Xm=(e,t)=>ce({},e,t);function pE(e,t){const n=e?fE(e):Sh(),r=t?gE(t):Il();return Xm(n,r)}function f2(e,t){const n=arguments.length;return n&&n!==2&&R("defaultLocale expects either zero or two arguments."),n?Xm(Sh(e),Il(t)):Xm(Sh(),Il())}function wL(){return lE(),hE(),f2()}const EL=/^(data:|([A-Za-z]+:)?\/\/)/,SL=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,$L=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,B8="file://";function AL(e,t){return n=>({options:n||{},sanitize:CL,load:kL,fileAccess:!!t,file:FL(t),http:TL(e)})}async function kL(e,t){const n=await this.sanitize(e,t),r=n.href;return n.localFile?this.file(r):this.http(r,t)}async function CL(e,t){t=ce({},this.options,t);const n=this.fileAccess,r={href:null};let i,a,s;const o=SL.test(e.replace($L,""));(e==null||typeof e!="string"||!o)&&R("Sanitize failure, invalid URI: "+H(e));const u=EL.test(e);return(s=t.baseURL)&&!u&&(!e.startsWith("/")&&!s.endsWith("/")&&(e="/"+e),e=s+e),a=(i=e.startsWith(B8))||t.mode==="file"||t.mode!=="http"&&!u&&n,i?e=e.slice(B8.length):e.startsWith("//")&&(t.defaultProtocol==="file"?(e=e.slice(2),a=!0):e=(t.defaultProtocol||"http")+":"+e),Object.defineProperty(r,"localFile",{value:!!a}),r.href=e,t.target&&(r.target=t.target+""),t.rel&&(r.rel=t.rel+""),t.context==="image"&&t.crossOrigin&&(r.crossOrigin=t.crossOrigin+""),r}function FL(e){return e?t=>new Promise((n,r)=>{e.readFile(t,(i,a)=>{i?r(i):n(a)})}):ML}async function ML(){R("No file system access.")}function TL(e){return e?async function(t,n){const r=ce({},this.options.http,n),i=n&&n.response,a=await e(t,r);return a.ok?le(a[i])?a[i]():a.text():R(a.status+""+a.statusText)}:NL}async function NL(){R("No HTTP fetch method available.")}const DL=e=>e!=null&&e===e,OL=e=>e==="true"||e==="false"||e===!0||e===!1,RL=e=>!Number.isNaN(Date.parse(e)),mE=e=>!Number.isNaN(+e)&&!(e instanceof Date),LL=e=>mE(e)&&Number.isInteger(+e),Vm={boolean:e2,integer:Pt,number:Pt,date:t2,string:n2,unknown:Wt},od=[OL,LL,mE,RL],PL=["boolean","integer","number","date"];function bE(e,t){if(!e||!e.length)return"unknown";const n=e.length,r=od.length,i=od.map((a,s)=>s+1);for(let a=0,s=0,o,u;aa===0?s:a,0)-1]}function yE(e,t){return t.reduce((n,r)=>(n[r]=bE(e,r),n),{})}function U8(e){const t=function(n,r){const i={delimiter:e};return d2(n,r?ce(r,i):i)};return t.responseType="text",t}function d2(e,t){return t.header&&(e=t.header.map(H).join(t.delimiter)+` -`+e),bO(t.delimiter).parse(e+"")}d2.responseType="text";function IL(e){return typeof Buffer=="function"&&le(Buffer.isBuffer)?Buffer.isBuffer(e):!1}function h2(e,t){const n=t&&t.property?Zn(t.property):Wt;return V(e)&&!IL(e)?zL(n(e),t):n(JSON.parse(e))}h2.responseType="json";function zL(e,t){return!P(e)&&lw(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}const BL={interior:(e,t)=>e!==t,exterior:(e,t)=>e===t};function vE(e,t){let n,r,i,a;return e=h2(e,t),t&&t.feature?(n=_O,i=t.feature):t&&t.mesh?(n=EO,i=t.mesh,a=BL[t.filter]):R("Missing TopoJSON feature or mesh parameter."),r=(r=e.objects[i])?n(e,r,a):R("Invalid TopoJSON object: "+i),r&&r.features||[r]}vE.responseType="json";const Hd={dsv:d2,csv:U8(","),tsv:U8(" "),json:h2,topojson:vE};function g2(e,t){return arguments.length>1?(Hd[e]=t,this):ie(Hd,e)?Hd[e]:null}function xE(e){const t=g2(e);return t&&t.responseType||"text"}function _E(e,t,n,r){t=t||{};const i=g2(t.type||"json");return i||R("Unknown data format type: "+t.type),e=i(e,t),t.parse&&UL(e,t.parse,n,r),ie(e,"columns")&&delete e.columns,e}function UL(e,t,n,r){if(!e.length)return;const i=Il();n=n||i.timeParse,r=r||i.utcParse;let a=e.columns||Object.keys(e[0]),s,o,u,c,l,f;t==="auto"&&(t=yE(e,a)),a=Object.keys(t);const d=a.map(h=>{const g=t[h];let p,m;if(g&&(g.startsWith("date:")||g.startsWith("utc:")))return p=g.split(/:(.+)?/,2),m=p[1],(m[0]==="'"&&m[m.length-1]==="'"||m[0]==='"'&&m[m.length-1]==='"')&&(m=m.slice(1,-1)),(p[0]==="utc"?r:n)(m);if(!Vm[g])throw Error("Illegal format pattern: "+h+":"+g);return Vm[g]});for(u=0,l=e.length,f=a.length;u{const a=t(i);return r[a]||(r[a]=1,n.push(i)),n},n.remove=i=>{const a=t(i);if(r[a]){r[a]=0;const s=n.indexOf(i);s>=0&&n.splice(s,1)}return n},n}async function Gd(e,t){try{await t(e)}catch(n){e.error(n)}}const wE=Symbol("vega_id");let jL=1;function ug(e){return!!(e&&ne(e))}function ne(e){return e[wE]}function EE(e,t){return e[wE]=t,e}function Me(e){const t=e===Object(e)?e:{data:e};return ne(t)?t:EE(t,jL++)}function p2(e){return cg(e,Me({}))}function cg(e,t){for(const n in e)t[n]=e[n];return t}function SE(e,t){return EE(t,ne(e))}function Eo(e,t){return e?t?(n,r)=>e(n,r)||ne(t(n))-ne(t(r)):(n,r)=>e(n,r)||ne(n)-ne(r):null}function $E(e){return e&&e.constructor===So}function So(){const e=[],t=[],n=[],r=[],i=[];let a=null,s=!1;return{constructor:So,insert(o){const u=Y(o),c=u.length;for(let l=0;l{g(y)&&(c[ne(y)]=-1)});for(f=0,d=e.length;f0&&(b(p,g,h.value),o.modifies(g));for(f=0,d=i.length;f{g(y)&&c[ne(y)]>0&&b(y,h.field,h.value)}),o.modifies(h.field);if(s)o.mod=t.length||r.length?u.filter(y=>c[ne(y)]>0):u.slice();else for(m in l)o.mod.push(l[m]);return(a||a==null&&(t.length||r.length))&&o.clean(!0),o}}}const Yd="_:mod:_";function lg(){Object.defineProperty(this,Yd,{writable:!0,value:{}})}lg.prototype={set(e,t,n,r){const i=this,a=i[e],s=i[Yd];return t!=null&&t>=0?(a[t]!==n||r)&&(a[t]=n,s[t+":"+e]=-1,s[e]=-1):(a!==n||r)&&(i[e]=n,s[e]=P(n)?1+n.length:-1),i},modified(e,t){const n=this[Yd];if(arguments.length){if(P(e)){for(let r=0;r=0?t+1{h instanceof Pe?(h!==this&&(t&&h.targets().add(this),a.push(h)),i.push({op:h,name:f,index:d})):r.set(f,d,h)};for(s in e)if(o=e[s],s===WL)Y(o).forEach(f=>{f instanceof Pe?f!==this&&(f.targets().add(this),a.push(f)):R("Pulse parameters must be operator instances.")}),this.source=o;else if(P(o))for(r.set(s,-1,Array(u=o.length)),c=0;c{const n=Date.now();return n-t>e?(t=n,1):0})},debounce(e){const t=fa();return this.targets().add(fa(null,null,Qy(e,n=>{const r=n.dataflow;t.receive(n),r&&r.run&&r.run()}))),t},between(e,t){let n=!1;return e.targets().add(fa(null,null,()=>n=!0)),t.targets().add(fa(null,null,()=>n=!1)),this.filter(()=>n)},detach(){this._filter=er,this._targets=null}};function JL(e,t,n,r){const i=this,a=fa(n,r),s=function(c){c.dataflow=i;try{a.receive(c)}catch(l){i.error(l)}finally{i.run()}};let o;typeof e=="string"&&typeof document<"u"?o=document.querySelectorAll(e):o=Y(e);const u=o.length;for(let c=0;ct=r);return n.requests=0,n.done=()=>{--n.requests===0&&(e._pending=null,t(e))},e._pending=n}const rP={skip:!0};function iP(e,t,n,r,i){return(e instanceof Pe?sP:aP)(this,e,t,n,r,i),this}function aP(e,t,n,r,i,a){const s=ce({},a,rP);let o,u;le(n)||(n=Ht(n)),r===void 0?o=c=>e.touch(n(c)):le(r)?(u=new Pe(null,r,i,!1),o=c=>{u.evaluate(c);const l=n(c),f=u.value;$E(f)?e.pulse(l,f,a):e.update(l,f,s)}):o=c=>e.update(n(c),r,s),t.apply(o)}function sP(e,t,n,r,i,a){if(r===void 0)t.targets().add(n);else{const s=a||{},o=new Pe(null,oP(n,r),i,!1);o.modified(s.force),o.rank=t.rank,t.targets().add(o),n&&(o.skip(!0),o.value=n.value,o.targets().add(n),e.connect(n,[o]))}}function oP(e,t){return t=le(t)?t:Ht(t),e?function(n,r){const i=t(n,r);return e.skip()||(e.skip(i!==this.value).value=i),i}:t}function uP(e){e.rank=++this._rank}function cP(e){const t=[e];let n,r,i;for(;t.length;)if(this.rank(n=t.pop()),r=n._targets)for(i=r.length;--i>=0;)t.push(n=r[i]),n===e&&R("Cycle detected in dataflow graph.")}const $h={},Wr=1,ga=2,Fi=4,lP=Wr|ga,q8=Wr|Fi,Bo=Wr|ga|Fi,W8=8,Mc=16,H8=32,G8=64;function Ma(e,t,n){this.dataflow=e,this.stamp=t??-1,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=n||null}function g1(e,t){const n=[];return ha(e,t,r=>n.push(r)),n}function Y8(e,t){const n={};return e.visit(t,r=>{n[ne(r)]=1}),r=>n[ne(r)]?null:r}function ud(e,t){return e?(n,r)=>e(n,r)&&t(n,r):t}Ma.prototype={StopPropagation:$h,ADD:Wr,REM:ga,MOD:Fi,ADD_REM:lP,ADD_MOD:q8,ALL:Bo,REFLOW:W8,SOURCE:Mc,NO_SOURCE:H8,NO_FIELDS:G8,fork(e){return new Ma(this.dataflow).init(this,e)},clone(){const e=this.fork(Bo);return e.add=e.add.slice(),e.rem=e.rem.slice(),e.mod=e.mod.slice(),e.source&&(e.source=e.source.slice()),e.materialize(Bo|Mc)},addAll(){let e=this;return!e.source||e.add===e.rem||!e.rem.length&&e.source.length===e.add.length||(e=new Ma(this.dataflow).init(this),e.add=e.source,e.rem=[]),e},init(e,t){const n=this;return n.stamp=e.stamp,n.encode=e.encode,e.fields&&!(t&G8)&&(n.fields=e.fields),t&Wr?(n.addF=e.addF,n.add=e.add):(n.addF=null,n.add=[]),t&ga?(n.remF=e.remF,n.rem=e.rem):(n.remF=null,n.rem=[]),t&Fi?(n.modF=e.modF,n.mod=e.mod):(n.modF=null,n.mod=[]),t&H8?(n.srcF=null,n.source=null):(n.srcF=e.srcF,n.source=e.source,e.cleans&&(n.cleans=e.cleans)),n},runAfter(e){this.dataflow.runAfter(e)},changed(e){const t=e||Bo;return t&Wr&&this.add.length||t&ga&&this.rem.length||t&Fi&&this.mod.length},reflow(e){if(e)return this.fork(Bo).reflow();const t=this.add.length,n=this.source&&this.source.length;return n&&n!==t&&(this.mod=this.source,t&&this.filter(Fi,Y8(this,Wr))),this},clean(e){return arguments.length?(this.cleans=!!e,this):this.cleans},modifies(e){const t=this.fields||(this.fields={});return P(e)?e.forEach(n=>t[n]=!0):t[e]=!0,this},modified(e,t){const n=this.fields;return(t||this.mod.length)&&n?arguments.length?P(e)?e.some(r=>n[r]):n[e]:!!n:!1},filter(e,t){const n=this;return e&Wr&&(n.addF=ud(n.addF,t)),e&ga&&(n.remF=ud(n.remF,t)),e&Fi&&(n.modF=ud(n.modF,t)),e&Mc&&(n.srcF=ud(n.srcF,t)),n},materialize(e){e=e||Bo;const t=this;return e&Wr&&t.addF&&(t.add=g1(t.add,t.addF),t.addF=null),e&ga&&t.remF&&(t.rem=g1(t.rem,t.remF),t.remF=null),e&Fi&&t.modF&&(t.mod=g1(t.mod,t.modF),t.modF=null),e&Mc&&t.srcF&&(t.source=t.source.filter(t.srcF),t.srcF=null),t},visit(e,t){const n=this,r=t;if(e&Mc)return ha(n.source,n.srcF,r),n;e&Wr&&ha(n.add,n.addF,r),e&ga&&ha(n.rem,n.remF,r),e&Fi&&ha(n.mod,n.modF,r);const i=n.source;if(e&W8&&i){const a=n.add.length+n.mod.length;a===i.length||(a?ha(i,Y8(n,q8),r):ha(i,n.srcF,r))}return n}};function m2(e,t,n,r){const i=this;let a=0;this.dataflow=e,this.stamp=t,this.fields=null,this.encode=r||null,this.pulses=n;for(const s of n)if(s.stamp===t){if(s.fields){const o=i.fields||(i.fields={});for(const u in s.fields)o[u]=1}s.changed(i.ADD)&&(a|=i.ADD),s.changed(i.REM)&&(a|=i.REM),s.changed(i.MOD)&&(a|=i.MOD)}this.changes=a}W(m2,Ma,{fork(e){const t=new Ma(this.dataflow).init(this,e&this.NO_FIELDS);return e!==void 0&&(e&t.ADD&&this.visit(t.ADD,n=>t.add.push(n)),e&t.REM&&this.visit(t.REM,n=>t.rem.push(n)),e&t.MOD&&this.visit(t.MOD,n=>t.mod.push(n))),t},changed(e){return this.changes&e},modified(e){const t=this,n=t.fields;return n&&t.changes&t.MOD?P(e)?e.some(r=>n[r]):n[e]:0},filter(){R("MultiPulse does not support filtering.")},materialize(){R("MultiPulse does not support materialization.")},visit(e,t){const n=this,r=n.pulses,i=r.length;let a=0;if(e&n.SOURCE)for(;ar._enqueue(l,!0)),r._touched=og(mf);let s=0,o,u,c;try{for(;r._heap.size()>0;){if(o=r._heap.pop(),o.rank!==o.qrank){r._enqueue(o,!0);continue}u=o.run(r._getPulse(o,e)),u.then?u=await u:u.async&&(i.push(u.async),u=$h),u!==$h&&o._targets&&o._targets.forEach(l=>r._enqueue(l)),++s}}catch(l){r._heap.clear(),c=l}if(r._input={},r._pulse=null,r.debug(`Pulse ${a}: ${s} operators`),c&&(r._postrun=[],r.error(c)),r._postrun.length){const l=r._postrun.sort((f,d)=>d.priority-f.priority);r._postrun=[];for(let f=0;fr.runAsync(null,()=>{l.forEach(f=>{try{f(r)}catch(d){r.error(d)}})})),r}async function dP(e,t,n){for(;this._running;)await this._running;const r=()=>this._running=null;return(this._running=this.evaluate(e,t,n)).then(r,r),this._running}function hP(e,t,n){return this._pulse?AE(this):(this.evaluate(e,t,n),this)}function gP(e,t,n){if(this._pulse||t)this._postrun.push({priority:n||0,callback:e});else try{e(this)}catch(r){this.error(r)}}function AE(e){return e.error("Dataflow already running. Use runAsync() to chain invocations."),e}function pP(e,t){const n=e.stampi.pulse),t):this._input[e.id]||bP(this._pulse,n&&n.pulse)}function bP(e,t){return t&&t.stamp===e.stamp?t:(e=e.fork(),t&&t!==$h&&(e.source=t.source),e)}const b2={skip:!1,force:!1};function yP(e,t){const n=t||b2;return this._pulse?this._enqueue(e):this._touched.add(e),n.skip&&e.skip(!0),this}function vP(e,t,n){const r=n||b2;return(e.set(t)||r.force)&&this.touch(e,r),this}function xP(e,t,n){this.touch(e,n||b2);const r=new Ma(this,this._clock+(this._pulse?0:1)),i=e.pulse&&e.pulse.source||[];return r.target=e,this._input[e.id]=t.pulse(r,i),this}function _P(e){let t=[];return{clear:()=>t=[],size:()=>t.length,peek:()=>t[0],push:n=>(t.push(n),kE(t,0,t.length-1,e)),pop:()=>{const n=t.pop();let r;return t.length?(r=t[0],t[0]=n,wP(t,0,e)):r=n,r}}}function kE(e,t,n,r){let i,a;const s=e[n];for(;n>t;){if(a=n-1>>1,i=e[a],r(s,i)<0){e[n]=i,n=a;continue}break}return e[n]=s}function wP(e,t,n){const r=t,i=e.length,a=e[t];let s=(t<<1)+1,o;for(;s=0&&(s=o),e[t]=e[s],t=s,s=(t<<1)+1;return e[t]=a,kE(e,r,t,n)}function uu(){this.logger(Yy()),this.logLevel(Hy),this._clock=0,this._rank=0,this._locale=f2();try{this._loader=sg()}catch{}this._touched=og(mf),this._input={},this._pulse=null,this._heap=_P((e,t)=>e.qrank-t.qrank),this._postrun=[]}function Tc(e){return function(){return this._log[e].apply(this,arguments)}}uu.prototype={stamp(){return this._clock},loader(e){return arguments.length?(this._loader=e,this):this._loader},locale(e){return arguments.length?(this._locale=e,this):this._locale},logger(e){return arguments.length?(this._log=e,this):this._log},error:Tc("error"),warn:Tc("warn"),info:Tc("info"),debug:Tc("debug"),logLevel:Tc("level"),cleanThreshold:1e4,add:XL,connect:VL,rank:uP,rerank:cP,pulse:xP,touch:yP,update:vP,changeset:So,ingest:ZL,parse:QL,preload:tP,request:eP,events:JL,on:iP,evaluate:fP,run:hP,runAsync:dP,runAfter:gP,_enqueue:pP,_getPulse:mP};function N(e,t){Pe.call(this,e,null,t)}W(N,Pe,{run(e){if(e.stampthis.pulse=n):t!==e.StopPropagation&&(this.pulse=t),t},evaluate(e){const t=this.marshall(e.stamp),n=this.transform(t,e);return t.clear(),n},transform(){}});const Su={};function CE(e){const t=FE(e);return t&&t.Definition||null}function FE(e){return e=e&&e.toLowerCase(),ie(Su,e)?Su[e]:null}function*ME(e,t){if(t==null)for(let n of e)n!=null&&n!==""&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)r=t(r,++n,e),r!=null&&r!==""&&(r=+r)>=r&&(yield r)}}function y2(e,t,n){const r=Float64Array.from(ME(e,n));return r.sort(ji),t.map(i=>Aw(r,i))}function v2(e,t){return y2(e,[.25,.5,.75],t)}function x2(e,t){const n=e.length,r=TO(e,t),i=v2(e,t),a=(i[2]-i[0])/1.34;return 1.06*(Math.min(r,a)||r||Math.abs(i[0])||1)*Math.pow(n,-.2)}function TE(e){const t=e.maxbins||20,n=e.base||10,r=Math.log(n),i=e.divide||[5,2];let a=e.extent[0],s=e.extent[1],o,u,c,l,f,d;const h=e.span||s-a||Math.abs(a)||1;if(e.step)o=e.step;else if(e.steps){for(l=h/t,f=0,d=e.steps.length;ft;)o*=n;for(f=0,d=i.length;f=c&&h/l<=t&&(o=l)}l=Math.log(o);const g=l>=0?0:~~(-l/r)+1,p=Math.pow(n,-g-1);return(e.nice||e.nice===void 0)&&(l=Math.floor(a/o+p)*o,a=ad);const i=e.length,a=new Float64Array(i);let s=0,o=1,u=r(e[0]),c=u,l=u+t,f;for(;o=l){for(c=(u+c)/2;s>1);si;)e[s--]=e[r]}r=i,i=a}return e}function $P(e){return function(){return e=(1103515245*e+12345)%2147483647,e/2147483647}}function AP(e,t){t==null&&(t=e,e=0);let n,r,i;const a={min(s){return arguments.length?(n=s||0,i=r-n,a):n},max(s){return arguments.length?(r=s||0,i=r-n,a):r},sample(){return n+Math.floor(i*nr())},pdf(s){return s===Math.floor(s)&&s>=n&&s=r?1:(o-n+1)/i},icdf(s){return s>=0&&s<=1?n-1+Math.floor(s*i):NaN}};return a.min(e).max(t)}const OE=Math.sqrt(2*Math.PI),kP=Math.SQRT2;let Nc=NaN;function dg(e,t){e=e||0,t=t??1;let n=0,r=0,i,a;if(Nc===Nc)n=Nc,Nc=NaN;else{do n=nr()*2-1,r=nr()*2-1,i=n*n+r*r;while(i===0||i>1);a=Math.sqrt(-2*Math.log(i)/i),n*=a,Nc=r*a}return e+n*t}function _2(e,t,n){n=n??1;const r=(e-(t||0))/n;return Math.exp(-.5*r*r)/(n*OE)}function hg(e,t,n){t=t||0,n=n??1;const r=(e-t)/n,i=Math.abs(r);let a;if(i>37)a=0;else{const s=Math.exp(-i*i/2);let o;i<7.07106781186547?(o=.0352624965998911*i+.700383064443688,o=o*i+6.37396220353165,o=o*i+33.912866078383,o=o*i+112.079291497871,o=o*i+221.213596169931,o=o*i+220.206867912376,a=s*o,o=.0883883476483184*i+1.75566716318264,o=o*i+16.064177579207,o=o*i+86.7807322029461,o=o*i+296.564248779674,o=o*i+637.333633378831,o=o*i+793.826512519948,o=o*i+440.413735824752,a=a/o):(o=i+.65,o=i+4/o,o=i+3/o,o=i+2/o,o=i+1/o,a=s/o/2.506628274631)}return r>0?1-a:a}function gg(e,t,n){return e<0||e>1?NaN:(t||0)+(n??1)*kP*CP(2*e-1)}function CP(e){let t=-Math.log((1-e)*(1+e)),n;return t<6.25?(t-=3.125,n=-364441206401782e-35,n=-16850591381820166e-35+n*t,n=128584807152564e-32+n*t,n=11157877678025181e-33+n*t,n=-1333171662854621e-31+n*t,n=20972767875968562e-33+n*t,n=6637638134358324e-30+n*t,n=-4054566272975207e-29+n*t,n=-8151934197605472e-29+n*t,n=26335093153082323e-28+n*t,n=-12975133253453532e-27+n*t,n=-5415412054294628e-26+n*t,n=10512122733215323e-25+n*t,n=-4112633980346984e-24+n*t,n=-29070369957882005e-24+n*t,n=42347877827932404e-23+n*t,n=-13654692000834679e-22+n*t,n=-13882523362786469e-21+n*t,n=.00018673420803405714+n*t,n=-.000740702534166267+n*t,n=-.006033670871430149+n*t,n=.24015818242558962+n*t,n=1.6536545626831027+n*t):t<16?(t=Math.sqrt(t)-3.25,n=22137376921775787e-25,n=9075656193888539e-23+n*t,n=-27517406297064545e-23+n*t,n=18239629214389228e-24+n*t,n=15027403968909828e-22+n*t,n=-4013867526981546e-21+n*t,n=29234449089955446e-22+n*t,n=12475304481671779e-21+n*t,n=-47318229009055734e-21+n*t,n=6828485145957318e-20+n*t,n=24031110387097894e-21+n*t,n=-.0003550375203628475+n*t,n=.0009532893797373805+n*t,n=-.0016882755560235047+n*t,n=.002491442096107851+n*t,n=-.003751208507569241+n*t,n=.005370914553590064+n*t,n=1.0052589676941592+n*t,n=3.0838856104922208+n*t):Number.isFinite(t)?(t=Math.sqrt(t)-5,n=-27109920616438573e-27,n=-2555641816996525e-25+n*t,n=15076572693500548e-25+n*t,n=-3789465440126737e-24+n*t,n=761570120807834e-23+n*t,n=-1496002662714924e-23+n*t,n=2914795345090108e-23+n*t,n=-6771199775845234e-23+n*t,n=22900482228026655e-23+n*t,n=-99298272942317e-20+n*t,n=4526062597223154e-21+n*t,n=-1968177810553167e-20+n*t,n=7599527703001776e-20+n*t,n=-.00021503011930044477+n*t,n=-.00013871931833623122+n*t,n=1.0103004648645344+n*t,n=4.849906401408584+n*t):n=1/0,n*e}function w2(e,t){let n,r;const i={mean(a){return arguments.length?(n=a||0,i):n},stdev(a){return arguments.length?(r=a??1,i):r},sample:()=>dg(n,r),pdf:a=>_2(a,n,r),cdf:a=>hg(a,n,r),icdf:a=>gg(a,n,r)};return i.mean(e).stdev(t)}function E2(e,t){const n=w2();let r=0;const i={data(a){return arguments.length?(e=a,r=a?a.length:0,i.bandwidth(t)):e},bandwidth(a){return arguments.length?(t=a,!t&&e&&(t=x2(e)),i):t},sample(){return e[~~(nr()*r)]+t*n.sample()},pdf(a){let s=0,o=0;for(;oS2(n,r),pdf:a=>$2(a,n,r),cdf:a=>A2(a,n,r),icdf:a=>k2(a,n,r)};return i.mean(e).stdev(t)}function LE(e,t){let n=0,r;function i(s){const o=[];let u=0,c;for(c=0;c=t&&e<=n?1/(n-t):0}function M2(e,t,n){return n==null&&(n=t??1,t=0),en?1:(e-t)/(n-t)}function T2(e,t,n){return n==null&&(n=t??1,t=0),e>=0&&e<=1?t+e*(n-t):NaN}function PE(e,t){let n,r;const i={min(a){return arguments.length?(n=a||0,i):n},max(a){return arguments.length?(r=a??1,i):r},sample:()=>C2(n,r),pdf:a=>F2(a,n,r),cdf:a=>M2(a,n,r),icdf:a=>T2(a,n,r)};return t==null&&(t=e??1,e=0),i.min(e).max(t)}function N2(e,t,n){let r=0,i=0;for(const a of e){const s=n(a);t(a)==null||s==null||isNaN(s)||(r+=(s-r)/++i)}return{coef:[r],predict:()=>r,rSquared:0}}function yf(e,t,n,r){const i=r-e*e,a=Math.abs(i)<1e-24?0:(n-e*t)/i;return[t-a*e,a]}function pg(e,t,n,r){e=e.filter(h=>{let g=t(h),p=n(h);return g!=null&&(g=+g)>=g&&p!=null&&(p=+p)>=p}),r&&e.sort((h,g)=>t(h)-t(g));const i=e.length,a=new Float64Array(i),s=new Float64Array(i);let o=0,u=0,c=0,l,f,d;for(d of e)a[o]=l=+t(d),s[o]=f=+n(d),++o,u+=(l-u)/o,c+=(f-c)/o;for(o=0;o=a&&s!=null&&(s=+s)>=s&&r(a,s,++i)}function uc(e,t,n,r,i){let a=0,s=0;return vf(e,t,n,(o,u)=>{const c=u-i(o),l=u-r;a+=c*c,s+=l*l}),1-a/s}function D2(e,t,n){let r=0,i=0,a=0,s=0,o=0;vf(e,t,n,(l,f)=>{++o,r+=(l-r)/o,i+=(f-i)/o,a+=(l*f-a)/o,s+=(l*l-s)/o});const u=yf(r,i,a,s),c=l=>u[0]+u[1]*l;return{coef:u,predict:c,rSquared:uc(e,t,n,i,c)}}function IE(e,t,n){let r=0,i=0,a=0,s=0,o=0;vf(e,t,n,(l,f)=>{++o,l=Math.log(l),r+=(l-r)/o,i+=(f-i)/o,a+=(l*f-a)/o,s+=(l*l-s)/o});const u=yf(r,i,a,s),c=l=>u[0]+u[1]*Math.log(l);return{coef:u,predict:c,rSquared:uc(e,t,n,i,c)}}function zE(e,t,n){const[r,i,a,s]=pg(e,t,n);let o=0,u=0,c=0,l=0,f=0,d,h,g;vf(e,t,n,(y,v)=>{d=r[f++],h=Math.log(v),g=d*v,o+=(v*h-o)/f,u+=(g-u)/f,c+=(g*h-c)/f,l+=(d*g-l)/f});const[p,m]=yf(u/s,o/s,c/s,l/s),b=y=>Math.exp(p+m*(y-a));return{coef:[Math.exp(p-m*a),m],predict:b,rSquared:uc(e,t,n,s,b)}}function BE(e,t,n){let r=0,i=0,a=0,s=0,o=0,u=0;vf(e,t,n,(f,d)=>{const h=Math.log(f),g=Math.log(d);++u,r+=(h-r)/u,i+=(g-i)/u,a+=(h*g-a)/u,s+=(h*h-s)/u,o+=(d-o)/u});const c=yf(r,i,a,s),l=f=>c[0]*Math.pow(f,c[1]);return c[0]=Math.exp(c[0]),{coef:c,predict:l,rSquared:uc(e,t,n,o,l)}}function O2(e,t,n){const[r,i,a,s]=pg(e,t,n),o=r.length;let u=0,c=0,l=0,f=0,d=0,h,g,p,m;for(h=0;h(w=w-a,v*w*w+x*w+_+s);return{coef:[_-x*a+v*a*a+s,x-2*v*a,v],predict:E,rSquared:uc(e,t,n,s,E)}}function UE(e,t,n,r){if(r===0)return N2(e,t,n);if(r===1)return D2(e,t,n);if(r===2)return O2(e,t,n);const[i,a,s,o]=pg(e,t,n),u=i.length,c=[],l=[],f=r+1;let d,h,g,p,m;for(d=0;d{v-=s;let x=o+b[0]+b[1]*v+b[2]*v*v;for(d=3;d=0;--a)for(o=t[a],u=1,i[a]+=o,s=1;s<=a;++s)u*=(a+1-s)/s,i[a-s]+=o*Math.pow(n,s)*u;return i[0]+=r,i}function MP(e){const t=e.length-1,n=[];let r,i,a,s,o;for(r=0;rMath.abs(e[r][s])&&(s=i);for(a=r;a=r;a--)e[a][i]-=e[a][r]*e[r][i]/e[r][r]}for(i=t-1;i>=0;--i){for(o=0,a=i+1;ai[v]-b?y:v;let _=0,E=0,w=0,S=0,$=0;const F=1/Math.abs(i[x]-b||1);for(let A=y;A<=v;++A){const M=i[A],C=a[A],T=TP(Math.abs(b-M)*F)*d[A],L=M*T;_+=T,E+=L,w+=C*T,S+=C*L,$+=M*L}const[k,D]=yf(E/_,w/_,S/_,$/_);l[m]=k+D*b,f[m]=Math.abs(a[m]-l[m]),NP(i,m+1,g)}if(h===X8)break;const p=kw(f);if(Math.abs(p)=1?V8:(y=1-b*b)*y}return DP(i,l,s,o)}function TP(e){return(e=1-e*e*e)*e*e}function NP(e,t,n){const r=e[t];let i=n[0],a=n[1]+1;if(!(a>=e.length))for(;t>i&&e[a]-r<=r-e[i];)n[0]=++i,n[1]=a,++a}function DP(e,t,n,r){const i=e.length,a=[];let s=0,o=0,u=[],c;for(;s[p,e(p)],a=t[0],s=t[1],o=s-a,u=o/r,c=[i(a)],l=[];if(n===r){for(let p=1;p0;)l.push(i(a+p/n*o))}let f=c[0],d=l[l.length-1];const h=1/o,g=RP(f[1],l);for(;d;){const p=i((f[0]+d[0])/2);p[0]-f[0]>=u&&LP(f,p,d,h,g)>OP?l.push(p):(f=d,c.push(d),l.pop()),d=l[l.length-1]}return c}function RP(e,t){let n=e,r=e;const i=t.length;for(let a=0;ar&&(r=s)}return 1/(r-n)}function LP(e,t,n,r,i){const a=Math.atan2(i*(n[1]-e[1]),r*(n[0]-e[0])),s=Math.atan2(i*(t[1]-e[1]),r*(t[0]-e[0]));return Math.abs(a-s)}function PP(e){return t=>{const n=e.length;let r=1,i=String(e[0](t));for(;r{},IP={init:p1,add:p1,rem:p1,idx:0},zl={values:{init:e=>e.cell.store=!0,value:e=>e.cell.data.values(),idx:-1},count:{value:e=>e.cell.num},__count__:{value:e=>e.missing+e.valid},missing:{value:e=>e.missing},valid:{value:e=>e.valid},sum:{init:e=>e.sum=0,value:e=>e.valid?e.sum:void 0,add:(e,t)=>e.sum+=+t,rem:(e,t)=>e.sum-=t},product:{init:e=>e.product=1,value:e=>e.valid?e.product:void 0,add:(e,t)=>e.product*=t,rem:(e,t)=>e.product/=t},mean:{init:e=>e.mean=0,value:e=>e.valid?e.mean:void 0,add:(e,t)=>(e.mean_d=t-e.mean,e.mean+=e.mean_d/e.valid),rem:(e,t)=>(e.mean_d=t-e.mean,e.mean-=e.valid?e.mean_d/e.valid:e.mean)},average:{value:e=>e.valid?e.mean:void 0,req:["mean"],idx:1},variance:{init:e=>e.dev=0,value:e=>e.valid>1?e.dev/(e.valid-1):void 0,add:(e,t)=>e.dev+=e.mean_d*(t-e.mean),rem:(e,t)=>e.dev-=e.mean_d*(t-e.mean),req:["mean"],idx:1},variancep:{value:e=>e.valid>1?e.dev/e.valid:void 0,req:["variance"],idx:2},stdev:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:e=>e.valid>1?Math.sqrt(e.dev/e.valid):void 0,req:["variance"],idx:2},stderr:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid*(e.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:e=>e.cell.data.distinct(e.get),req:["values"],idx:3},ci0:{value:e=>e.cell.data.ci0(e.get),req:["values"],idx:3},ci1:{value:e=>e.cell.data.ci1(e.get),req:["values"],idx:3},median:{value:e=>e.cell.data.q2(e.get),req:["values"],idx:3},q1:{value:e=>e.cell.data.q1(e.get),req:["values"],idx:3},q3:{value:e=>e.cell.data.q3(e.get),req:["values"],idx:3},min:{init:e=>e.min=void 0,value:e=>e.min=Number.isNaN(e.min)?e.cell.data.min(e.get):e.min,add:(e,t)=>{(t{t<=e.min&&(e.min=NaN)},req:["values"],idx:4},max:{init:e=>e.max=void 0,value:e=>e.max=Number.isNaN(e.max)?e.cell.data.max(e.get):e.max,add:(e,t)=>{(t>e.max||e.max===void 0)&&(e.max=t)},rem:(e,t)=>{t>=e.max&&(e.max=NaN)},req:["values"],idx:4},argmin:{init:e=>e.argmin=void 0,value:e=>e.argmin||e.cell.data.argmin(e.get),add:(e,t,n)=>{t{t<=e.min&&(e.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:e=>e.argmax=void 0,value:e=>e.argmax||e.cell.data.argmax(e.get),add:(e,t,n)=>{t>e.max&&(e.argmax=n)},rem:(e,t)=>{t>=e.max&&(e.argmax=void 0)},req:["max","values"],idx:3},exponential:{init:(e,t)=>{e.exp=0,e.exp_r=t},value:e=>e.valid?e.exp*(1-e.exp_r)/(1-e.exp_r**e.valid):void 0,add:(e,t)=>e.exp=e.exp_r*e.exp+t,rem:(e,t)=>e.exp=(e.exp-t/e.exp_r**(e.valid-1))/e.exp_r},exponentialb:{value:e=>e.valid?e.exp*(1-e.exp_r):void 0,req:["exponential"],idx:1}},xf=Object.keys(zl).filter(e=>e!=="__count__");function zP(e,t){return(n,r)=>ce({name:e,aggregate_param:r,out:n||e},IP,t)}[...xf,"__count__"].forEach(e=>{zl[e]=zP(e,zl[e])});function WE(e,t,n){return zl[e](n,t)}function HE(e,t){return e.idx-t.idx}function BP(e){const t={};e.forEach(r=>t[r.name]=r);const n=r=>{r.req&&r.req.forEach(i=>{t[i]||n(t[i]=zl[i]())})};return e.forEach(n),Object.values(t).sort(HE)}function UP(){this.valid=0,this.missing=0,this._ops.forEach(e=>e.aggregate_param==null?e.init(this):e.init(this,e.aggregate_param))}function jP(e,t){if(e==null||e===""){++this.missing;return}e===e&&(++this.valid,this._ops.forEach(n=>n.add(this,e,t)))}function qP(e,t){if(e==null||e===""){--this.missing;return}e===e&&(--this.valid,this._ops.forEach(n=>n.rem(this,e,t)))}function WP(e){return this._out.forEach(t=>e[t.out]=t.value(this)),e}function GE(e,t){const n=t||Wt,r=BP(e),i=e.slice().sort(HE);function a(s){this._ops=r,this._out=i,this.cell=s,this.init()}return a.prototype.init=UP,a.prototype.add=jP,a.prototype.rem=qP,a.prototype.set=WP,a.prototype.get=n,a.fields=e.map(s=>s.out),a}function R2(e){this._key=e?Zn(e):ne,this.reset()}const Ft=R2.prototype;Ft.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null};Ft.add=function(e){this._add.push(e)};Ft.rem=function(e){this._rem.push(e)};Ft.values=function(){if(this._get=null,this._rem.length===0)return this._add;const e=this._add,t=this._rem,n=this._key,r=e.length,i=t.length,a=Array(r-i),s={};let o,u,c;for(o=0;o=0;)a=e(t[r])+"",ie(n,a)||(n[a]=1,++i);return i};Ft.extent=function(e){if(this._get!==e||!this._ext){const t=this.values(),n=uw(t,e);this._ext=[t[n[0]],t[n[1]]],this._get=e}return this._ext};Ft.argmin=function(e){return this.extent(e)[0]||{}};Ft.argmax=function(e){return this.extent(e)[1]||{}};Ft.min=function(e){const t=this.extent(e)[0];return t!=null?e(t):void 0};Ft.max=function(e){const t=this.extent(e)[1];return t!=null?e(t):void 0};Ft.quartile=function(e){return(this._get!==e||!this._q)&&(this._q=v2(this.values(),e),this._get=e),this._q};Ft.q1=function(e){return this.quartile(e)[0]};Ft.q2=function(e){return this.quartile(e)[1]};Ft.q3=function(e){return this.quartile(e)[2]};Ft.ci=function(e){return(this._get!==e||!this._ci)&&(this._ci=NE(this.values(),1e3,.05,e),this._get=e),this._ci};Ft.ci0=function(e){return this.ci(e)[0]};Ft.ci1=function(e){return this.ci(e)[1]};function La(e){N.call(this,null,e),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}La.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:xf},{name:"aggregate_params",type:"number",null:!0,array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]};W(La,N,{transform(e,t){const n=this,r=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=e.modified();return n.stamp=r.stamp,n.value&&(i||t.modified(n._inputs,!0))?(n._prev=n.value,n.value=i?n.init(e):Object.create(null),t.visit(t.SOURCE,a=>n.add(a))):(n.value=n.value||n.init(e),t.visit(t.REM,a=>n.rem(a)),t.visit(t.ADD,a=>n.add(a))),r.modifies(n._outputs),n._drop=e.drop!==!1,e.cross&&n._dims.length>1&&(n._drop=!1,n.cross()),t.clean()&&n._drop&&r.clean(!0).runAfter(()=>this.clean()),n.changes(r)},cross(){const e=this,t=e.value,n=e._dnames,r=n.map(()=>({})),i=n.length;function a(o){let u,c,l,f;for(u in o)for(l=o[u].tuple,c=0;c{const v=Je(y);return i(y),n.push(v),v}),this.cellkey=e.key?e.key:Km(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const a=e.fields||[null],s=e.ops||["count"],o=e.aggregate_params||[null],u=e.as||[],c=a.length,l={};let f,d,h,g,p,m,b;for(c!==s.length&&R("Unmatched number of fields and aggregate ops."),b=0;bGE(y,y.field)),Object.create(null)},cellkey:Km(),cell(e,t){let n=this.value[e];return n?n.num===0&&this._drop&&n.stamp{const f=r(l);l[o]=f,l[u]=f==null?null:i+a*(1+(f-i)/a)}:l=>l[o]=r(l)),t.modifies(n?s:o)},_bins(e){if(this.value&&!e.modified())return this.value;const t=e.field,n=TE(e),r=n.step;let i=n.start,a=i+Math.ceil((n.stop-i)/r)*r,s,o;(s=e.anchor)!=null&&(o=s-(i+r*Math.floor((s-i)/r)),i+=o,a+=o);const u=function(c){let l=Pt(t(c));return l==null?null:la?1/0:(l=Math.max(i,Math.min(l,a-r)),i+r*Math.floor(HP+(l-i)/r))};return u.start=i,u.stop=n.stop,u.step=r,this.value=$n(u,Bt(t),e.name||"bin_"+Je(t))}});function YE(e,t,n){const r=e;let i=t||[],a=n||[],s={},o=0;return{add:u=>a.push(u),remove:u=>s[r(u)]=++o,size:()=>i.length,data:(u,c)=>(o&&(i=i.filter(l=>!s[r(l)]),s={},o=0),c&&u&&i.sort(u),a.length&&(i=u?gw(u,i,a.sort(u)):i.concat(a),a=[]),i)}}function P2(e){N.call(this,[],e)}P2.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]};W(P2,N,{transform(e,t){const n=t.fork(t.ALL),r=YE(ne,this.value,n.materialize(n.ADD).add),i=e.sort,a=t.changed()||i&&(e.modified("sort")||t.modified(i.fields));return n.visit(n.REM,r.remove),this.modified(a),this.value=n.source=r.data(Eo(i),a),t.source&&t.source.root&&(this.value.root=t.source.root),n}});function XE(e){Pe.call(this,null,GP,e)}W(XE,Pe);function GP(e){return this.value&&!e.modified()?this.value:Jy(e.fields,e.orders)}function I2(e){N.call(this,null,e)}I2.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]};function YP(e,t,n){switch(t){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase();break}return e.match(n)}W(I2,N,{transform(e,t){const n=f=>d=>{for(var h=YP(o(d),e.case,a)||[],g,p=0,m=h.length;pi[f]=1+(i[f]||0)),l=n(f=>i[f]-=1);return r?t.visit(t.SOURCE,c):(t.visit(t.ADD,c),t.visit(t.REM,l)),this._finish(t,u)},_parameterCheck(e,t){let n=!1;return(e.modified("stopwords")||!this._stop)&&(this._stop=new RegExp("^"+(e.stopwords||"")+"$","i"),n=!0),(e.modified("pattern")||!this._match)&&(this._match=new RegExp(e.pattern||"[\\w']+","g"),n=!0),(e.modified("field")||t.modified(e.field.fields))&&(n=!0),n&&(this._counts={}),n},_finish(e,t){const n=this._counts,r=this._tuples||(this._tuples={}),i=t[0],a=t[1],s=e.fork(e.NO_SOURCE|e.NO_FIELDS);let o,u,c;for(o in n)u=r[o],c=n[o]||0,!u&&c?(r[o]=u=Me({}),u[i]=o,u[a]=c,s.add.push(u)):c===0?(u&&s.rem.push(u),n[o]=null,r[o]=null):u[a]!==c&&(u[a]=c,s.mod.push(u));return s.modifies(t)}});function z2(e){N.call(this,null,e)}z2.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]};W(z2,N,{transform(e,t){const n=t.fork(t.NO_SOURCE),r=e.as||["a","b"],i=r[0],a=r[1],s=!this.value||t.changed(t.ADD_REM)||e.modified("as")||e.modified("filter");let o=this.value;return s?(o&&(n.rem=o),o=t.materialize(t.SOURCE).source,n.add=this.value=XP(o,i,a,e.filter||er)):n.mod=o,n.source=this.value,n.modifies(r)}});function XP(e,t,n,r){for(var i=[],a={},s=e.length,o=0,u,c;oVE(a,t))):typeof r[i]===J8&&r[i](e[i]);return r}function B2(e){N.call(this,null,e)}const KE=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}],JP={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:KE},{name:"weights",type:"number",array:!0}]};B2.Definition={type:"Density",metadata:{generates:!0},params:[{name:"extent",type:"number",array:!0,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:KE.concat(JP)},{name:"as",type:"string",array:!0,default:["value","density"]}]};W(B2,N,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const r=VE(e.distribution,QP(t)),i=e.steps||e.minsteps||25,a=e.steps||e.maxsteps||200;let s=e.method||"pdf";s!=="pdf"&&s!=="cdf"&&R("Invalid density method: "+s),!e.extent&&!r.data&&R("Missing density extent parameter."),s=r[s];const o=e.as||["value","density"],u=e.extent||ri(r.data()),c=mg(s,u,i,a).map(l=>{const f={};return f[o[0]]=l[0],f[o[1]]=l[1],Me(f)});this.value&&(n.rem=this.value),this.value=n.add=n.source=c}return n}});function QP(e){return()=>e.materialize(e.SOURCE).source}function JE(e,t){return e?e.map((n,r)=>t[r]||Je(n)):null}function U2(e,t,n){const r=[],i=f=>f(u);let a,s,o,u,c,l;if(t==null)r.push(e.map(n));else for(a={},s=0,o=e.length;sbf(ri(e,t))/30;W(j2,N,{transform(e,t){if(this.value&&!(e.modified()||t.changed()))return t;const n=t.materialize(t.SOURCE).source,r=U2(t.source,e.groupby,Wt),i=e.smooth||!1,a=e.field,s=e.step||ZP(n,a),o=Eo((g,p)=>a(g)-a(p)),u=e.as||QE,c=r.length;let l=1/0,f=-1/0,d=0,h;for(;df&&(f=p),g[++h][u]=p}return this.value={start:l,stop:f,step:s},t.reflow(!0).modifies(u)}});function ZE(e){Pe.call(this,null,eI,e),this.modified(!0)}W(ZE,Pe);function eI(e){const t=e.expr;return this.value&&!e.modified("expr")?this.value:$n(n=>t(n,e),Bt(t),Je(t))}function q2(e){N.call(this,[void 0,void 0],e)}q2.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]};W(q2,N,{transform(e,t){const n=this.value,r=e.field,i=t.changed()||t.modified(r.fields)||e.modified("field");let a=n[0],s=n[1];if((i||a==null)&&(a=1/0,s=-1/0),t.visit(i?t.SOURCE:t.ADD,o=>{const u=Pt(r(o));u!=null&&(us&&(s=u))}),!Number.isFinite(a)||!Number.isFinite(s)){let o=Je(r);o&&(o=` for field "${o}"`),t.dataflow.warn(`Infinite extent${o}: [${a}, ${s}]`),a=s=void 0}this.value=[a,s]}});function W2(e,t){Pe.call(this,e),this.parent=t,this.count=0}W(W2,Pe,{connect(e){return this.detachSubflow=e.detachSubflow,this.targets().add(e),e.source=this},add(e){this.count+=1,this.value.add.push(e)},rem(e){this.count-=1,this.value.rem.push(e)},mod(e){this.value.mod.push(e)},init(e){this.value.init(e,e.NO_SOURCE)},evaluate(){return this.value}});function bg(e){N.call(this,{},e),this._keys=nc();const t=this._targets=[];t.active=0,t.forEach=n=>{for(let r=0,i=t.active;rr&&r.count>0);this.initTargets(n)}},initTargets(e){const t=this._targets,n=t.length,r=e?e.length:0;let i=0;for(;ithis.subflow(u,i,t);return this._group=e.group||{},this.initTargets(),t.visit(t.REM,u=>{const c=ne(u),l=a.get(c);l!==void 0&&(a.delete(c),o(l).rem(u))}),t.visit(t.ADD,u=>{const c=r(u);a.set(ne(u),c),o(c).add(u)}),s||t.modified(r.fields)?t.visit(t.MOD,u=>{const c=ne(u),l=a.get(c),f=r(u);l===f?o(f).mod(u):(a.set(c,f),o(l).rem(u),o(f).add(u))}):t.changed(t.MOD)&&t.visit(t.MOD,u=>{o(a.get(ne(u))).mod(u)}),s&&t.visit(t.REFLOW,u=>{const c=ne(u),l=a.get(c),f=r(u);l!==f&&(a.set(c,f),o(l).rem(u),o(f).add(u))}),t.clean()?n.runAfter(()=>{this.clean(),a.clean()}):a.empty>n.cleanThreshold&&n.runAfter(a.clean),t}});function eS(e){Pe.call(this,null,tI,e)}W(eS,Pe);function tI(e){return this.value&&!e.modified()?this.value:P(e.name)?Y(e.name).map(t=>Zn(t)):Zn(e.name,e.as)}function H2(e){N.call(this,nc(),e)}H2.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]};W(H2,N,{transform(e,t){const n=t.dataflow,r=this.value,i=t.fork(),a=i.add,s=i.rem,o=i.mod,u=e.expr;let c=!0;t.visit(t.REM,f=>{const d=ne(f);r.has(d)?r.delete(d):s.push(f)}),t.visit(t.ADD,f=>{u(f,e)?a.push(f):r.set(ne(f),1)});function l(f){const d=ne(f),h=u(f,e),g=r.get(d);h&&g?(r.delete(d),a.push(f)):!h&&!g?(r.set(d,1),s.push(f)):c&&h&&!g&&o.push(f)}return t.visit(t.MOD,l),e.modified()&&(c=!1,t.visit(t.REFLOW,l)),r.empty>n.cleanThreshold&&n.runAfter(r.clean),i}});function G2(e){N.call(this,[],e)}G2.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]};W(G2,N,{transform(e,t){const n=t.fork(t.NO_SOURCE),r=e.fields,i=JE(r,e.as||[]),a=e.index||null,s=i.length;return n.rem=this.value,t.visit(t.SOURCE,o=>{const u=r.map(g=>g(o)),c=u.reduce((g,p)=>Math.max(g,p.length),0);let l=0,f,d,h;for(;l{for(let l=0,f;ls[r]=n(s,e))}});function tS(e){N.call(this,[],e)}W(tS,N,{transform(e,t){const n=t.fork(t.ALL),r=e.generator;let i=this.value,a=e.size-i.length,s,o,u;if(a>0){for(s=[];--a>=0;)s.push(u=Me(r(e))),i.push(u);n.add=n.add.length?n.materialize(n.ADD).add.concat(s):s}else o=i.slice(0,-a),n.rem=n.rem.length?n.materialize(n.REM).rem.concat(o):o,i=i.slice(-a);return n.source=this.value=i,n}});const cd={value:"value",median:kw,mean:PO,min:zm,max:js},nI=[];function V2(e){N.call(this,[],e)}V2.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]};function rI(e){var t=e.method||cd.value,n;if(cd[t]==null)R("Unrecognized imputation method: "+t);else return t===cd.value?(n=e.value!==void 0?e.value:0,()=>n):cd[t]}function iI(e){const t=e.field;return n=>n?t(n):NaN}W(V2,N,{transform(e,t){var n=t.fork(t.ALL),r=rI(e),i=iI(e),a=Je(e.field),s=Je(e.key),o=(e.groupby||[]).map(Je),u=aI(t.source,e.groupby,e.key,e.keyvals),c=[],l=this.value,f=u.domain.length,d,h,g,p,m,b,y,v,x,_;for(m=0,v=u.length;mb(m),a=[],s=r?r.slice():[],o={},u={},c,l,f,d,h,g,p,m;for(s.forEach((b,y)=>o[b]=y+1),d=0,p=e.length;dn.add(a))):(i=n.value=n.value||this.init(e),t.visit(t.REM,a=>n.rem(a)),t.visit(t.ADD,a=>n.add(a))),n.changes(),t.visit(t.SOURCE,a=>{ce(a,i[n.cellkey(a)].tuple)}),t.reflow(r).modifies(this._outputs)},changes(){const e=this._adds,t=this._mods;let n,r;for(n=0,r=this._alen;n{const g=E2(h,s)[o],p=e.counts?h.length:1,m=l||ri(h);mg(g,m,f,d).forEach(b=>{const y={};for(let v=0;v(this._pending=Y(i.data),a=>a.touch(this)))}:n.request(e.url,e.format).then(r=>m1(this,t,Y(r.data)))}});function oI(e){return e.modified("async")&&!(e.modified("values")||e.modified("url")||e.modified("format"))}function m1(e,t,n){n.forEach(Me);const r=t.fork(t.NO_FIELDS&t.NO_SOURCE);return r.rem=e.value,e.value=r.source=r.add=n,e._pending=null,r.rem.length&&r.clean(!0),r}function Q2(e){N.call(this,{},e)}Q2.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]};W(Q2,N,{transform(e,t){const n=e.fields,r=e.index,i=e.values,a=e.default==null?null:e.default,s=e.modified(),o=n.length;let u=s?t.SOURCE:t.ADD,c=t,l=e.as,f,d,h;return i?(d=i.length,o>1&&!l&&R('Multi-field lookup requires explicit "as" parameter.'),l&&l.length!==o*d&&R('The "as" parameter has too few output field names.'),l=l||i.map(Je),f=function(g){for(var p=0,m=0,b,y;pt.modified(g.fields)),u|=h?t.MOD:0),t.visit(u,f),c.modifies(l)}});function iS(e){Pe.call(this,null,uI,e)}W(iS,Pe);function uI(e){if(this.value&&!e.modified())return this.value;const t=e.extents,n=t.length;let r=1/0,i=-1/0,a,s;for(a=0;ai&&(i=s[1]);return[r,i]}function aS(e){Pe.call(this,null,cI,e)}W(aS,Pe);function cI(e){return this.value&&!e.modified()?this.value:e.values.reduce((t,n)=>t.concat(n),[])}function sS(e){N.call(this,null,e)}W(sS,N,{transform(e,t){return this.modified(e.modified()),this.value=e,t.fork(t.NO_SOURCE|t.NO_FIELDS)}});function Z2(e){La.call(this,e)}Z2.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:xf,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]};W(Z2,La,{_transform:La.prototype.transform,transform(e,t){return this._transform(lI(e,t),t)}});function lI(e,t){const n=e.field,r=e.value,i=(e.op==="count"?"__count__":e.op)||"sum",a=Bt(n).concat(Bt(r)),s=dI(n,e.limit||0,t);return t.changed()&&e.set("__pivot__",null,null,!0),{key:e.key,groupby:e.groupby,ops:s.map(()=>i),fields:s.map(o=>fI(o,n,r,a)),as:s.map(o=>o+""),modified:e.modified.bind(e)}}function fI(e,t,n,r){return $n(i=>t(i)===e?n(i):NaN,r,e+"")}function dI(e,t,n){const r={},i=[];return n.visit(n.SOURCE,a=>{const s=e(a);r[s]||(r[s]=1,i.push(s))}),i.sort(Z0),t?i.slice(0,t):i}function oS(e){bg.call(this,e)}W(oS,bg,{transform(e,t){const n=e.subflow,r=e.field,i=a=>this.subflow(ne(a),n,t,a);return(e.modified("field")||r&&t.modified(Bt(r)))&&R("PreFacet does not support field modification."),this.initTargets(),r?(t.visit(t.MOD,a=>{const s=i(a);r(a).forEach(o=>s.mod(o))}),t.visit(t.ADD,a=>{const s=i(a);r(a).forEach(o=>s.add(Me(o)))}),t.visit(t.REM,a=>{const s=i(a);r(a).forEach(o=>s.rem(o))})):(t.visit(t.MOD,a=>i(a).mod(a)),t.visit(t.ADD,a=>i(a).add(a)),t.visit(t.REM,a=>i(a).rem(a))),t.clean()&&t.runAfter(()=>this.clean()),t}});function e4(e){N.call(this,null,e)}e4.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]};W(e4,N,{transform(e,t){const n=t.fork(t.NO_SOURCE),r=e.fields,i=JE(e.fields,e.as||[]),a=r?(o,u)=>hI(o,u,r,i):cg;let s;return this.value?s=this.value:(t=t.addAll(),s=this.value={}),t.visit(t.REM,o=>{const u=ne(o);n.rem.push(s[u]),s[u]=null}),t.visit(t.ADD,o=>{const u=a(o,Me({}));s[ne(o)]=u,n.add.push(u)}),t.visit(t.MOD,o=>{n.mod.push(a(o,s[ne(o)]))}),n}});function hI(e,t,n,r){for(let i=0,a=n.length;i{const d=y2(f,c);for(let h=0;h{const a=ne(i);n.rem.push(r[a]),r[a]=null}),t.visit(t.ADD,i=>{const a=p2(i);r[ne(i)]=a,n.add.push(a)}),t.visit(t.MOD,i=>{const a=r[ne(i)];for(const s in i)a[s]=i[s],n.modifies(s);n.mod.push(a)})),n}});function n4(e){N.call(this,[],e),this.count=0}n4.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]};W(n4,N,{transform(e,t){const n=t.fork(t.NO_SOURCE),r=e.modified("size"),i=e.size,a=this.value.reduce((l,f)=>(l[ne(f)]=1,l),{});let s=this.value,o=this.count,u=0;function c(l){let f,d;s.length=u&&(f=s[d],a[ne(f)]&&n.rem.push(f),s[d]=l)),++o}if(t.rem.length&&(t.visit(t.REM,l=>{const f=ne(l);a[f]&&(a[f]=-1,n.rem.push(l)),--o}),s=s.filter(l=>a[ne(l)]!==-1)),(t.rem.length||r)&&s.length{a[ne(l)]||c(l)}),u=-1),r&&s.length>i){const l=s.length-i;for(let f=0;f{a[ne(l)]&&n.mod.push(l)}),t.add.length&&t.visit(t.ADD,c),(t.add.length||u<0)&&(n.add=s.filter(l=>!a[ne(l)])),this.count=o,this.value=n.source=s,n}});function r4(e){N.call(this,null,e)}r4.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]};W(r4,N,{transform(e,t){if(this.value&&!e.modified())return;const n=t.materialize().fork(t.MOD),r=e.as||"data";return n.rem=this.value?t.rem.concat(this.value):t.rem,this.value=Nn(e.start,e.stop,e.step||1).map(i=>{const a={};return a[r]=i,Me(a)}),n.add=t.add.concat(this.value),n}});function lS(e){N.call(this,null,e),this.modified(!0)}W(lS,N,{transform(e,t){return this.value=t.source,t.changed()?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}});function i4(e){N.call(this,null,e)}const fS=["unit0","unit1"];i4.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:s2,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:fS}]};W(i4,N,{transform(e,t){const n=e.field,r=e.interval!==!1,i=e.timezone==="utc",a=this._floor(e,t),s=(i?oc:sc)(a.unit).offset,o=e.as||fS,u=o[0],c=o[1],l=a.step;let f=a.start||1/0,d=a.stop||-1/0,h=t.ADD;return(e.modified()||t.changed(t.REM)||t.modified(Bt(n)))&&(t=t.reflow(!0),h=t.SOURCE,f=1/0,d=-1/0),t.visit(h,g=>{const p=n(g);let m,b;p==null?(g[u]=null,r&&(g[c]=null)):(g[u]=m=b=a(p),r&&(g[c]=b=s(m,l)),md&&(d=b))}),a.start=f,a.stop=d,t.modifies(r?o:u)},_floor(e,t){const n=e.timezone==="utc",{units:r,step:i}=e.units?{units:e.units,step:e.step||1}:tE({extent:e.extent||ri(t.materialize(t.SOURCE).source,e.field),maxbins:e.maxbins}),a=o2(r),s=this.value||{},o=(n?Gw:Hw)(a,i);return o.unit=xe(a),o.units=a,o.step=i,o.start=s.start,o.stop=s.stop,this.value=o}});function dS(e){N.call(this,nc(),e)}W(dS,N,{transform(e,t){const n=t.dataflow,r=e.field,i=this.value,a=o=>i.set(r(o),o);let s=!0;return e.modified("field")||t.modified(r.fields)?(i.clear(),t.visit(t.SOURCE,a)):t.changed()?(t.visit(t.REM,o=>i.delete(r(o))),t.visit(t.ADD,a)):s=!1,this.modified(s),i.empty>n.cleanThreshold&&n.runAfter(i.clean),t.fork()}});function hS(e){N.call(this,null,e)}W(hS,N,{transform(e,t){(!this.value||e.modified("field")||e.modified("sort")||t.changed()||e.sort&&t.modified(e.sort.fields))&&(this.value=(e.sort?t.source.slice().sort(Eo(e.sort)):t.source).map(e.field))}});function pI(e,t,n,r){const i=Bl[e](t,n);return{init:i.init||ya,update:function(a,s){s[r]=i.next(a)}}}const Bl={row_number:function(){return{next:e=>e.index+1}},rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,r=t.data;return n&&t.compare(r[n-1],r[n])?e=n+1:e}}},dense_rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,r=t.data;return n&&t.compare(r[n-1],r[n])?++e:e}}},percent_rank:function(){const e=Bl.rank(),t=e.next;return{init:e.init,next:n=>(t(n)-1)/(n.data.length-1)}},cume_dist:function(){let e;return{init:()=>e=0,next:t=>{const n=t.data,r=t.compare;let i=t.index;if(e0||R("ntile num must be greater than zero.");const n=Bl.cume_dist(),r=n.next;return{init:n.init,next:i=>Math.ceil(t*r(i))}},lag:function(e,t){return t=+t||1,{next:n=>{const r=n.index-t;return r>=0?e(n.data[r]):null}}},lead:function(e,t){return t=+t||1,{next:n=>{const r=n.index+t,i=n.data;return re(t.data[t.i0])}},last_value:function(e){return{next:t=>e(t.data[t.i1-1])}},nth_value:function(e,t){return t=+t,t>0||R("nth_value nth must be greater than zero."),{next:n=>{const r=n.i0+(t-1);return rt=null,next:n=>{const r=e(n.data[n.index]);return r!=null?t=r:t}}},next_value:function(e){let t,n;return{init:()=>(t=null,n=-1),next:r=>{const i=r.data;return r.index<=n?t:(n=mI(e,i,r.index))<0?(n=i.length,t=null):t=e(i[n])}}}};function mI(e,t,n){for(let r=t.length;nu[p]=1)}h(e.sort),t.forEach((g,p)=>{const m=n[p],b=r[p],y=i[p]||null,v=Je(m),x=qE(g,v,a[p]);if(h(m),s.push(x),ie(Bl,g))o.push(pI(g,m,b,x));else{if(m==null&&g!=="count"&&R("Null aggregate field specified."),g==="count"){l.push(x);return}d=!1;let _=c[v];_||(_=c[v]=[],_.field=m,f.push(_)),_.push(WE(g,y,x))}}),(l.length||f.length)&&(this.cell=yI(f,l,d)),this.inputs=Object.keys(u)}const pS=gS.prototype;pS.init=function(){this.windows.forEach(e=>e.init()),this.cell&&this.cell.init()};pS.update=function(e,t){const n=this.cell,r=this.windows,i=e.data,a=r&&r.length;let s;if(n){for(s=e.p0;sGE(u,u.field));const r={num:0,agg:null,store:!1,count:t};if(!n)for(var i=e.length,a=r.agg=Array(i),s=0;sthis.group(i(o));let s=this.state;(!s||n)&&(s=this.state=new gS(e)),n||t.modified(s.inputs)?(this.value={},t.visit(t.SOURCE,o=>a(o).add(o))):(t.visit(t.REM,o=>a(o).remove(o)),t.visit(t.ADD,o=>a(o).add(o)));for(let o=0,u=this._mlen;o0&&!i(a[n],a[n-1])&&(e.i0=t.left(a,a[n])),r1?0:e<-1?$u:Math.acos(e)}function Z8(e){return e>=1?Ah:e<=-1?-Ah:Math.asin(e)}const Jm=Math.PI,Qm=2*Jm,Cs=1e-6,$I=Qm-Cs;function bS(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return bS;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;iCs)if(!(Math.abs(f*u-c*l)>Cs)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-s,g=i-o,p=u*u+c*c,m=h*h+g*g,b=Math.sqrt(p),y=Math.sqrt(d),v=a*Math.tan((Jm-Math.acos((p+d-m)/(2*b*y)))/2),x=v/y,_=v/b;Math.abs(x-1)>Cs&&this._append`L${t+x*l},${n+x*f}`,this._append`A${a},${a},0,0,${+(f*h>l*g)},${this._x1=t+_*u},${this._y1=n+_*c}`}}arc(t,n,r,i,a,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),u=r*Math.sin(i),c=t+o,l=n+u,f=1^s,d=s?i-a:a-i;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Cs||Math.abs(this._y1-l)>Cs)&&this._append`L${c},${l}`,r&&(d<0&&(d=d%Qm+Qm),d>$I?this._append`A${r},${r},0,1,${f},${t-o},${n-u}A${r},${r},0,1,${f},${this._x1=c},${this._y1=l}`:d>Cs&&this._append`A${r},${r},0,${+(d>=Jm)},${f},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function yg(){return new s4}yg.prototype=s4.prototype;function vg(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new s4(t)}function kI(e){return e.innerRadius}function CI(e){return e.outerRadius}function FI(e){return e.startAngle}function MI(e){return e.endAngle}function TI(e){return e&&e.padAngle}function NI(e,t,n,r,i,a,s,o){var u=n-e,c=r-t,l=s-i,f=o-a,d=f*u-l*c;if(!(d*dM*M+C*C&&(S=F,$=k),{cx:S,cy:$,x01:-l,y01:-f,x11:S*(i/_-1),y11:$*(i/_-1)}}function DI(){var e=kI,t=CI,n=Te(0),r=null,i=FI,a=MI,s=TI,o=null,u=vg(c);function c(){var l,f,d=+e.apply(this,arguments),h=+t.apply(this,arguments),g=i.apply(this,arguments)-Ah,p=a.apply(this,arguments)-Ah,m=Q8(p-g),b=p>g;if(o||(o=l=u()),hDt))o.moveTo(0,0);else if(m>mS-Dt)o.moveTo(h*ms(g),h*zr(g)),o.arc(0,0,h,g,p,!b),d>Dt&&(o.moveTo(d*ms(p),d*zr(p)),o.arc(0,0,d,p,g,b));else{var y=g,v=p,x=g,_=p,E=m,w=m,S=s.apply(this,arguments)/2,$=S>Dt&&(r?+r.apply(this,arguments):Ls(d*d+h*h)),F=b1(Q8(h-d)/2,+n.apply(this,arguments)),k=F,D=F,A,M;if($>Dt){var C=Z8($/d*zr(S)),T=Z8($/h*zr(S));(E-=C*2)>Dt?(C*=b?1:-1,x+=C,_-=C):(E=0,x=_=(g+p)/2),(w-=T*2)>Dt?(T*=b?1:-1,y+=T,v-=T):(w=0,y=v=(g+p)/2)}var L=h*ms(y),I=h*zr(y),z=d*ms(_),Z=d*zr(_);if(F>Dt){var ee=h*ms(v),fe=h*zr(v),Ee=d*ms(x),me=d*zr(x),Ie;if(m<$u)if(Ie=NI(L,I,Ee,me,ee,fe,z,Z)){var Si=L-Ie[0],Io=I-Ie[1],gs=ee-Ie[0],K=fe-Ie[1],de=1/zr(SI((Si*gs+Io*K)/(Ls(Si*Si+Io*Io)*Ls(gs*gs+K*K)))/2),ge=Ls(Ie[0]*Ie[0]+Ie[1]*Ie[1]);k=b1(F,(d-ge)/(de-1)),D=b1(F,(h-ge)/(de+1))}else k=D=0}w>Dt?D>Dt?(A=ld(Ee,me,L,I,h,D,b),M=ld(ee,fe,z,Z,h,D,b),o.moveTo(A.cx+A.x01,A.cy+A.y01),DDt)||!(E>Dt)?o.lineTo(z,Z):k>Dt?(A=ld(z,Z,ee,fe,d,-k,b),M=ld(L,I,Ee,me,d,-k,b),o.lineTo(A.cx+A.x01,A.cy+A.y01),k=h;--g)o.point(v[g],x[g]);o.lineEnd(),o.areaEnd()}b&&(v[d]=+e(m,d,f),x[d]=+t(m,d,f),o.point(r?+r(m,d,f):v[d],n?+n(m,d,f):x[d]))}if(y)return o=null,y+""||null}function l(){return wS().defined(i).curve(s).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:Te(+f),r=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Te(+f),c):e},c.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Te(+f),c):r},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:Te(+f),n=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Te(+f),c):t},c.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Te(+f),c):n},c.lineX0=c.lineY0=function(){return l().x(e).y(t)},c.lineY1=function(){return l().x(e).y(n)},c.lineX1=function(){return l().x(r).y(t)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Te(!!f),c):i},c.curve=function(f){return arguments.length?(s=f,a!=null&&(o=s(a)),c):s},c.context=function(f){return arguments.length?(f==null?a=o=null:o=s(a=f),c):a},c}const OI={draw(e,t){const n=Ls(t/$u);e.moveTo(n,0),e.arc(0,0,n,0,mS)}};function RI(e,t){let n=null,r=vg(i);e=typeof e=="function"?e:Te(e||OI),t=typeof t=="function"?t:Te(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Te(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Te(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function Pa(){}function kh(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function xg(e){this._context=e}xg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:kh(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:kh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function LI(e){return new xg(e)}function SS(e){this._context=e}SS.prototype={areaStart:Pa,areaEnd:Pa,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:kh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function PI(e){return new SS(e)}function $S(e){this._context=e}$S.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:kh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function II(e){return new $S(e)}function AS(e,t){this._basis=new xg(e),this._beta=t}AS.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,s=t[n]-i,o=-1,u;++o<=n;)u=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+u*a),this._beta*t[o]+(1-this._beta)*(i+u*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const zI=function e(t){function n(r){return t===1?new xg(r):new AS(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Ch(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function u4(e,t){this._context=e,this._k=(1-t)/6}u4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ch(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ch(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const BI=function e(t){function n(r){return new u4(r,t)}return n.tension=function(r){return e(+r)},n}(0);function c4(e,t){this._context=e,this._k=(1-t)/6}c4.prototype={areaStart:Pa,areaEnd:Pa,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ch(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const UI=function e(t){function n(r){return new c4(r,t)}return n.tension=function(r){return e(+r)},n}(0);function l4(e,t){this._context=e,this._k=(1-t)/6}l4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ch(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const jI=function e(t){function n(r){return new l4(r,t)}return n.tension=function(r){return e(+r)},n}(0);function f4(e,t,n){var r=e._x1,i=e._y1,a=e._x2,s=e._y2;if(e._l01_a>Dt){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,i=(i*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>Dt){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,l=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/l,s=(s*c+e._y1*e._l23_2a-n*e._l12_2a)/l}e._context.bezierCurveTo(r,i,a,s,e._x2,e._y2)}function kS(e,t){this._context=e,this._alpha=t}kS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:f4(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const qI=function e(t){function n(r){return t?new kS(r,t):new u4(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function CS(e,t){this._context=e,this._alpha=t}CS.prototype={areaStart:Pa,areaEnd:Pa,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:f4(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const WI=function e(t){function n(r){return t?new CS(r,t):new c4(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function FS(e,t){this._context=e,this._alpha=t}FS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:f4(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const HI=function e(t){function n(r){return t?new FS(r,t):new l4(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function MS(e){this._context=e}MS.prototype={areaStart:Pa,areaEnd:Pa,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function GI(e){return new MS(e)}function ev(e){return e<0?-1:1}function tv(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),s=(n-e._y1)/(i||r<0&&-0),o=(a*i+s*r)/(r+i);return(ev(a)+ev(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function nv(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function y1(e,t,n){var r=e._x0,i=e._y0,a=e._x1,s=e._y1,o=(a-r)/3;e._context.bezierCurveTo(r+o,i+o*t,a-o,s-o*n,a,s)}function Fh(e){this._context=e}Fh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:y1(this,this._t0,nv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,y1(this,nv(this,n=tv(this,e,t)),n);break;default:y1(this,this._t0,n=tv(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function TS(e){this._context=new NS(e)}(TS.prototype=Object.create(Fh.prototype)).point=function(e,t){Fh.prototype.point.call(this,t,e)};function NS(e){this._context=e}NS.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function YI(e){return new Fh(e)}function XI(e){return new TS(e)}function DS(e){this._context=e}DS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=rv(e),i=rv(t),a=0,s=1;s=0;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function KI(e){return new _g(e,.5)}function JI(e){return new _g(e,0)}function QI(e){return new _g(e,1)}function Ta(e,t){if(typeof document<"u"&&document.createElement){const n=document.createElement("canvas");if(n&&n.getContext)return n.width=e,n.height=t,n}return null}const ZI=()=>typeof Image<"u"?Image:null;function hi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function es(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Zm=Symbol("implicit");function d4(){var e=new x8,t=[],n=[],r=Zm;function i(a){let s=e.get(a);if(s===void 0){if(r!==Zm)return r;e.set(a,s=t.push(a)-1)}return n[s%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new x8;for(const s of a)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return d4(t,n).unknown(r)},hi.apply(i,arguments),i}function cc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _f(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ts(){}var Qs=.7,Au=1/Qs,cu="\\s*([+-]?\\d+)\\s*",Ul="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Jr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ez=/^#([0-9a-f]{3,8})$/,tz=new RegExp(`^rgb\\(${cu},${cu},${cu}\\)$`),nz=new RegExp(`^rgb\\(${Jr},${Jr},${Jr}\\)$`),rz=new RegExp(`^rgba\\(${cu},${cu},${cu},${Ul}\\)$`),iz=new RegExp(`^rgba\\(${Jr},${Jr},${Jr},${Ul}\\)$`),az=new RegExp(`^hsl\\(${Ul},${Jr},${Jr}\\)$`),sz=new RegExp(`^hsla\\(${Ul},${Jr},${Jr},${Ul}\\)$`),iv={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};cc(ts,jl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:av,formatHex:av,formatHex8:oz,formatHsl:uz,formatRgb:sv,toString:sv});function av(){return this.rgb().formatHex()}function oz(){return this.rgb().formatHex8()}function uz(){return OS(this).formatHsl()}function sv(){return this.rgb().formatRgb()}function jl(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ez.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ov(t):n===3?new ht(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?fd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?fd(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=tz.exec(e))?new ht(t[1],t[2],t[3],1):(t=nz.exec(e))?new ht(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=rz.exec(e))?fd(t[1],t[2],t[3],t[4]):(t=iz.exec(e))?fd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=az.exec(e))?lv(t[1],t[2]/100,t[3]/100,1):(t=sz.exec(e))?lv(t[1],t[2]/100,t[3]/100,t[4]):iv.hasOwnProperty(e)?ov(iv[e]):e==="transparent"?new ht(NaN,NaN,NaN,0):null}function ov(e){return new ht(e>>16&255,e>>8&255,e&255,1)}function fd(e,t,n,r){return r<=0&&(e=t=n=NaN),new ht(e,t,n,r)}function h4(e){return e instanceof ts||(e=jl(e)),e?(e=e.rgb(),new ht(e.r,e.g,e.b,e.opacity)):new ht}function Ia(e,t,n,r){return arguments.length===1?h4(e):new ht(e,t,n,r??1)}function ht(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}cc(ht,Ia,_f(ts,{brighter(e){return e=e==null?Au:Math.pow(Au,e),new ht(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Qs:Math.pow(Qs,e),new ht(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ht(qs(this.r),qs(this.g),qs(this.b),Mh(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:uv,formatHex:uv,formatHex8:cz,formatRgb:cv,toString:cv}));function uv(){return`#${Ps(this.r)}${Ps(this.g)}${Ps(this.b)}`}function cz(){return`#${Ps(this.r)}${Ps(this.g)}${Ps(this.b)}${Ps((isNaN(this.opacity)?1:this.opacity)*255)}`}function cv(){const e=Mh(this.opacity);return`${e===1?"rgb(":"rgba("}${qs(this.r)}, ${qs(this.g)}, ${qs(this.b)}${e===1?")":`, ${e})`}`}function Mh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function qs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ps(e){return e=qs(e),(e<16?"0":"")+e.toString(16)}function lv(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new br(e,t,n,r)}function OS(e){if(e instanceof br)return new br(e.h,e.s,e.l,e.opacity);if(e instanceof ts||(e=jl(e)),!e)return new br;if(e instanceof br)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),s=NaN,o=a-i,u=(a+i)/2;return o?(t===a?s=(n-r)/o+(n0&&u<1?0:s,new br(s,o,u,e.opacity)}function Th(e,t,n,r){return arguments.length===1?OS(e):new br(e,t,n,r??1)}function br(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}cc(br,Th,_f(ts,{brighter(e){return e=e==null?Au:Math.pow(Au,e),new br(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Qs:Math.pow(Qs,e),new br(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ht(v1(e>=240?e-240:e+120,i,r),v1(e,i,r),v1(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new br(fv(this.h),dd(this.s),dd(this.l),Mh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Mh(this.opacity);return`${e===1?"hsl(":"hsla("}${fv(this.h)}, ${dd(this.s)*100}%, ${dd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function fv(e){return e=(e||0)%360,e<0?e+360:e}function dd(e){return Math.max(0,Math.min(1,e||0))}function v1(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const RS=Math.PI/180,LS=180/Math.PI,Nh=18,PS=.96422,IS=1,zS=.82521,BS=4/29,lu=6/29,US=3*lu*lu,lz=lu*lu*lu;function jS(e){if(e instanceof Qr)return new Qr(e.l,e.a,e.b,e.opacity);if(e instanceof zi)return qS(e);e instanceof ht||(e=h4(e));var t=E1(e.r),n=E1(e.g),r=E1(e.b),i=x1((.2225045*t+.7168786*n+.0606169*r)/IS),a,s;return t===n&&n===r?a=s=i:(a=x1((.4360747*t+.3850649*n+.1430804*r)/PS),s=x1((.0139322*t+.0971045*n+.7141733*r)/zS)),new Qr(116*i-16,500*(a-i),200*(i-s),e.opacity)}function Dh(e,t,n,r){return arguments.length===1?jS(e):new Qr(e,t,n,r??1)}function Qr(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}cc(Qr,Dh,_f(ts,{brighter(e){return new Qr(this.l+Nh*(e??1),this.a,this.b,this.opacity)},darker(e){return new Qr(this.l-Nh*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=PS*_1(t),e=IS*_1(e),n=zS*_1(n),new ht(w1(3.1338561*t-1.6168667*e-.4906146*n),w1(-.9787684*t+1.9161415*e+.033454*n),w1(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function x1(e){return e>lz?Math.pow(e,1/3):e/US+BS}function _1(e){return e>lu?e*e*e:US*(e-BS)}function w1(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function E1(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function fz(e){if(e instanceof zi)return new zi(e.h,e.c,e.l,e.opacity);if(e instanceof Qr||(e=jS(e)),e.a===0&&e.b===0)return new zi(NaN,0=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],s=r>0?e[r-1]:2*i-a,o=r()=>e;function XS(e,t){return function(n){return e+n*t}}function hz(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Sg(e,t){var n=t-e;return n?XS(e,n>180||n<-180?n-360*Math.round(n/360):n):Eg(isNaN(e)?t:e)}function gz(e){return(e=+e)==1?gt:function(t,n){return n-t?hz(t,n,e):Eg(isNaN(t)?n:t)}}function gt(e,t){var n=t-e;return n?XS(e,n):Eg(isNaN(e)?t:e)}const tb=function e(t){var n=gz(t);function r(i,a){var s=n((i=Ia(i)).r,(a=Ia(a)).r),o=n(i.g,a.g),u=n(i.b,a.b),c=gt(i.opacity,a.opacity);return function(l){return i.r=s(l),i.g=o(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=e,r}(1);function VS(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),s,o;for(s=0;sn&&(a=t.slice(n,a),o[s]?o[s]+=a:o[++s]=a),(r=r[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,u.push({i:s,x:pr(r,i)})),n=S1.lastIndex;return n180?l+=360:l-c>180&&(c+=360),d.push({i:f.push(i(f)+"rotate(",null,r)-2,x:pr(c,l)})):l&&f.push(i(f)+"rotate("+l+r)}function o(c,l,f,d){c!==l?d.push({i:f.push(i(f)+"skewX(",null,r)-2,x:pr(c,l)}):l&&f.push(i(f)+"skewX("+l+r)}function u(c,l,f,d,h,g){if(c!==f||l!==d){var p=h.push(i(h)+"scale(",null,",",null,")");g.push({i:p-4,x:pr(c,f)},{i:p-2,x:pr(l,d)})}else(f!==1||d!==1)&&h.push(i(h)+"scale("+f+","+d+")")}return function(c,l){var f=[],d=[];return c=e(c),l=e(l),a(c.translateX,c.translateY,l.translateX,l.translateY,f,d),s(c.rotate,l.rotate,f,d),o(c.skewX,l.skewX,f,d),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,f,d),c=l=null,function(h){for(var g=-1,p=d.length,m;++gt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Uz(e,t,n){var r=e[0],i=e[1],a=t[0],s=t[1];return i2?jz:Uz,u=c=null,f}function f(d){return d==null||isNaN(d=+d)?a:(u||(u=o(e.map(r),t,n)))(r(s(d)))}return f.invert=function(d){return s(i((c||(c=o(t,e.map(r),pr)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,ib),l()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),l()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),n=wf,l()},f.clamp=function(d){return arguments.length?(s=d?!0:mn,l()):s!==mn},f.interpolate=function(d){return arguments.length?(n=d,l()):n},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,h){return r=d,i=h,l()}}function s$(){return $g()(mn,mn)}function o$(e,t,n,r){var i=Ra(e,t,n),a;switch(r=Js(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Dw(i,s))&&(r.precision=a),i2(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=Ow(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Nw(i))&&(r.precision=a-(r.type==="%")*2);break}}return eg(r)}function $o(e){var t=e.domain;return e.ticks=function(n){var r=t();return Pm(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return o$(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,s=r[i],o=r[a],u,c,l=10;for(o0;){if(c=Im(s,o,n),c===u)return r[i]=s,r[a]=o,t(r);if(c>0)s=Math.floor(s/c)*c,o=Math.ceil(o/c)*c;else if(c<0)s=Math.ceil(s*c)/c,o=Math.floor(o*c)/c;else break;u=c}return e},e}function u$(){var e=s$();return e.copy=function(){return Ef(e,u$())},hi.apply(e,arguments),$o(e)}function c$(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,ib),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return c$(e).unknown(t)},e=arguments.length?Array.from(e,ib):[0,1],$o(n)}function l$(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],s;return aMath.pow(e,t)}function Yz(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function xv(e){return(t,n)=>-e(-t,n)}function y4(e){const t=e(yv,vv),n=t.domain;let r=10,i,a;function s(){return i=Yz(r),a=Gz(r),n()[0]<0?(i=xv(i),a=xv(a),e(qz,Wz)):e(yv,vv),t}return t.base=function(o){return arguments.length?(r=+o,s()):r},t.domain=function(o){return arguments.length?(n(o),s()):n()},t.ticks=o=>{const u=n();let c=u[0],l=u[u.length-1];const f=l0){for(;d<=h;++d)for(g=1;gl)break;b.push(p)}}else for(;d<=h;++d)for(g=r-1;g>=1;--g)if(p=d>0?g/a(-d):g*a(d),!(pl)break;b.push(p)}b.length*2{if(o==null&&(o=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Js(u)).precision==null&&(u.trim=!0),u=eg(u)),o===1/0)return u;const c=Math.max(1,r*o/t.ticks().length);return l=>{let f=l/a(Math.round(i(l)));return f*rn(l$(n(),{floor:o=>a(Math.floor(i(o))),ceil:o=>a(Math.ceil(i(o)))})),t}function f$(){const e=y4($g()).domain([1,10]);return e.copy=()=>Ef(e,f$()).base(e.base()),hi.apply(e,arguments),e}function _v(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function wv(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function v4(e){var t=1,n=e(_v(t),wv(t));return n.constant=function(r){return arguments.length?e(_v(t=+r),wv(t)):t},$o(n)}function d$(){var e=v4($g());return e.copy=function(){return Ef(e,d$()).constant(e.constant())},hi.apply(e,arguments)}function Ev(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Xz(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Vz(e){return e<0?-e*e:e*e}function x4(e){var t=e(mn,mn),n=1;function r(){return n===1?e(mn,mn):n===.5?e(Xz,Vz):e(Ev(n),Ev(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},$o(t)}function _4(){var e=x4($g());return e.copy=function(){return Ef(e,_4()).exponent(e.exponent())},hi.apply(e,arguments),e}function Kz(){return _4.apply(null,arguments).exponent(.5)}function h$(){var e=[],t=[],n=[],r;function i(){var s=0,o=Math.max(1,t.length);for(n=new Array(o-1);++s0?n[o-1]:e[0],o=n?[r[n-1],t]:[r[c-1],r[c]]},s.unknown=function(u){return arguments.length&&(a=u),s},s.thresholds=function(){return r.slice()},s.copy=function(){return g$().domain([e,t]).range(i).unknown(a)},hi.apply($o(s),arguments)}function p$(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Oa(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var s=t.indexOf(a);return[e[s-1],e[s]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return p$().domain(e).range(t).unknown(n)},hi.apply(i,arguments)}function Jz(e){return new Date(e)}function Qz(e){return e instanceof Date?+e:+new Date(+e)}function w4(e,t,n,r,i,a,s,o,u,c){var l=s$(),f=l.invert,d=l.domain,h=c(".%L"),g=c(":%S"),p=c("%I:%M"),m=c("%I %p"),b=c("%a %d"),y=c("%b %d"),v=c("%B"),x=c("%Y");function _(E){return(u(E)0?r:1:0}const rB="identity",ku="linear",Ki="log",Sf="pow",$f="sqrt",Cg="symlog",Zs="time",eo="utc",Zr="sequential",lc="diverging",Cu="quantile",Fg="quantize",Mg="threshold",k4="ordinal",sb="point",_$="band",C4="bin-ordinal",ct="continuous",Af="discrete",kf="discretizing",sr="interpolating",F4="temporal";function iB(e){return function(t){let n=t[0],r=t[1],i;return r=r&&n[u]<=i&&(a<0&&(a=u),s=u);if(!(a<0))return r=e.invertExtent(n[a]),i=e.invertExtent(n[s]),[r[0]===void 0?r[1]:r[0],i[1]===void 0?i[0]:i[1]]}}function M4(){const e=d4().unknown(void 0),t=e.domain,n=e.range;let r=[0,1],i,a,s=!1,o=0,u=0,c=.5;delete e.unknown;function l(){const f=t().length,d=r[1]p+i*b);return n(d?m.reverse():m)}return e.domain=function(f){return arguments.length?(t(f),l()):t()},e.range=function(f){return arguments.length?(r=[+f[0],+f[1]],l()):r.slice()},e.rangeRound=function(f){return r=[+f[0],+f[1]],s=!0,l()},e.bandwidth=function(){return a},e.step=function(){return i},e.round=function(f){return arguments.length?(s=!!f,l()):s},e.padding=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),o=u,l()):o},e.paddingInner=function(f){return arguments.length?(o=Math.max(0,Math.min(1,f)),l()):o},e.paddingOuter=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),l()):u},e.align=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),l()):c},e.invertRange=function(f){if(f[0]==null||f[1]==null)return;const d=r[1]r[1-d])))return b=Math.max(0,Oa(h,p)-1),y=p===m?b:Oa(h,m)-1,p-h[b]>a+1e-10&&++b,d&&(v=b,b=g-y,y=g-v),b>y?void 0:t().slice(b,y+1)},e.invert=function(f){const d=e.invertRange([f,f]);return d&&d[0]},e.copy=function(){return M4().domain(t()).range(r).round(s).paddingInner(o).paddingOuter(u).align(c)},l()}function w$(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return w$(t())},e}function sB(){return w$(M4().paddingInner(1))}var oB=Array.prototype.map;function uB(e){return oB.call(e,Pt)}const cB=Array.prototype.slice;function E$(){let e=[],t=[];function n(r){return r==null||r!==r?void 0:t[(Oa(e,r)-1)%t.length]}return n.domain=function(r){return arguments.length?(e=uB(r),n):e.slice()},n.range=function(r){return arguments.length?(t=cB.call(r),n):t.slice()},n.tickFormat=function(r,i){return o$(e[0],xe(e),r??10,i)},n.copy=function(){return E$().domain(n.domain()).range(n.range())},n}const Rh=new Map,S$=Symbol("vega_scale");function $$(e){return e[S$]=!0,e}function lB(e){return e&&e[S$]===!0}function fB(e,t,n){const r=function(){const a=t();return a.invertRange||(a.invertRange=a.invert?iB(a):a.invertExtent?aB(a):void 0),a.type=e,$$(a)};return r.metadata=Ar(Y(n)),r}function Ae(e,t,n){return arguments.length>1?(Rh.set(e,fB(e,t,n)),this):A$(e)?Rh.get(e):void 0}Ae(rB,c$);Ae(ku,u$,ct);Ae(Ki,f$,[ct,Ki]);Ae(Sf,_4,ct);Ae($f,Kz,ct);Ae(Cg,d$,ct);Ae(Zs,Zz,[ct,F4]);Ae(eo,eB,[ct,F4]);Ae(Zr,E4,[ct,sr]);Ae(`${Zr}-${ku}`,E4,[ct,sr]);Ae(`${Zr}-${Ki}`,m$,[ct,sr,Ki]);Ae(`${Zr}-${Sf}`,S4,[ct,sr]);Ae(`${Zr}-${$f}`,tB,[ct,sr]);Ae(`${Zr}-${Cg}`,b$,[ct,sr]);Ae(`${lc}-${ku}`,y$,[ct,sr]);Ae(`${lc}-${Ki}`,v$,[ct,sr,Ki]);Ae(`${lc}-${Sf}`,$4,[ct,sr]);Ae(`${lc}-${$f}`,nB,[ct,sr]);Ae(`${lc}-${Cg}`,x$,[ct,sr]);Ae(Cu,h$,[kf,Cu]);Ae(Fg,g$,kf);Ae(Mg,p$,kf);Ae(C4,E$,[Af,kf]);Ae(k4,d4,Af);Ae(_$,M4,Af);Ae(sb,sB,Af);function A$(e){return Rh.has(e)}function Ao(e,t){const n=Rh.get(e);return n&&n.metadata[t]}function T4(e){return Ao(e,ct)}function Fu(e){return Ao(e,Af)}function ob(e){return Ao(e,kf)}function k$(e){return Ao(e,Ki)}function dB(e){return Ao(e,F4)}function C$(e){return Ao(e,sr)}function F$(e){return Ao(e,Cu)}const hB=["clamp","base","constant","exponent"];function M$(e,t){const n=t[0],r=xe(t)-n;return function(i){return e(n+i*r)}}function Tg(e,t,n){return b4(N4(t||"rgb",n),e)}function T$(e,t){const n=new Array(t),r=t+1;for(let i=0;ie[o]?s[o](e[o]()):0),s)}function N4(e,t){const n=Iz[gB(e)];return t!=null&&n&&n.gamma?n.gamma(t):n}function gB(e){return"interpolate"+e.toLowerCase().split("-").map(t=>t[0].toUpperCase()+t.slice(1)).join("")}const pB={blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},mB={category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"};function D$(e){const t=e.length/6|0,n=new Array(t);for(let r=0;rTg(D$(e)));function D4(e,t){return e=e&&e.toLowerCase(),arguments.length>1?(Sv[e]=t,this):Sv[e]}const Xd="symbol",bB="discrete",yB="gradient",vB=e=>P(e)?e.map(t=>String(t)):String(e),xB=(e,t)=>e[1]-t[1],_B=(e,t)=>t[1]-e[1];function O4(e,t,n){let r;return we(t)&&(e.bins&&(t=Math.max(t,e.bins.length)),n!=null&&(t=Math.min(t,Math.floor(bf(e.domain())/n||1)+1))),V(t)&&(r=t.step,t=t.interval),X(t)&&(t=e.type===Zs?sc(t):e.type==eo?oc(t):R("Only time and utc scales accept interval strings."),r&&(t=t.every(r))),t}function R$(e,t,n){let r=e.range(),i=r[0],a=xe(r),s=xB;if(i>a&&(r=a,a=i,i=r,s=_B),i=Math.floor(i),a=Math.ceil(a),t=t.map(o=>[o,e(o)]).filter(o=>i<=o[1]&&o[1]<=a).sort(s).map(o=>o[0]),n>0&&t.length>1){const o=[t[0],xe(t)];for(;t.length>n&&t.length>=3;)t=t.filter((u,c)=>!(c%2));t.length<3&&(t=o)}return t}function R4(e,t){return e.bins?R$(e,e.bins):e.ticks?e.ticks(t):e.domain()}function L$(e,t,n,r,i,a){const s=t.type;let o=vB;if(s===Zs||i===Zs)o=e.timeFormat(r);else if(s===eo||i===eo)o=e.utcFormat(r);else if(k$(s)){const u=e.formatFloat(r);if(a||t.bins)o=u;else{const c=P$(t,n,!1);o=l=>c(l)?u(l):""}}else if(t.tickFormat){const u=t.domain();o=e.formatSpan(u[0],u[u.length-1],n,r)}else r&&(o=e.format(r));return o}function P$(e,t,n){const r=R4(e,t),i=e.base(),a=Math.log(i),s=Math.max(1,i*t/r.length),o=u=>{let c=u/Math.pow(i,Math.round(Math.log(u)/a));return c*i1?r[1]-r[0]:r[0],s;for(s=1;sub[e.type]||e.bins;function B$(e,t,n,r,i,a,s){const o=I$[t.type]&&a!==Zs&&a!==eo?wB(e,t,i):L$(e,t,n,i,a,s);return r===Xd&&$B(t)?AB(o):r===bB?kB(o):CB(o)}const AB=e=>(t,n,r)=>{const i=$v(r[n+1],$v(r.max,1/0)),a=Av(t,e),s=Av(i,e);return a&&s?a+" – "+s:s?"< "+s:"≥ "+a},$v=(e,t)=>e??t,kB=e=>(t,n)=>n?e(t):null,CB=e=>t=>e(t),Av=(e,t)=>Number.isFinite(e)?t(e):null;function FB(e){const t=e.domain(),n=t.length-1;let r=+t[0],i=+xe(t),a=i-r;if(e.type===Mg){const s=n?a/n:.1;r-=s,i+=s,a=i-r}return s=>(s-r)/a}function MB(e,t,n,r){const i=r||t.type;return X(n)&&dB(i)&&(n=n.replace(/%a/g,"%A").replace(/%b/g,"%B")),!n&&i===Zs?e.timeFormat("%A, %d %B %Y, %X"):!n&&i===eo?e.utcFormat("%A, %d %B %Y, %X UTC"):B$(e,t,5,null,n,r,!0)}function U$(e,t,n){n=n||{};const r=Math.max(3,n.maxlen||7),i=MB(e,t,n.format,n.formatType);if(ob(t.type)){const a=z$(t).slice(1).map(i),s=a.length;return`${s} boundar${s===1?"y":"ies"}: ${a.join(", ")}`}else if(Fu(t.type)){const a=t.domain(),s=a.length,o=s>r?a.slice(0,r-2).map(i).join(", ")+", ending with "+a.slice(-1).map(i):a.map(i).join(", ");return`${s} value${s===1?"":"s"}: ${o}`}else{const a=t.domain();return`values from ${i(a[0])} to ${i(xe(a))}`}}let j$=0;function TB(){j$=0}const Lh="p_";function L4(e){return e&&e.gradient}function q$(e,t,n){const r=e.gradient;let i=e.id,a=r==="radial"?Lh:"";return i||(i=e.id="gradient_"+j$++,r==="radial"?(e.x1=Br(e.x1,.5),e.y1=Br(e.y1,.5),e.r1=Br(e.r1,0),e.x2=Br(e.x2,.5),e.y2=Br(e.y2,.5),e.r2=Br(e.r2,.5),a=Lh):(e.x1=Br(e.x1,0),e.y1=Br(e.y1,0),e.x2=Br(e.x2,1),e.y2=Br(e.y2,0))),t[i]=e,"url("+(n||"")+"#"+a+i+")"}function Br(e,t){return e??t}function W$(e,t){var n=[],r;return r={gradient:"linear",x1:e?e[0]:0,y1:e?e[1]:0,x2:t?t[0]:1,y2:t?t[1]:0,stops:n,stop:function(i,a){return n.push({offset:i,color:a}),r}}}const kv={basis:{curve:LI},"basis-closed":{curve:PI},"basis-open":{curve:II},bundle:{curve:zI,tension:"beta",value:.85},cardinal:{curve:BI,tension:"tension",value:0},"cardinal-open":{curve:jI,tension:"tension",value:0},"cardinal-closed":{curve:UI,tension:"tension",value:0},"catmull-rom":{curve:qI,tension:"alpha",value:.5},"catmull-rom-closed":{curve:WI,tension:"alpha",value:.5},"catmull-rom-open":{curve:HI,tension:"alpha",value:.5},linear:{curve:o4},"linear-closed":{curve:GI},monotone:{horizontal:XI,vertical:YI},natural:{curve:VI},step:{curve:KI},"step-after":{curve:QI},"step-before":{curve:JI}};function P4(e,t,n){var r=ie(kv,e)&&kv[e],i=null;return r&&(i=r.curve||r[t||"vertical"],r.tension&&n!=null&&(i=i[r.tension](n))),i}const NB={m:2,l:2,h:1,v:1,z:0,c:6,s:4,q:4,t:2,a:7},DB=/[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi,OB=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,RB=/^((\s+,?\s*)|(,\s*))/,LB=/^[01]/;function Mu(e){const t=[];return(e.match(DB)||[]).forEach(r=>{let i=r[0];const a=i.toLowerCase(),s=NB[a],o=PB(a,s,r.slice(1).trim()),u=o.length;if(u1&&(p=Math.sqrt(p),n*=p,r*=p);const m=d/n,b=f/n,y=-f/r,v=d/r,x=m*o+b*u,_=y*o+v*u,E=m*e+b*t,w=y*e+v*t;let $=1/((E-x)*(E-x)+(w-_)*(w-_))-.25;$<0&&($=0);let F=Math.sqrt($);a==i&&(F=-F);const k=.5*(x+E)-F*(w-_),D=.5*(_+w)+F*(E-x),A=Math.atan2(_-D,x-k);let C=Math.atan2(w-D,E-k)-A;C<0&&a===1?C+=Yr:C>0&&a===0&&(C-=Yr);const T=Math.ceil(Math.abs(C/(Ts+.001))),L=[];for(let I=0;I+e}function gd(e,t,n){return Math.max(t,Math.min(e,n))}function Y$(){var e=qB,t=WB,n=HB,r=GB,i=$i(0),a=i,s=i,o=i,u=null;function c(l,f,d){var h,g=f??+e.call(this,l),p=d??+t.call(this,l),m=+n.call(this,l),b=+r.call(this,l),y=Math.min(m,b)/2,v=gd(+i.call(this,l),0,y),x=gd(+a.call(this,l),0,y),_=gd(+s.call(this,l),0,y),E=gd(+o.call(this,l),0,y);if(u||(u=h=yg()),v<=0&&x<=0&&_<=0&&E<=0)u.rect(g,p,m,b);else{var w=g+m,S=p+b;u.moveTo(g+v,p),u.lineTo(w-x,p),u.bezierCurveTo(w-ca*x,p,w,p+ca*x,w,p+x),u.lineTo(w,S-E),u.bezierCurveTo(w,S-ca*E,w-ca*E,S,w-E,S),u.lineTo(g+_,S),u.bezierCurveTo(g+ca*_,S,g,S-ca*_,g,S-_),u.lineTo(g,p+v),u.bezierCurveTo(g,p+ca*v,g+ca*v,p,g+v,p),u.closePath()}if(h)return u=null,h+""||null}return c.x=function(l){return arguments.length?(e=$i(l),c):e},c.y=function(l){return arguments.length?(t=$i(l),c):t},c.width=function(l){return arguments.length?(n=$i(l),c):n},c.height=function(l){return arguments.length?(r=$i(l),c):r},c.cornerRadius=function(l,f,d,h){return arguments.length?(i=$i(l),a=f!=null?$i(f):i,o=d!=null?$i(d):i,s=h!=null?$i(h):a,c):i},c.context=function(l){return arguments.length?(u=l??null,c):u},c}function X$(){var e,t,n,r,i=null,a,s,o,u;function c(f,d,h){const g=h/2;if(a){var p=o-d,m=f-s;if(p||m){var b=Math.hypot(p,m),y=(p/=b)*u,v=(m/=b)*u,x=Math.atan2(m,p);i.moveTo(s-y,o-v),i.lineTo(f-p*g,d-m*g),i.arc(f,d,g,x-Math.PI,x),i.lineTo(s+y,o+v),i.arc(s,o,u,x,x+Math.PI)}else i.arc(f,d,g,0,Yr);i.closePath()}else a=1;s=f,o=d,u=g}function l(f){var d,h=f.length,g,p=!1,m;for(i==null&&(i=m=yg()),d=0;d<=h;++d)!(de.x||0,Mf=e=>e.y||0,YB=e=>e.width||0,XB=e=>e.height||0,VB=e=>(e.x||0)+(e.width||0),KB=e=>(e.y||0)+(e.height||0),JB=e=>e.startAngle||0,QB=e=>e.endAngle||0,ZB=e=>e.padAngle||0,eU=e=>e.innerRadius||0,tU=e=>e.outerRadius||0,nU=e=>e.cornerRadius||0,rU=e=>Cf(e.cornerRadiusTopLeft,e.cornerRadius)||0,iU=e=>Cf(e.cornerRadiusTopRight,e.cornerRadius)||0,aU=e=>Cf(e.cornerRadiusBottomRight,e.cornerRadius)||0,sU=e=>Cf(e.cornerRadiusBottomLeft,e.cornerRadius)||0,oU=e=>Cf(e.size,64),uU=e=>e.size||1,Ng=e=>e.defined!==!1,cU=e=>G$(e.shape||"circle"),lU=DI().startAngle(JB).endAngle(QB).padAngle(ZB).innerRadius(eU).outerRadius(tU).cornerRadius(nU),fU=ES().x(Ff).y1(Mf).y0(KB).defined(Ng),dU=ES().y(Mf).x1(Ff).x0(VB).defined(Ng),hU=wS().x(Ff).y(Mf).defined(Ng),gU=Y$().x(Ff).y(Mf).width(YB).height(XB).cornerRadius(rU,iU,aU,sU),pU=RI().type(cU).size(oU),mU=X$().x(Ff).y(Mf).defined(Ng).size(uU);function I4(e){return e.cornerRadius||e.cornerRadiusTopLeft||e.cornerRadiusTopRight||e.cornerRadiusBottomRight||e.cornerRadiusBottomLeft}function bU(e,t){return lU.context(e)(t)}function yU(e,t){const n=t[0],r=n.interpolate||"linear";return(n.orient==="horizontal"?dU:fU).curve(P4(r,n.orient,n.tension)).context(e)(t)}function vU(e,t){const n=t[0],r=n.interpolate||"linear";return hU.curve(P4(r,n.orient,n.tension)).context(e)(t)}function fc(e,t,n,r){return gU.context(e)(t,n,r)}function xU(e,t){return(t.mark.shape||t.shape).context(e)(t)}function _U(e,t){return pU.context(e)(t)}function wU(e,t){return mU.context(e)(t)}var V$=1;function K$(){V$=1}function z4(e,t,n){var r=t.clip,i=e._defs,a=t.clip_id||(t.clip_id="clip"+V$++),s=i.clipping[a]||(i.clipping[a]={id:a});return le(r)?s.path=r(null):I4(n)?s.path=fc(null,n,0,0):(s.width=n.width||0,s.height=n.height||0),"url(#"+a+")"}function nt(e){this.clear(),e&&this.union(e)}nt.prototype={clone(){return new nt(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2},set(e,t,n,r){return nthis.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},expand(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(e){return this.x1*=e,this.y1*=e,this.x2*=e,this.y2*=e,this},translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},rotate(e,t,n){const r=this.rotatedPoints(e,t,n);return this.clear().add(r[0],r[1]).add(r[2],r[3]).add(r[4],r[5]).add(r[6],r[7])},rotatedPoints(e,t,n){var{x1:r,y1:i,x2:a,y2:s}=this,o=Math.cos(e),u=Math.sin(e),c=t-t*o+n*u,l=n-t*u-n*o;return[o*r-u*i+c,u*r+o*i+l,o*r-u*s+c,u*r+o*s+l,o*a-u*i+c,u*a+o*i+l,o*a-u*s+c,u*a+o*s+l]},union(e){return e.x1this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},intersect(e){return e.x1>this.x1&&(this.x1=e.x1),e.y1>this.y1&&(this.y1=e.y1),e.x2=e.x2&&this.y1<=e.y1&&this.y2>=e.y2},alignsWith(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},intersects(e){return e&&!(this.x2e.x2||this.y2e.y2)},contains(e,t){return!(ethis.x2||tthis.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}};function Dg(e){this.mark=e,this.bounds=this.bounds||new nt}function Og(e){Dg.call(this,e),this.items=this.items||[]}W(Og,Dg);function B4(e){this._pending=0,this._loader=e||sg()}function Tv(e){e._pending+=1}function Dc(e){e._pending-=1}B4.prototype={pending(){return this._pending},sanitizeURL(e){const t=this;return Tv(t),t._loader.sanitize(e,{context:"href"}).then(n=>(Dc(t),n)).catch(()=>(Dc(t),null))},loadImage(e){const t=this,n=ZI();return Tv(t),t._loader.sanitize(e,{context:"image"}).then(r=>{const i=r.href;if(!i||!n)throw{url:i};const a=new n,s=ie(r,"crossOrigin")?r.crossOrigin:"anonymous";return s!=null&&(a.crossOrigin=s),a.onload=()=>Dc(t),a.onerror=()=>Dc(t),a.src=i,a}).catch(r=>(Dc(t),{complete:!1,width:0,height:0,src:r&&r.url||""}))},ready(){const e=this;return new Promise(t=>{function n(r){e.pending()?setTimeout(()=>{n(!0)},10):t(r)}n(!1)})}};function ea(e,t,n){if(t.stroke&&t.opacity!==0&&t.strokeOpacity!==0){const r=t.strokeWidth!=null?+t.strokeWidth:1;e.expand(r+(n?EU(t,r):0))}return e}function EU(e,t){return e.strokeJoin&&e.strokeJoin!=="miter"?0:t}const SU=Yr-1e-8;let Rg,Vd,Kd,Is,cb,Jd,lb,fb;const va=(e,t)=>Rg.add(e,t),Qd=(e,t)=>va(Vd=e,Kd=t),Nv=e=>va(e,Rg.y1),Dv=e=>va(Rg.x1,e),Ns=(e,t)=>cb*e+lb*t,Ds=(e,t)=>Jd*e+fb*t,C1=(e,t)=>va(Ns(e,t),Ds(e,t)),F1=(e,t)=>Qd(Ns(e,t),Ds(e,t));function Tf(e,t){return Rg=e,t?(Is=t*za,cb=fb=Math.cos(Is),Jd=Math.sin(Is),lb=-Jd):(cb=fb=1,Is=Jd=lb=0),$U}const $U={beginPath(){},closePath(){},moveTo:F1,lineTo:F1,rect(e,t,n,r){Is?(C1(e+n,t),C1(e+n,t+r),C1(e,t+r),F1(e,t)):(va(e+n,t+r),Qd(e,t))},quadraticCurveTo(e,t,n,r){const i=Ns(e,t),a=Ds(e,t),s=Ns(n,r),o=Ds(n,r);Ov(Vd,i,s,Nv),Ov(Kd,a,o,Dv),Qd(s,o)},bezierCurveTo(e,t,n,r,i,a){const s=Ns(e,t),o=Ds(e,t),u=Ns(n,r),c=Ds(n,r),l=Ns(i,a),f=Ds(i,a);Rv(Vd,s,u,l,Nv),Rv(Kd,o,c,f,Dv),Qd(l,f)},arc(e,t,n,r,i,a){if(r+=Is,i+=Is,Vd=n*Math.cos(i)+e,Kd=n*Math.sin(i)+t,Math.abs(i-r)>SU)va(e-n,t-n),va(e+n,t+n);else{const s=c=>va(n*Math.cos(c)+e,n*Math.sin(c)+t);let o,u;if(s(r),s(i),i!==r)if(r=r%Yr,r<0&&(r+=Yr),i=i%Yr,i<0&&(i+=Yr),ii;++u,o-=Ts)s(o);else for(o=r-r%Ts+Ts,u=0;u<4&&oIB?(l=s*s+o*a,l>=0&&(l=Math.sqrt(l),u=(-s+l)/a,c=(-s-l)/a)):u=.5*o/s,0d)return!1;p>f&&(f=p)}else if(h>0){if(p0?(e.globalAlpha=n,e.fillStyle=Z$(e,t,t.fill),!0):!1}var kU=[];function Nu(e,t,n){var r=(r=t.strokeWidth)!=null?r:1;return r<=0?!1:(n*=t.strokeOpacity==null?1:t.strokeOpacity,n>0?(e.globalAlpha=n,e.strokeStyle=Z$(e,t,t.stroke),e.lineWidth=r,e.lineCap=t.strokeCap||"butt",e.lineJoin=t.strokeJoin||"miter",e.miterLimit=t.strokeMiterLimit||10,e.setLineDash&&(e.setLineDash(t.strokeDash||kU),e.lineDashOffset=t.strokeDashOffset||0),!0):!1)}function CU(e,t){return e.zindex-t.zindex||e.index-t.index}function q4(e){if(!e.zdirty)return e.zitems;var t=e.items,n=[],r,i,a;for(i=0,a=t.length;i=0;)if(r=t(n[i]))return r;if(n===a){for(n=e.items,i=n.length;--i>=0;)if(!n[i].zindex&&(r=t(n[i])))return r}return null}function W4(e){return function(t,n,r){Cr(n,i=>{(!r||r.intersects(i.bounds))&&eA(e,t,i,i)})}}function FU(e){return function(t,n,r){n.items.length&&(!r||r.intersects(n.bounds))&&eA(e,t,n.items[0],n.items)}}function eA(e,t,n,r){var i=n.opacity==null?1:n.opacity;i!==0&&(e(t,r)||(Tu(t,n),n.fill&&Ph(t,n,i)&&t.fill(),n.stroke&&Nu(t,n,i)&&t.stroke()))}function Lg(e){return e=e||er,function(t,n,r,i,a,s){return r*=t.pixelRatio,i*=t.pixelRatio,Ih(n,o=>{const u=o.bounds;if(!(u&&!u.contains(a,s)||!u)&&e(t,o,r,i,a,s))return o})}}function Nf(e,t){return function(n,r,i,a){var s=Array.isArray(r)?r[0]:r,o=t??s.fill,u=s.stroke&&n.isPointInStroke,c,l;return u&&(c=s.strokeWidth,l=s.strokeCap,n.lineWidth=c??1,n.lineCap=l??"butt"),e(n,r)?!1:o&&n.isPointInPath(i,a)||u&&n.isPointInStroke(i,a)}}function H4(e){return Lg(Nf(e))}function Hs(e,t){return"translate("+e+","+t+")"}function G4(e){return"rotate("+e+")"}function MU(e,t){return"scale("+e+","+t+")"}function tA(e){return Hs(e.x||0,e.y||0)}function TU(e){return Hs(e.x||0,e.y||0)+(e.angle?" "+G4(e.angle):"")}function NU(e){return Hs(e.x||0,e.y||0)+(e.angle?" "+G4(e.angle):"")+(e.scaleX||e.scaleY?" "+MU(e.scaleX||1,e.scaleY||1):"")}function Y4(e,t,n){function r(s,o){s("transform",TU(o)),s("d",t(null,o))}function i(s,o){return t(Tf(s,o.angle),o),ea(s,o).translate(o.x||0,o.y||0)}function a(s,o){var u=o.x||0,c=o.y||0,l=o.angle||0;s.translate(u,c),l&&s.rotate(l*=za),s.beginPath(),t(s,o),l&&s.rotate(-l),s.translate(-u,-c)}return{type:e,tag:"path",nested:!1,attr:r,bound:i,draw:W4(a),pick:H4(a),isect:n||U4(a)}}var DU=Y4("arc",bU);function OU(e,t){for(var n=e[0].orient==="horizontal"?t[1]:t[0],r=e[0].orient==="horizontal"?"y":"x",i=e.length,a=1/0,s,o;--i>=0;)e[i].defined!==!1&&(o=Math.abs(e[i][r]-n),o=0;)if(e[r].defined!==!1&&(i=e[r].x-t[0],a=e[r].y-t[1],s=i*i+a*a,s=0;)if(e[n].defined!==!1&&(r=e[n].x-t[0],i=e[n].y-t[1],a=r*r+i*i,r=e[n].size||1,a.5&&t<1.5?.5-Math.abs(t-1):0}function zU(e,t){e("transform",tA(t))}function iA(e,t){const n=rA(t);e("d",fc(null,t,n,n))}function BU(e,t){e("class","background"),e("aria-hidden",!0),iA(e,t)}function UU(e,t){e("class","foreground"),e("aria-hidden",!0),t.strokeForeground?iA(e,t):e("d","")}function jU(e,t,n){const r=t.clip?z4(n,t,t):null;e("clip-path",r)}function qU(e,t){if(!t.clip&&t.items){const n=t.items,r=n.length;for(let i=0;i{const a=i.x||0,s=i.y||0,o=i.strokeForeground,u=i.opacity==null?1:i.opacity;(i.stroke||i.fill)&&u&&(Hl(e,i,a,s),Tu(e,i),i.fill&&Ph(e,i,u)&&e.fill(),i.stroke&&!o&&Nu(e,i,u)&&e.stroke()),e.save(),e.translate(a,s),i.clip&&nA(e,i),n&&n.translate(-a,-s),Cr(i,c=>{(c.marktype==="group"||r==null||r.includes(c.marktype))&&this.draw(e,c,n,r)}),n&&n.translate(a,s),e.restore(),o&&i.stroke&&u&&(Hl(e,i,a,s),Tu(e,i),Nu(e,i,u)&&e.stroke())})}function XU(e,t,n,r,i,a){if(t.bounds&&!t.bounds.contains(i,a)||!t.items)return null;const s=n*e.pixelRatio,o=r*e.pixelRatio;return Ih(t,u=>{let c,l,f;const d=u.bounds;if(d&&!d.contains(i,a))return;l=u.x||0,f=u.y||0;const h=l+(u.width||0),g=f+(u.height||0),p=u.clip;if(p&&(ih||ag))return;if(e.save(),e.translate(l,f),l=i-l,f=a-f,p&&I4(u)&&!GU(e,u,s,o))return e.restore(),null;const m=u.strokeForeground,b=t.interactive!==!1;return b&&m&&u.stroke&&HU(e,u,s,o)?(e.restore(),u):(c=Ih(u,y=>VU(y,l,f)?this.pick(y,n,r,l,f):null),!c&&b&&(u.fill||!m&&u.stroke)&&WU(e,u,s,o)&&(c=u),e.restore(),c||null)})}function VU(e,t,n){return(e.interactive!==!1||e.marktype==="group")&&e.bounds&&e.bounds.contains(t,n)}var KU={type:"group",tag:"g",nested:!1,attr:zU,bound:qU,draw:YU,pick:XU,isect:J$,content:jU,background:BU,foreground:UU},Gl={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function V4(e,t){var n=e.image;return(!n||e.url&&e.url!==n.url)&&(n={complete:!1,width:0,height:0},t.loadImage(e.url).then(r=>{e.image=r,e.image.url=e.url})),n}function K4(e,t){return e.width!=null?e.width:!t||!t.width?0:e.aspect!==!1&&e.height?e.height*t.width/t.height:t.width}function J4(e,t){return e.height!=null?e.height:!t||!t.height?0:e.aspect!==!1&&e.width?e.width*t.height/t.width:t.height}function Pg(e,t){return e==="center"?t/2:e==="right"?t:0}function Ig(e,t){return e==="middle"?t/2:e==="bottom"?t:0}function JU(e,t,n){const r=V4(t,n),i=K4(t,r),a=J4(t,r),s=(t.x||0)-Pg(t.align,i),o=(t.y||0)-Ig(t.baseline,a),u=!r.src&&r.toDataURL?r.toDataURL():r.src||"";e("href",u,Gl["xmlns:xlink"],"xlink:href"),e("transform",Hs(s,o)),e("width",i),e("height",a),e("preserveAspectRatio",t.aspect===!1?"none":"xMidYMid")}function QU(e,t){const n=t.image,r=K4(t,n),i=J4(t,n),a=(t.x||0)-Pg(t.align,r),s=(t.y||0)-Ig(t.baseline,i);return e.set(a,s,a+r,s+i)}function ZU(e,t,n){Cr(t,r=>{if(n&&!n.intersects(r.bounds))return;const i=V4(r,this);let a=K4(r,i),s=J4(r,i);if(a===0||s===0)return;let o=(r.x||0)-Pg(r.align,a),u=(r.y||0)-Ig(r.baseline,s),c,l,f,d;r.aspect!==!1&&(l=i.width/i.height,f=r.width/r.height,l===l&&f===f&&l!==f&&(f{if(!(n&&!n.intersects(r.bounds))){var i=r.opacity==null?1:r.opacity;i&&aA(e,r,i)&&(Tu(e,r),e.stroke())}})}function fj(e,t,n,r){return e.isPointInStroke?aA(e,t,1)&&e.isPointInStroke(n,r):!1}var dj={type:"rule",tag:"line",nested:!1,attr:uj,bound:cj,draw:lj,pick:Lg(fj),isect:Q$},hj=Y4("shape",xU),gj=Y4("symbol",_U,j4);const zv=hw();var On={height:gi,measureWidth:Q4,estimateWidth:zh,width:zh,canvas:sA};sA(!0);function sA(e){On.width=e&&Na?Q4:zh}function zh(e,t){return oA(Ua(e,t),gi(e))}function oA(e,t){return~~(.8*e.length*t)}function Q4(e,t){return gi(e)<=0||!(t=Ua(e,t))?0:uA(t,zg(e))}function uA(e,t){const n=`(${t}) ${e}`;let r=zv.get(n);return r===void 0&&(Na.font=t,r=Na.measureText(e).width,zv.set(n,r)),r}function gi(e){return e.fontSize!=null?+e.fontSize||0:11}function Ba(e){return e.lineHeight!=null?e.lineHeight:gi(e)+2}function pj(e){return P(e)?e.length>1?e:e[0]:e}function Df(e){return pj(e.lineBreak&&e.text&&!P(e.text)?e.text.split(e.lineBreak):e.text)}function Z4(e){const t=Df(e);return(P(t)?t.length-1:0)*Ba(e)}function Ua(e,t){const n=t==null?"":(t+"").trim();return e.limit>0&&n.length?bj(e,n):n}function mj(e){if(On.width===Q4){const t=zg(e);return n=>uA(n,t)}else if(On.width===zh){const t=gi(e);return n=>oA(n,t)}else return t=>On.width(e,t)}function bj(e,t){var n=+e.limit,r=mj(e);if(r(t)>>1,r(t.slice(u))>n?s=u+1:o=u;return i+t.slice(s)}else{for(;s>>1),r(t.slice(0,u))Math.max(d,On.width(t,h)),0)):f=On.width(t,l),i==="center"?u-=f/2:i==="right"&&(u-=f),e.set(u+=s,c+=o,u+f,c+r),t.angle&&!n)e.rotate(t.angle*za,s,o);else if(n===2)return e.rotatedPoints(t.angle*za,s,o);return e}function xj(e,t,n){Cr(t,r=>{var i=r.opacity==null?1:r.opacity,a,s,o,u,c,l,f;if(!(n&&!n.intersects(r.bounds)||i===0||r.fontSize<=0||r.text==null||r.text.length===0)){if(e.font=zg(r),e.textAlign=r.align||"left",a=Bg(r),s=a.x1,o=a.y1,r.angle&&(e.save(),e.translate(s,o),e.rotate(r.angle*za),s=o=0),s+=r.dx||0,o+=(r.dy||0)+e9(r),l=Df(r),Tu(e,r),P(l))for(c=Ba(r),u=0;ut;)e.removeChild(n[--r]);return e}function gA(e){return"mark-"+e.marktype+(e.role?" role-"+e.role:"")+(e.name?" "+e.name:"")}function Ug(e,t){const n=t.getBoundingClientRect();return[e.clientX-n.left-(t.clientLeft||0),e.clientY-n.top-(t.clientTop||0)]}function Aj(e,t,n,r){var i=e&&e.mark,a,s;if(i&&(a=zn[i.marktype]).tip){for(s=Ug(t,n),s[0]-=r[0],s[1]-=r[1];e=e.mark.group;)s[0]-=e.x||0,s[1]-=e.y||0;e=a.tip(i.items,s)}return e}function ja(e,t){this._active=null,this._handlers={},this._loader=e||sg(),this._tooltip=t||kj}function kj(e,t,n,r){e.element().setAttribute("title",r||"")}ja.prototype={initialize(e,t,n){return this._el=e,this._obj=n||null,this.origin(t)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},origin(e){return arguments.length?(this._origin=e||[0,0],this):this._origin.slice()},scene(e){return arguments.length?(this._scene=e,this):this._scene},on(){},off(){},_handlerIndex(e,t,n){for(let r=e?e.length:0;--r>=0;)if(e[r].type===t&&(!n||e[r].handler===n))return r;return-1},handlers(e){const t=this._handlers,n=[];if(e)n.push(...t[this.eventName(e)]);else for(const r in t)n.push(...t[r]);return n},eventName(e){const t=e.indexOf(".");return t<0?e:e.slice(0,t)},handleHref(e,t,n){this._loader.sanitize(n,{context:"href"}).then(r=>{const i=new MouseEvent(e.type,e),a=xa(null,"a");for(const s in r)a.setAttribute(s,r[s]);a.dispatchEvent(i)}).catch(()=>{})},handleTooltip(e,t,n){if(t&&t.tooltip!=null){t=Aj(t,e,this.canvas(),this._origin);const r=n&&t&&t.tooltip||null;this._tooltip.call(this._obj,this,e,t,r)}},getItemBoundingClientRect(e){const t=this.canvas();if(!t)return;const n=t.getBoundingClientRect(),r=this._origin,i=e.bounds,a=i.width(),s=i.height();let o=i.x1+r[0]+n.left,u=i.y1+r[1]+n.top;for(;e.mark&&(e=e.mark.group);)o+=e.x||0,u+=e.y||0;return{x:o,y:u,width:a,height:s,left:o,top:u,right:o+a,bottom:u+s}}};function jn(e){this._el=null,this._bgcolor=null,this._loader=new B4(e)}jn.prototype={initialize(e,t,n,r,i){return this._el=e,this.resize(t,n,r,i)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},background(e){return arguments.length===0?this._bgcolor:(this._bgcolor=e,this)},resize(e,t,n,r){return this._width=e,this._height=t,this._origin=n||[0,0],this._scale=r||1,this},dirty(){},render(e,t){const n=this;return n._call=function(){n._render(e,t)},n._call(),n._call=null,n},_render(){},renderAsync(e,t){const n=this.render(e,t);return this._ready?this._ready.then(()=>n):Promise.resolve(n)},_load(e,t){var n=this,r=n._loader[e](t);if(!n._ready){const i=n._call;n._ready=n._loader.ready().then(a=>{a&&i(),n._ready=null})}return r},sanitizeURL(e){return this._load("sanitizeURL",e)},loadImage(e){return this._load("loadImage",e)}};const Cj="keydown",Fj="keypress",Mj="keyup",pA="dragenter",eh="dragleave",mA="dragover",gb="pointerdown",Tj="pointerup",Bh="pointermove",_l="pointerout",bA="pointerover",pb="mousedown",Nj="mouseup",yA="mousemove",mb="mouseout",vA="mouseover",Uh="click",Dj="dblclick",Oj="wheel",xA="mousewheel",jh="touchstart",qh="touchmove",Wh="touchend",Rj=[Cj,Fj,Mj,pA,eh,mA,gb,Tj,Bh,_l,bA,pb,Nj,yA,mb,vA,Uh,Dj,Oj,xA,jh,qh,Wh],bb=Bh,Yl=_l,yb=Uh;function qa(e,t){ja.call(this,e,t),this._down=null,this._touch=null,this._first=!0,this._events={}}const Lj=e=>e===jh||e===qh||e===Wh?[jh,qh,Wh]:[e];function Uv(e,t){Lj(t).forEach(n=>Pj(e,n))}function Pj(e,t){const n=e.canvas();n&&!e._events[t]&&(e._events[t]=1,n.addEventListener(t,e[t]?r=>e[t](r):r=>e.fire(t,r)))}function il(e,t,n){t.forEach(r=>e.fire(r,n))}function jv(e,t,n){return function(r){const i=this._active,a=this.pickEvent(r);a===i?il(this,e,r):((!i||!i.exit)&&il(this,n,r),this._active=a,il(this,t,r),il(this,e,r))}}function qv(e){return function(t){il(this,e,t),this._active=null}}W(qa,ja,{initialize(e,t,n){return this._canvas=e&&r9(e,"canvas"),[Uh,pb,gb,Bh,_l,eh].forEach(r=>Uv(this,r)),ja.prototype.initialize.call(this,e,t,n)},canvas(){return this._canvas},context(){return this._canvas.getContext("2d")},events:Rj,DOMMouseScroll(e){this.fire(xA,e)},pointermove:jv([Bh,yA],[bA,vA],[_l,mb]),dragover:jv([mA],[pA],[eh]),pointerout:qv([_l,mb]),dragleave:qv([eh]),pointerdown(e){this._down=this._active,this.fire(gb,e)},mousedown(e){this._down=this._active,this.fire(pb,e)},click(e){this._down===this._active&&(this.fire(Uh,e),this._down=null)},touchstart(e){this._touch=this.pickEvent(e.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(jh,e,!0)},touchmove(e){this.fire(qh,e,!0)},touchend(e){this.fire(Wh,e,!0),this._touch=null},fire(e,t,n){const r=n?this._touch:this._active,i=this._handlers[e];if(t.vegaType=e,e===yb&&r&&r.href?this.handleHref(t,r,r.href):(e===bb||e===Yl)&&this.handleTooltip(t,r,e!==Yl),i)for(let a=0,s=i.length;a=0&&r.splice(i,1),this},pickEvent(e){const t=Ug(e,this._canvas),n=this._origin;return this.pick(this._scene,t[0],t[1],t[0]-n[0],t[1]-n[1])},pick(e,t,n,r,i){const a=this.context();return zn[e.marktype].pick.call(this,a,e,t,n,r,i)}});function Ij(){return typeof window<"u"&&window.devicePixelRatio||1}function zj(e,t,n,r,i,a){const s=typeof HTMLElement<"u"&&e instanceof HTMLElement&&e.parentNode!=null,o=e.getContext("2d"),u=s?Ij():i;e.width=t*u,e.height=n*u;for(const c in a)o[c]=a[c];return s&&u!==1&&(e.style.width=t+"px",e.style.height=n+"px"),o.pixelRatio=u,o.setTransform(u,0,0,u,u*r[0],u*r[1]),e}function Xl(e){jn.call(this,e),this._options={},this._redraw=!1,this._dirty=new nt,this._tempb=new nt}const Wv=jn.prototype,Bj=(e,t,n)=>new nt().set(0,0,t,n).translate(-e[0],-e[1]);function Uj(e,t,n){return t.expand(1).round(),e.pixelRatio%1&&t.scale(e.pixelRatio).round().scale(1/e.pixelRatio),t.translate(-(n[0]%1),-(n[1]%1)),e.beginPath(),e.rect(t.x1,t.y1,t.width(),t.height()),e.clip(),t}W(Xl,jn,{initialize(e,t,n,r,i,a){return this._options=a||{},this._canvas=this._options.externalContext?null:Ta(1,1,this._options.type),e&&this._canvas&&(Hn(e,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),Wv.initialize.call(this,e,t,n,r,i)},resize(e,t,n,r){if(Wv.resize.call(this,e,t,n,r),this._canvas)zj(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const i=this._options.externalContext;i||R("CanvasRenderer is missing a valid canvas or context"),i.scale(this._scale,this._scale),i.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this},canvas(){return this._canvas},context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)},dirty(e){const t=this._tempb.clear().union(e.bounds);let n=e.mark.group;for(;n;)t.translate(n.x||0,n.y||0),n=n.mark.group;this._dirty.union(t)},_render(e,t){const n=this.context(),r=this._origin,i=this._width,a=this._height,s=this._dirty,o=Bj(r,i,a);n.save();const u=this._redraw||s.empty()?(this._redraw=!1,o.expand(1)):Uj(n,o.intersect(s),r);return this.clear(-r[0],-r[1],i,a),this.draw(n,e,u,t),n.restore(),s.clear(),this},draw(e,t,n,r){if(t.marktype!=="group"&&r!=null&&!r.includes(t.marktype))return;const i=zn[t.marktype];t.clip&&IU(e,t),i.draw.call(this,e,t,n,r),t.clip&&e.restore()},clear(e,t,n,r){const i=this._options,a=this.context();i.type!=="pdf"&&!i.externalContext&&a.clearRect(e,t,n,r),this._bgcolor!=null&&(a.fillStyle=this._bgcolor,a.fillRect(e,t,n,r))}});function i9(e,t){ja.call(this,e,t);const n=this;n._hrefHandler=vb(n,(r,i)=>{i&&i.href&&n.handleHref(r,i,i.href)}),n._tooltipHandler=vb(n,(r,i)=>{n.handleTooltip(r,i,r.type!==Yl)})}const vb=(e,t)=>n=>{let r=n.target.__data__;r=Array.isArray(r)?r[0]:r,n.vegaType=n.type,t.call(e._obj,n,r)};W(i9,ja,{initialize(e,t,n){let r=this._svg;return r&&(r.removeEventListener(yb,this._hrefHandler),r.removeEventListener(bb,this._tooltipHandler),r.removeEventListener(Yl,this._tooltipHandler)),this._svg=r=e&&r9(e,"svg"),r&&(r.addEventListener(yb,this._hrefHandler),r.addEventListener(bb,this._tooltipHandler),r.addEventListener(Yl,this._tooltipHandler)),ja.prototype.initialize.call(this,e,t,n)},canvas(){return this._svg},on(e,t){const n=this.eventName(e),r=this._handlers;if(this._handlerIndex(r[n],e,t)<0){const a={type:e,handler:t,listener:vb(this,t)};(r[n]||(r[n]=[])).push(a),this._svg&&this._svg.addEventListener(n,a.listener)}return this},off(e,t){const n=this.eventName(e),r=this._handlers[n],i=this._handlerIndex(r,e,t);return i>=0&&(this._svg&&this._svg.removeEventListener(n,r[i].listener),r.splice(i,1)),this}});const _A="aria-hidden",a9="aria-label",s9="role",o9="aria-roledescription",wA="graphics-object",u9="graphics-symbol",EA=(e,t,n)=>({[s9]:e,[o9]:t,[a9]:n||void 0}),jj=Ar(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),Hv={axis:{desc:"axis",caption:Hj},legend:{desc:"legend",caption:Gj},"title-text":{desc:"title",caption:e=>`Title text '${Yv(e)}'`},"title-subtitle":{desc:"subtitle",caption:e=>`Subtitle text '${Yv(e)}'`}},Gv={ariaRole:s9,ariaRoleDescription:o9,description:a9};function SA(e,t){const n=t.aria===!1;if(e(_A,n||void 0),n||t.description==null)for(const r in Gv)e(Gv[r],void 0);else{const r=t.mark.marktype;e(a9,t.description),e(s9,t.ariaRole||(r==="group"?wA:u9)),e(o9,t.ariaRoleDescription||`${r} mark`)}}function $A(e){return e.aria===!1?{[_A]:!0}:jj[e.role]?null:Hv[e.role]?Wj(e,Hv[e.role]):qj(e)}function qj(e){const t=e.marktype,n=t==="group"||t==="text"||e.items.some(r=>r.description!=null&&r.aria!==!1);return EA(n?wA:u9,`${t} mark container`,e.description)}function Wj(e,t){try{const n=e.items[0],r=t.caption||(()=>"");return EA(t.role||u9,t.desc,n.description||r(n))}catch{return null}}function Yv(e){return Y(e.text).join(" ")}function Hj(e){const t=e.datum,n=e.orient,r=t.title?AA(e):null,i=e.context,a=i.scales[t.scale].value,s=i.dataflow.locale(),o=a.type;return`${n==="left"||n==="right"?"Y":"X"}-axis`+(r?` titled '${r}'`:"")+` for a ${Fu(o)?"discrete":o} scale with ${U$(s,a,e)}`}function Gj(e){const t=e.datum,n=t.title?AA(e):null,r=`${t.type||""} legend`.trim(),i=t.scales,a=Object.keys(i),s=e.context,o=s.scales[i[a[0]]].value,u=s.dataflow.locale();return Xj(r)+(n?` titled '${n}'`:"")+` for ${Yj(a)} with ${U$(u,o,e)}`}function AA(e){try{return Y(xe(e.items).items[0].text).join(" ")}catch{return null}}function Yj(e){return e=e.map(t=>t+(t==="fill"||t==="stroke"?" color":"")),e.length<2?e[0]:e.slice(0,-1).join(", ")+" and "+xe(e)}function Xj(e){return e.length?e[0].toUpperCase()+e.slice(1):e}const kA=e=>(e+"").replace(/&/g,"&").replace(//g,">"),Vj=e=>kA(e).replace(/"/g,""").replace(/\t/g," ").replace(/\n/g," ").replace(/\r/g," ");function c9(){let e="",t="",n="";const r=[],i=()=>t=n="",a=u=>{t&&(e+=`${t}>${n}`,i()),r.push(u)},s=(u,c)=>(c!=null&&(t+=` ${u}="${Vj(c)}"`),o),o={open(u){a(u),t="<"+u;for(var c=arguments.length,l=new Array(c>1?c-1:0),f=1;f${n}`:"/>"):e+=``,i(),o},attr:s,text:u=>(n+=kA(u),o),toString:()=>e};return o}const CA=e=>FA(c9(),e)+"";function FA(e,t){if(e.open(t.tagName),t.hasAttributes()){const n=t.attributes,r=n.length;for(let i=0;i{c.dirty=t})),!r.zdirty){if(n.exit){a.nested&&r.items.length?(u=r.items[0],u._svg&&this._update(a,u._svg,u)):n._svg&&(u=n._svg.parentNode,u&&u.removeChild(n._svg)),n._svg=null;continue}n=a.nested?r.items[0]:n,n._update!==t&&(!n._svg||!n._svg.ownerSVGElement?(this._dirtyAll=!1,Vv(n,t)):this._update(a,n._svg,n),n._update=t)}return!this._dirtyAll},mark(e,t,n,r){if(!this.isDirty(t))return t._svg;const i=this._svg,a=t.marktype,s=zn[a],o=t.interactive===!1?"none":null,u=s.tag==="g",c=Kv(t,e,n,"g",i);if(a!=="group"&&r!=null&&!r.includes(a))return Hn(c,0),t._svg;c.setAttribute("class",gA(t));const l=$A(t);for(const g in l)Vt(c,g,l[g]);u||Vt(c,"pointer-events",o),Vt(c,"clip-path",t.clip?z4(this,t,t.group):null);let f=null,d=0;const h=g=>{const p=this.isDirty(g),m=Kv(g,c,f,s.tag,i);p&&(this._update(s,m,g),u&&Qj(this,m,g,r)),f=m,++d};return s.nested?t.items.length&&h(t.items[0]):Cr(t,h),Hn(c,d),c},_update(e,t,n){Bi=t,Rt=t.__values__,SA(wl,n),e.attr(wl,n,this);const r=eq[e.type];r&&r.call(this,e,t,n),Bi&&this.style(Bi,n)},style(e,t){if(t!=null){for(const n in Hh){let r=n==="font"?Of(t):t[n];if(r===Rt[n])continue;const i=Hh[n];r==null?e.removeAttribute(i):(L4(r)&&(r=q$(r,this._defs.gradient,TA())),e.setAttribute(i,r+"")),Rt[n]=r}for(const n in Gh)th(e,Gh[n],t[n])}},defs(){const e=this._svg,t=this._defs;let n=t.el,r=0;for(const i in t.gradient)n||(t.el=n=it(e,Oc+1,"defs",rt)),r=Kj(n,t.gradient[i],r);for(const i in t.clipping)n||(t.el=n=it(e,Oc+1,"defs",rt)),r=Jj(n,t.clipping[i],r);n&&(r===0?(e.removeChild(n),t.el=null):Hn(n,r))},_clearDefs(){const e=this._defs;e.gradient={},e.clipping={}}});function Vv(e,t){for(;e&&e.dirty!==t;e=e.mark.group)if(e.dirty=t,e.mark&&e.mark.dirty!==t)e.mark.dirty=t;else return}function Kj(e,t,n){let r,i,a;if(t.gradient==="radial"){let s=it(e,n++,"pattern",rt);_a(s,{id:Lh+t.id,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),s=it(s,0,"rect",rt),_a(s,{width:1,height:1,fill:`url(${TA()}#${t.id})`}),e=it(e,n++,"radialGradient",rt),_a(e,{id:t.id,fx:t.x1,fy:t.y1,fr:t.r1,cx:t.x2,cy:t.y2,r:t.r2})}else e=it(e,n++,"linearGradient",rt),_a(e,{id:t.id,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2});for(r=0,i=t.stops.length;r{i=e.mark(t,s,i,r),++a}),Hn(t,1+a)}function Kv(e,t,n,r,i){let a=e._svg,s;if(!a&&(s=t.ownerDocument,a=xa(s,r,rt),e._svg=a,e.mark&&(a.__data__=e,a.__values__={fill:"default"},r==="g"))){const o=xa(s,"path",rt);a.appendChild(o),o.__data__=e;const u=xa(s,"g",rt);a.appendChild(u),u.__data__=e;const c=xa(s,"path",rt);a.appendChild(c),c.__data__=e,c.__values__={fill:"default"}}return(a.ownerSVGElement!==i||Zj(a,n))&&t.insertBefore(a,n?n.nextSibling:t.firstChild),a}function Zj(e,t){return e.parentNode&&e.parentNode.childNodes.length>1&&e.previousSibling!=t}let Bi=null,Rt=null;const eq={group(e,t,n){const r=Bi=t.childNodes[2];Rt=r.__values__,e.foreground(wl,n,this),Rt=t.__values__,Bi=t.childNodes[1],e.content(wl,n,this);const i=Bi=t.childNodes[0];e.background(wl,n,this);const a=n.mark.interactive===!1?"none":null;if(a!==Rt.events&&(Vt(r,"pointer-events",a),Vt(i,"pointer-events",a),Rt.events=a),n.strokeForeground&&n.stroke){const s=n.fill;Vt(r,"display",null),this.style(i,n),Vt(i,"stroke",null),s&&(n.fill=null),Rt=r.__values__,this.style(r,n),s&&(n.fill=s),Bi=null}else Vt(r,"display","none")},image(e,t,n){n.smooth===!1?(th(t,"image-rendering","optimizeSpeed"),th(t,"image-rendering","pixelated")):th(t,"image-rendering",null)},text(e,t,n){const r=Df(n);let i,a,s,o;P(r)?(a=r.map(u=>Ua(n,u)),i=a.join(` -`),i!==Rt.text&&(Hn(t,0),s=t.ownerDocument,o=Ba(n),a.forEach((u,c)=>{const l=xa(s,"tspan",rt);l.__data__=n,l.textContent=u,c&&(l.setAttribute("x",0),l.setAttribute("dy",o)),t.appendChild(l)}),Rt.text=i)):(a=Ua(n,r),a!==Rt.text&&(t.textContent=a,Rt.text=a)),Vt(t,"font-family",Of(n)),Vt(t,"font-size",gi(n)+"px"),Vt(t,"font-style",n.fontStyle),Vt(t,"font-variant",n.fontVariant),Vt(t,"font-weight",n.fontWeight)}};function wl(e,t,n){t!==Rt[e]&&(n?tq(Bi,e,t,n):Vt(Bi,e,t),Rt[e]=t)}function th(e,t,n){n!==Rt[t]&&(n==null?e.style.removeProperty(t):e.style.setProperty(t,n+""),Rt[t]=n)}function _a(e,t){for(const n in t)Vt(e,n,t[n])}function Vt(e,t,n){n!=null?e.setAttribute(t,n):e.removeAttribute(t)}function tq(e,t,n,r){n!=null?e.setAttributeNS(r,t,n):e.removeAttributeNS(r,t)}function TA(){let e;return typeof window>"u"?"":(e=window.location).hash?e.href.slice(0,-e.hash.length):e.href}function l9(e){jn.call(this,e),this._text=null,this._defs={gradient:{},clipping:{}}}W(l9,jn,{svg(){return this._text},_render(e){const t=c9();t.open("svg",ce({},Gl,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const n=this._bgcolor;return n&&n!=="transparent"&&n!=="none"&&t.open("rect",{width:this._width,height:this._height,fill:n}).close(),t.open("g",MA,{transform:"translate("+this._origin+")"}),this.mark(t,e),t.close(),this.defs(t),this._text=t.close()+"",this},mark(e,t){const n=zn[t.marktype],r=n.tag,i=[SA,n.attr];e.open("g",{class:gA(t),"clip-path":t.clip?z4(this,t,t.group):null},$A(t),{"pointer-events":r!=="g"&&t.interactive===!1?"none":null});const a=s=>{const o=this.href(s);if(o&&e.open("a",o),e.open(r,this.attr(t,s,i,r!=="g"?r:null)),r==="text"){const u=Df(s);if(P(u)){const c={x:0,dy:Ba(s)};for(let l=0;lthis.mark(e,f)),e.close(),u&&l?(c&&(s.fill=null),s.stroke=l,e.open("path",this.attr(t,s,n.foreground,"bgrect")).close(),c&&(s.fill=c)):e.open("path",this.attr(t,s,n.foreground,"bgfore")).close()}e.close(),o&&e.close()};return n.nested?t.items&&t.items.length&&a(t.items[0]):Cr(t,a),e.close()},href(e){const t=e.href;let n;if(t){if(n=this._hrefs&&this._hrefs[t])return n;this.sanitizeURL(t).then(r=>{r["xlink:href"]=r.href,r.href=null,(this._hrefs||(this._hrefs={}))[t]=r})}return null},attr(e,t,n,r){const i={},a=(s,o,u,c)=>{i[c||s]=o};return Array.isArray(n)?n.forEach(s=>s(a,t,this)):n(a,t,this),r&&nq(i,t,e,r,this._defs),i},defs(e){const t=this._defs.gradient,n=this._defs.clipping;if(Object.keys(t).length+Object.keys(n).length!==0){e.open("defs");for(const i in t){const a=t[i],s=a.stops;a.gradient==="radial"?(e.open("pattern",{id:Lh+i,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),e.open("rect",{width:"1",height:"1",fill:"url(#"+i+")"}).close(),e.close(),e.open("radialGradient",{id:i,fx:a.x1,fy:a.y1,fr:a.r1,cx:a.x2,cy:a.y2,r:a.r2})):e.open("linearGradient",{id:i,x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2});for(let o=0;o!hr.svgMarkTypes.includes(i));this._svgRenderer.render(e,hr.svgMarkTypes),this._canvasRenderer.render(e,r)},resize(e,t,n,r){return Jv.resize.call(this,e,t,n,r),this._svgRenderer.resize(e,t,n,r),this._canvasRenderer.resize(e,t,n,r),this},background(e){return hr.svgOnTop?this._canvasRenderer.background(e):this._svgRenderer.background(e),this}});function f9(e,t){qa.call(this,e,t)}W(f9,qa,{initialize(e,t,n){const r=it(it(e,0,"div"),hr.svgOnTop?0:1,"div");return qa.prototype.initialize.call(this,r,t,n)}});const NA="canvas",DA="hybrid",OA="png",RA="svg",LA="none",wa={Canvas:NA,PNG:OA,SVG:RA,Hybrid:DA,None:LA},to={};to[NA]=to[OA]={renderer:Xl,headless:Xl,handler:qa};to[RA]={renderer:jg,headless:l9,handler:i9};to[DA]={renderer:Yh,headless:Yh,handler:f9};to[LA]={};function qg(e,t){return e=String(e||"").toLowerCase(),arguments.length>1?(to[e]=t,this):to[e]}function PA(e,t,n){const r=[],i=new nt().union(t),a=e.marktype;return a?IA(e,i,n,r):a==="group"?zA(e,i,n,r):R("Intersect scene must be mark node or group item.")}function IA(e,t,n,r){if(iq(e,t,n)){const i=e.items,a=e.marktype,s=i.length;let o=0;if(a==="group")for(;o=0;a--)if(n[a]!=r[a])return!1;for(a=n.length-1;a>=0;a--)if(i=n[a],!d9(e[i],t[i],i))return!1;return typeof e==typeof t}function oq(){K$(),TB()}const Du="top",yr="left",vr="right",Wa="bottom",uq="top-left",cq="top-right",lq="bottom-left",fq="bottom-right",h9="start",xb="middle",Kt="end",dq="x",hq="y",Wg="group",g9="axis",p9="title",gq="frame",pq="scope",m9="legend",qA="row-header",WA="row-footer",HA="row-title",GA="column-header",YA="column-footer",XA="column-title",mq="padding",bq="symbol",VA="fit",KA="fit-x",JA="fit-y",yq="pad",b9="none",pd="all",_b="each",y9="flush",Ea="column",Sa="row";function QA(e){N.call(this,null,e)}W(QA,N,{transform(e,t){const n=t.dataflow,r=e.mark,i=r.marktype,a=zn[i],s=a.bound;let o=r.bounds,u;if(a.nested)r.items.length&&n.dirty(r.items[0]),o=md(r,s),r.items.forEach(c=>{c.bounds.clear().union(o)});else if(i===Wg||e.modified())switch(t.visit(t.MOD,c=>n.dirty(c)),o.clear(),r.items.forEach(c=>o.union(md(c,s))),r.role){case g9:case m9:case p9:t.reflow()}else u=t.changed(t.REM),t.visit(t.ADD,c=>{o.union(md(c,s))}),t.visit(t.MOD,c=>{u=u||o.alignsWith(c.bounds),n.dirty(c),o.union(md(c,s))}),u&&(o.clear(),r.items.forEach(c=>o.union(c.bounds)));return UA(r),t.modifies("bounds")}});function md(e,t,n){return t(e.bounds.clear(),e,n)}const Qv=":vega_identifier:";function v9(e){N.call(this,0,e)}v9.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]};W(v9,N,{transform(e,t){const n=vq(t.dataflow),r=e.as;let i=n.value;return t.visit(t.ADD,a=>a[r]=a[r]||++i),n.set(this.value=i),t}});function vq(e){return e._signals[Qv]||(e._signals[Qv]=e.add(0))}function ZA(e){N.call(this,null,e)}W(ZA,N,{transform(e,t){let n=this.value;n||(n=t.dataflow.scenegraph().mark(e.markdef,xq(e),e.index),n.group.context=e.context,e.context.group||(e.context.group=n.group),n.source=this.source,n.clip=e.clip,n.interactive=e.interactive,this.value=n);const r=n.marktype===Wg?Og:Dg;return t.visit(t.ADD,i=>r.call(i,n)),(e.modified("clip")||e.modified("interactive"))&&(n.clip=e.clip,n.interactive=!!e.interactive,n.zdirty=!0,t.reflow()),n.items=t.source,t}});function xq(e){const t=e.groups,n=e.parent;return t&&t.size===1?t.get(Object.keys(t.object)[0]):t&&n?t.lookup(n):null}function ek(e){N.call(this,null,e)}const Zv={parity:e=>e.filter((t,n)=>n%2?t.opacity=0:1),greedy:(e,t)=>{let n;return e.filter((r,i)=>!i||!tk(n.bounds,r.bounds,t)?(n=r,1):r.opacity=0)}},tk=(e,t,n)=>n>Math.max(t.x1-e.x2,e.x1-t.x2,t.y1-e.y2,e.y1-t.y2),e3=(e,t)=>{for(var n=1,r=e.length,i=e[0].bounds,a;n{const t=e.bounds;return t.width()>1&&t.height()>1},wq=(e,t,n)=>{var r=e.range(),i=new nt;return t===Du||t===Wa?i.set(r[0],-1/0,r[1],1/0):i.set(-1/0,r[0],1/0,r[1]),i.expand(n||1),a=>i.encloses(a.bounds)},t3=e=>(e.forEach(t=>t.opacity=1),e),n3=(e,t)=>e.reflow(t.modified()).modifies("opacity");W(ek,N,{transform(e,t){const n=Zv[e.method]||Zv.parity,r=e.separation||0;let i=t.materialize(t.SOURCE).source,a,s;if(!i||!i.length)return;if(!e.method)return e.modified("method")&&(t3(i),t=n3(t,e)),t;if(i=i.filter(_q),!i.length)return;if(e.sort&&(i=i.slice().sort(e.sort)),a=t3(i),t=n3(t,e),a.length>=3&&e3(a,r)){do a=n(a,r);while(a.length>=3&&e3(a,r));a.length<3&&!xe(i).opacity&&(a.length>1&&(xe(a).opacity=0),xe(i).opacity=1)}e.boundScale&&e.boundTolerance>=0&&(s=wq(e.boundScale,e.boundOrient,+e.boundTolerance),i.forEach(u=>{s(u)||(u.opacity=0)}));const o=a[0].mark.bounds.clear();return i.forEach(u=>{u.opacity&&o.union(u.bounds)}),t}});function nk(e){N.call(this,null,e)}W(nk,N,{transform(e,t){const n=t.dataflow;if(t.visit(t.ALL,r=>n.dirty(r)),t.fields&&t.fields.zindex){const r=t.source&&t.source[0];r&&(r.mark.zdirty=!0)}}});const Ot=new nt;function iu(e,t,n){return e[t]===n?0:(e[t]=n,1)}function Eq(e){var t=e.items[0].orient;return t===yr||t===vr}function Sq(e){let t=+e.grid;return[e.ticks?t++:-1,e.labels?t++:-1,t+ +e.domain]}function $q(e,t,n,r){var i=t.items[0],a=i.datum,s=i.translate!=null?i.translate:.5,o=i.orient,u=Sq(a),c=i.range,l=i.offset,f=i.position,d=i.minExtent,h=i.maxExtent,g=a.title&&i.items[u[2]].items[0],p=i.titlePadding,m=i.bounds,b=g&&Z4(g),y=0,v=0,x,_;switch(Ot.clear().union(m),m.clear(),(x=u[0])>-1&&m.union(i.items[x].bounds),(x=u[1])>-1&&m.union(i.items[x].bounds),o){case Du:y=f||0,v=-l,_=Math.max(d,Math.min(h,-m.y1)),m.add(0,-_).add(c,0),g&&bd(e,g,_,p,b,0,-1,m);break;case yr:y=-l,v=f||0,_=Math.max(d,Math.min(h,-m.x1)),m.add(-_,0).add(0,c),g&&bd(e,g,_,p,b,1,-1,m);break;case vr:y=n+l,v=f||0,_=Math.max(d,Math.min(h,m.x2)),m.add(0,0).add(_,c),g&&bd(e,g,_,p,b,1,1,m);break;case Wa:y=f||0,v=r+l,_=Math.max(d,Math.min(h,m.y2)),m.add(0,0).add(c,_),g&&bd(e,g,_,p,0,0,1,m);break;default:y=i.x,v=i.y}return ea(m.translate(y,v),i),iu(i,"x",y+s)|iu(i,"y",v+s)&&(i.bounds=Ot,e.dirty(i),i.bounds=m,e.dirty(i)),i.mark.bounds.clear().union(m)}function bd(e,t,n,r,i,a,s,o){const u=t.bounds;if(t.auto){const c=s*(n+i+r);let l=0,f=0;e.dirty(t),a?l=(t.x||0)-(t.x=c):f=(t.y||0)-(t.y=c),t.mark.bounds.clear().union(u.translate(-l,-f)),e.dirty(t)}o.union(u)}const r3=(e,t)=>Math.floor(Math.min(e,t)),i3=(e,t)=>Math.ceil(Math.max(e,t));function Aq(e){var t=e.items,n=t.length,r=0,i,a;const s={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;r1)for(w=0;w0&&(v[w]+=M/2);if(o&&qe(n.center,Sa)&&l!==1)for(w=0;w0&&(x[w]+=C/2);for(w=0;wi&&(e.warn("Grid headers exceed limit: "+i),t=t.slice(0,i)),p+=a,y=0,x=t.length;y=0&&(w=n[v])==null;v-=d);o?(S=h==null?w.x:Math.round(w.bounds.x1+h*w.bounds.width()),$=p):(S=p,$=h==null?w.y:Math.round(w.bounds.y1+h*w.bounds.height())),_.union(E.bounds.translate(S-(E.x||0),$-(E.y||0))),E.x=S,E.y=$,e.dirty(E),m=s(m,_[c])}return m}function s3(e,t,n,r,i,a){if(t){e.dirty(t);var s=n,o=n;r?s=Math.round(i.x1+a*i.width()):o=Math.round(i.y1+a*i.height()),t.bounds.translate(s-(t.x||0),o-(t.y||0)),t.mark.bounds.clear().union(t.bounds),t.x=s,t.y=o,e.dirty(t)}}function Nq(e,t){const n=e[t]||{};return(r,i)=>n[r]!=null?n[r]:e[r]!=null?e[r]:i}function Dq(e,t){let n=-1/0;return e.forEach(r=>{r.offset!=null&&(n=Math.max(n,r.offset))}),n>-1/0?n:t}function Oq(e,t,n,r,i,a,s){const o=Nq(n,t),u=Dq(e,o("offset",0)),c=o("anchor",h9),l=c===Kt?1:c===xb?.5:0,f={align:_b,bounds:o("bounds",y9),columns:o("direction")==="vertical"?1:e.length,padding:o("margin",8),center:o("center"),nodirty:!0};switch(t){case yr:f.anchor={x:Math.floor(r.x1)-u,column:Kt,y:l*(s||r.height()+2*r.y1),row:c};break;case vr:f.anchor={x:Math.ceil(r.x2)+u,y:l*(s||r.height()+2*r.y1),row:c};break;case Du:f.anchor={y:Math.floor(i.y1)-u,row:Kt,x:l*(a||i.width()+2*i.x1),column:c};break;case Wa:f.anchor={y:Math.ceil(i.y2)+u,x:l*(a||i.width()+2*i.x1),column:c};break;case uq:f.anchor={x:u,y:u};break;case cq:f.anchor={x:a-u,y:u,column:Kt};break;case lq:f.anchor={x:u,y:s-u,row:Kt};break;case fq:f.anchor={x:a-u,y:s-u,column:Kt,row:Kt};break}return f}function Rq(e,t){var n=t.items[0],r=n.datum,i=n.orient,a=n.bounds,s=n.x,o=n.y,u,c;return n._bounds?n._bounds.clear().union(a):n._bounds=a.clone(),a.clear(),Pq(e,n,n.items[0].items[0]),a=Lq(n,a),u=2*n.padding,c=2*n.padding,a.empty()||(u=Math.ceil(a.width()+u),c=Math.ceil(a.height()+c)),r.type===bq&&Iq(n.items[0].items[0].items[0].items),i!==b9&&(n.x=s=0,n.y=o=0),n.width=u,n.height=c,ea(a.set(s,o,s+u,o+c),n),n.mark.bounds.clear().union(a),n}function Lq(e,t){return e.items.forEach(n=>t.union(n.bounds)),t.x1=e.padding,t.y1=e.padding,t}function Pq(e,t,n){var r=t.padding,i=r-n.x,a=r-n.y;if(!t.datum.title)(i||a)&&Rc(e,n,i,a);else{var s=t.items[1].items[0],o=s.anchor,u=t.titlePadding||0,c=r-s.x,l=r-s.y;switch(s.orient){case yr:i+=Math.ceil(s.bounds.width())+u;break;case vr:case Wa:break;default:a+=s.bounds.height()+u}switch((i||a)&&Rc(e,n,i,a),s.orient){case yr:l+=jo(t,n,s,o,1,1);break;case vr:c+=jo(t,n,s,Kt,0,0)+u,l+=jo(t,n,s,o,1,1);break;case Wa:c+=jo(t,n,s,o,0,0),l+=jo(t,n,s,Kt,-1,0,1)+u;break;default:c+=jo(t,n,s,o,0,0)}(c||l)&&Rc(e,s,c,l),(c=Math.round(s.bounds.x1-r))<0&&(Rc(e,n,-c,0),Rc(e,s,-c,0))}}function jo(e,t,n,r,i,a,s){const o=e.datum.type!=="symbol",u=n.datum.vgrad,c=o&&(a||!u)&&!s?t.items[0]:t,l=c.bounds[i?"y2":"x2"]-e.padding,f=u&&a?l:0,d=u&&a?0:l,h=i<=0?0:Z4(n);return Math.round(r===h9?f:r===Kt?d-h:.5*(l-h))}function Rc(e,t,n,r){t.x+=n,t.y+=r,t.bounds.translate(n,r),t.mark.bounds.translate(n,r),e.dirty(t)}function Iq(e){const t=e.reduce((n,r)=>(n[r.column]=Math.max(r.bounds.x2-r.x,n[r.column]||0),n),{});e.forEach(n=>{n.width=t[n.column],n.height=n.bounds.y2-n.y})}function zq(e,t,n,r,i){var a=t.items[0],s=a.frame,o=a.orient,u=a.anchor,c=a.offset,l=a.padding,f=a.items[0].items[0],d=a.items[1]&&a.items[1].items[0],h=o===yr||o===vr?r:n,g=0,p=0,m=0,b=0,y=0,v;if(s!==Wg?o===yr?(g=i.y2,h=i.y1):o===vr?(g=i.y1,h=i.y2):(g=i.x1,h=i.x2):o===yr&&(g=r,h=0),v=u===h9?g:u===Kt?h:(g+h)/2,d&&d.text){switch(o){case Du:case Wa:y=f.bounds.height()+l;break;case yr:b=f.bounds.width()+l;break;case vr:b=-f.bounds.width()-l;break}Ot.clear().union(d.bounds),Ot.translate(b-(d.x||0),y-(d.y||0)),iu(d,"x",b)|iu(d,"y",y)&&(e.dirty(d),d.bounds.clear().union(Ot),d.mark.bounds.clear().union(Ot),e.dirty(d)),Ot.clear().union(d.bounds)}else Ot.clear();switch(Ot.union(f.bounds),o){case Du:p=v,m=i.y1-Ot.height()-c;break;case yr:p=i.x1-Ot.width()-c,m=v;break;case vr:p=i.x2+Ot.width()+c,m=v;break;case Wa:p=v,m=i.y2+c;break;default:p=a.x,m=a.y}return iu(a,"x",p)|iu(a,"y",m)&&(Ot.translate(p,m),e.dirty(a),a.bounds.clear().union(Ot),t.bounds.clear().union(Ot),e.dirty(a)),a.bounds}function ik(e){N.call(this,null,e)}W(ik,N,{transform(e,t){const n=t.dataflow;return e.mark.items.forEach(r=>{e.layout&&Fq(n,r,e.layout),Uq(n,r,e)}),Bq(e.mark.group)?t.reflow():t}});function Bq(e){return e&&e.mark.role!=="legend-entry"}function Uq(e,t,n){var r=t.items,i=Math.max(0,t.width||0),a=Math.max(0,t.height||0),s=new nt().set(0,0,i,a),o=s.clone(),u=s.clone(),c=[],l,f,d,h,g,p;for(g=0,p=r.length;g{d=b.orient||vr,d!==b9&&(m[d]||(m[d]=[])).push(b)});for(const b in m){const y=m[b];rk(e,y,Oq(y,b,n.legends,o,u,i,a))}c.forEach(b=>{const y=b.bounds;if(y.equals(b._bounds)||(b.bounds=b._bounds,e.dirty(b),b.bounds=y,e.dirty(b)),n.autosize&&(n.autosize.type===VA||n.autosize.type===KA||n.autosize.type===JA))switch(b.orient){case yr:case vr:s.add(y.x1,0).add(y.x2,0);break;case Du:case Wa:s.add(0,y.y1).add(0,y.y2)}else s.union(y)})}s.union(o).union(u),l&&s.union(zq(e,l,i,a,s)),t.clip&&s.set(0,0,t.width||0,t.height||0),jq(e,t,s,n)}function jq(e,t,n,r){const i=r.autosize||{},a=i.type;if(e._autosize<1||!a)return;let s=e._width,o=e._height,u=Math.max(0,t.width||0),c=Math.max(0,Math.ceil(-n.x1)),l=Math.max(0,t.height||0),f=Math.max(0,Math.ceil(-n.y1));const d=Math.max(0,Math.ceil(n.x2-u)),h=Math.max(0,Math.ceil(n.y2-l));if(i.contains===mq){const g=e.padding();s-=g.left+g.right,o-=g.top+g.bottom}a===b9?(c=0,f=0,u=s,l=o):a===VA?(u=Math.max(0,s-c-d),l=Math.max(0,o-f-h)):a===KA?(u=Math.max(0,s-c-d),o=l+f+h):a===JA?(s=u+c+d,l=Math.max(0,o-f-h)):a===yq&&(s=u+c+d,o=l+f+h),e._resizeView(s,o,u,l,[c,f],i.resize)}const qq=Object.freeze(Object.defineProperty({__proto__:null,bound:QA,identifier:v9,mark:ZA,overlap:ek,render:nk,viewlayout:ik},Symbol.toStringTag,{value:"Module"}));function ak(e){N.call(this,null,e)}W(ak,N,{transform(e,t){if(this.value&&!e.modified())return t.StopPropagation;var n=t.dataflow.locale(),r=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=this.value,a=e.scale,s=e.count==null?e.values?e.values.length:10:e.count,o=O4(a,s,e.minstep),u=e.format||L$(n,a,o,e.formatSpecifier,e.formatType,!!e.values),c=e.values?R$(a,e.values,o):R4(a,o);return i&&(r.rem=i),i=c.map((l,f)=>Me({index:f/(c.length-1||1),value:l,label:u(l)})),e.extra&&i.length&&i.push(Me({index:-1,extra:{value:i[0].value},label:""})),r.source=i,r.add=i,this.value=i,r}});function sk(e){N.call(this,null,e)}function Wq(){return Me({})}function Hq(e){const t=nc().test(n=>n.exit);return t.lookup=n=>t.get(e(n)),t}W(sk,N,{transform(e,t){var n=t.dataflow,r=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=e.item||Wq,a=e.key||ne,s=this.value;return P(r.encode)&&(r.encode=null),s&&(e.modified("key")||t.modified(a))&&R("DataJoin does not support modified key function or fields."),s||(t=t.addAll(),this.value=s=Hq(a)),t.visit(t.ADD,o=>{const u=a(o);let c=s.get(u);c?c.exit?(s.empty--,r.add.push(c)):r.mod.push(c):(c=i(o),s.set(u,c),r.add.push(c)),c.datum=o,c.exit=!1}),t.visit(t.MOD,o=>{const u=a(o),c=s.get(u);c&&(c.datum=o,r.mod.push(c))}),t.visit(t.REM,o=>{const u=a(o),c=s.get(u);o===c.datum&&!c.exit&&(r.rem.push(c),c.exit=!0,++s.empty)}),t.changed(t.ADD_MOD)&&r.modifies("datum"),(t.clean()||e.clean&&s.empty>n.cleanThreshold)&&n.runAfter(s.clean),r}});function ok(e){N.call(this,null,e)}W(ok,N,{transform(e,t){var n=t.fork(t.ADD_REM),r=e.mod||!1,i=e.encoders,a=t.encode;if(P(a))if(n.changed()||a.every(f=>i[f]))a=a[0],n.encode=null;else return t.StopPropagation;var s=a==="enter",o=i.update||la,u=i.enter||la,c=i.exit||la,l=(a&&!s?i[a]:o)||la;if(t.changed(t.ADD)&&(t.visit(t.ADD,f=>{u(f,e),o(f,e)}),n.modifies(u.output),n.modifies(o.output),l!==la&&l!==o&&(t.visit(t.ADD,f=>{l(f,e)}),n.modifies(l.output))),t.changed(t.REM)&&c!==la&&(t.visit(t.REM,f=>{c(f,e)}),n.modifies(c.output)),s||l!==la){const f=t.MOD|(e.modified()?t.REFLOW:0);s?(t.visit(f,d=>{const h=u(d,e)||r;(l(d,e)||h)&&n.mod.push(d)}),n.mod.length&&n.modifies(u.output)):t.visit(f,d=>{(l(d,e)||r)&&n.mod.push(d)}),n.mod.length&&n.modifies(l.output)}return n.changed()?n:t.StopPropagation}});function uk(e){N.call(this,[],e)}W(uk,N,{transform(e,t){if(this.value!=null&&!e.modified())return t.StopPropagation;var n=t.dataflow.locale(),r=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=this.value,a=e.type||Xd,s=e.scale,o=+e.limit,u=O4(s,e.count==null?5:e.count,e.minstep),c=!!e.values||a===Xd,l=e.format||B$(n,s,u,a,e.formatSpecifier,e.formatType,c),f=e.values||z$(s,u),d,h,g,p,m;return i&&(r.rem=i),a===Xd?(o&&f.length>o?(t.dataflow.warn("Symbol legend count exceeds limit, filtering items."),i=f.slice(0,o-1),m=!0):i=f,le(g=e.size)?(!e.values&&s(i[0])===0&&(i=i.slice(1)),p=i.reduce((b,y)=>Math.max(b,g(y,e)),0)):g=Ht(p=g||8),i=i.map((b,y)=>Me({index:y,label:l(b,y,i),value:b,offset:p,size:g(b,e)})),m&&(m=f[i.length],i.push(Me({index:i.length,label:`…${f.length-i.length} entries`,value:m,offset:p,size:g(m,e)})))):a===yB?(d=s.domain(),h=N$(s,d[0],xe(d)),f.length<3&&!e.values&&d[0]!==xe(d)&&(f=[d[0],xe(d)]),i=f.map((b,y)=>Me({index:y,label:l(b,y,f),value:b,perc:h(b)}))):(g=f.length-1,h=FB(s),i=f.map((b,y)=>Me({index:y,label:l(b,y,f),value:b,perc:y?h(b):0,perc2:y===g?1:h(f[y+1])}))),r.source=i,r.add=i,this.value=i,r}});const Gq=e=>e.source.x,Yq=e=>e.source.y,Xq=e=>e.target.x,Vq=e=>e.target.y;function x9(e){N.call(this,{},e)}x9.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]};W(x9,N,{transform(e,t){var n=e.sourceX||Gq,r=e.sourceY||Yq,i=e.targetX||Xq,a=e.targetY||Vq,s=e.as||"path",o=e.orient||"vertical",u=e.shape||"line",c=o3.get(u+"-"+o)||o3.get(u);return c||R("LinkPath unsupported type: "+e.shape+(e.orient?"-"+e.orient:"")),t.visit(t.SOURCE,l=>{l[s]=c(n(l),r(l),i(l),a(l))}),t.reflow(e.modified()).modifies(s)}});const ck=(e,t,n,r)=>"M"+e+","+t+"L"+n+","+r,Kq=(e,t,n,r)=>ck(t*Math.cos(e),t*Math.sin(e),r*Math.cos(n),r*Math.sin(n)),lk=(e,t,n,r)=>{var i=n-e,a=r-t,s=Math.hypot(i,a)/2,o=180*Math.atan2(a,i)/Math.PI;return"M"+e+","+t+"A"+s+","+s+" "+o+" 0 1 "+n+","+r},Jq=(e,t,n,r)=>lk(t*Math.cos(e),t*Math.sin(e),r*Math.cos(n),r*Math.sin(n)),fk=(e,t,n,r)=>{const i=n-e,a=r-t,s=.2*(i+a),o=.2*(a-i);return"M"+e+","+t+"C"+(e+s)+","+(t+o)+" "+(n+o)+","+(r-s)+" "+n+","+r},Qq=(e,t,n,r)=>fk(t*Math.cos(e),t*Math.sin(e),r*Math.cos(n),r*Math.sin(n)),Zq=(e,t,n,r)=>"M"+e+","+t+"V"+r+"H"+n,eW=(e,t,n,r)=>"M"+e+","+t+"H"+n+"V"+r,tW=(e,t,n,r)=>{const i=Math.cos(e),a=Math.sin(e),s=Math.cos(n),o=Math.sin(n),u=Math.abs(n-e)>Math.PI?n<=e:n>e;return"M"+t*i+","+t*a+"A"+t+","+t+" 0 0,"+(u?1:0)+" "+t*s+","+t*o+"L"+r*s+","+r*o},nW=(e,t,n,r)=>{const i=(e+n)/2;return"M"+e+","+t+"C"+i+","+t+" "+i+","+r+" "+n+","+r},rW=(e,t,n,r)=>{const i=(t+r)/2;return"M"+e+","+t+"C"+e+","+i+" "+n+","+i+" "+n+","+r},iW=(e,t,n,r)=>{const i=Math.cos(e),a=Math.sin(e),s=Math.cos(n),o=Math.sin(n),u=(t+r)/2;return"M"+t*i+","+t*a+"C"+u*i+","+u*a+" "+u*s+","+u*o+" "+r*s+","+r*o},o3=nc({line:ck,"line-radial":Kq,arc:lk,"arc-radial":Jq,curve:fk,"curve-radial":Qq,"orthogonal-horizontal":Zq,"orthogonal-vertical":eW,"orthogonal-radial":tW,"diagonal-horizontal":nW,"diagonal-vertical":rW,"diagonal-radial":iW});function _9(e){N.call(this,null,e)}_9.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]};W(_9,N,{transform(e,t){var n=e.as||["startAngle","endAngle"],r=n[0],i=n[1],a=e.field||Zu,s=e.startAngle||0,o=e.endAngle!=null?e.endAngle:2*Math.PI,u=t.source,c=u.map(a),l=c.length,f=s,d=(o-s)/Fw(c),h=Nn(l),g,p,m;for(e.sort&&h.sort((b,y)=>c[b]-c[y]),g=0;g-1)return r;var i=t.domain,a=e.type,s=t.zero||t.zero===void 0&&sW(e),o,u;if(!i)return 0;if(dk(a)&&t.padding&&i[0]!==xe(i)&&(i=dW(a,i,t.range,t.padding,t.exponent,t.constant)),(s||t.domainMin!=null||t.domainMax!=null||t.domainMid!=null)&&(o=(i=i.slice()).length-1||1,s&&(i[0]>0&&(i[0]=0),i[o]<0&&(i[o]=0)),t.domainMin!=null&&(i[0]=t.domainMin),t.domainMax!=null&&(i[o]=t.domainMax),t.domainMid!=null)){u=t.domainMid;const c=u>i[o]?o+1:ui+(a<0?-1:a>0?1:0),0));r!==t.length&&n.warn("Log scale domain includes zero: "+H(t))}return t}function hW(e,t,n){let r=t.bins;if(r&&!P(r)){const i=e.domain(),a=i[0],s=xe(i),o=r.step;let u=r.start==null?a:r.start,c=r.stop==null?s:r.stop;o||R("Scale bins parameter missing step property."),us&&(c=o*Math.floor(s/o)),r=Nn(u,c+o/2,o)}return r?e.bins=r:e.bins&&delete e.bins,e.type===C4&&(r?!t.domain&&!t.domainRaw&&(e.domain(r),n=r.length):e.bins=e.domain()),n}function gW(e,t,n){var r=e.type,i=t.round||!1,a=t.range;if(t.rangeStep!=null)a=pW(r,t,n);else if(t.scheme&&(a=mW(r,t,n),le(a))){if(e.interpolator)return e.interpolator(a);R(`Scale type ${r} does not support interpolating color schemes.`)}if(a&&C$(r))return e.interpolator(Tg(wb(a,t.reverse),t.interpolate,t.interpolateGamma));a&&t.interpolate&&e.interpolate?e.interpolate(N4(t.interpolate,t.interpolateGamma)):le(e.round)?e.round(i):le(e.rangeRound)&&e.interpolate(i?wf:ns),a&&e.range(wb(a,t.reverse))}function pW(e,t,n){e!==_$&&e!==sb&&R("Only band and point scales support rangeStep.");var r=(t.paddingOuter!=null?t.paddingOuter:t.padding)||0,i=e===sb?1:(t.paddingInner!=null?t.paddingInner:t.padding)||0;return[0,t.rangeStep*A4(n,i,r)]}function mW(e,t,n){var r=t.schemeExtent,i,a;return P(t.scheme)?a=Tg(t.scheme,t.interpolate,t.interpolateGamma):(i=t.scheme.toLowerCase(),a=D4(i),a||R(`Unrecognized scheme name: ${t.scheme}`)),n=e===Mg?n+1:e===C4?n-1:e===Cu||e===Fg?+t.schemeCount||aW:n,C$(e)?u3(a,r,t.reverse):le(a)?T$(u3(a,r),n):e===k4?a:a.slice(0,n)}function u3(e,t,n){return le(e)&&(t||n)?M$(e,wb(t||[0,1],n)):e}function wb(e,t){return t?e.slice().reverse():e}function pk(e){N.call(this,null,e)}W(pk,N,{transform(e,t){const n=e.modified("sort")||t.changed(t.ADD)||t.modified(e.sort.fields)||t.modified("datum");return n&&t.source.sort(Eo(e.sort)),this.modified(n),t}});const c3="zero",mk="center",bk="normalize",yk=["y0","y1"];function w9(e){N.call(this,null,e)}w9.Definition={type:"Stack",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"groupby",type:"field",array:!0},{name:"sort",type:"compare"},{name:"offset",type:"enum",default:c3,values:[c3,mk,bk]},{name:"as",type:"string",array:!0,length:2,default:yk}]};W(w9,N,{transform(e,t){var n=e.as||yk,r=n[0],i=n[1],a=Eo(e.sort),s=e.field||Zu,o=e.offset===mk?bW:e.offset===bk?yW:vW,u,c,l,f;for(u=xW(t.source,e.groupby,a,s),c=0,l=u.length,f=u.max;cp(l),s,o,u,c,l,f,d,h,g;if(t==null)i.push(e.slice());else for(s={},o=0,u=e.length;og&&(g=h),n&&d.sort(n)}return i.max=g,i}const _W=Object.freeze(Object.defineProperty({__proto__:null,axisticks:ak,datajoin:sk,encode:ok,legendentries:uk,linkpath:x9,pie:_9,scale:hk,sortitems:pk,stack:w9},Symbol.toStringTag,{value:"Module"}));var ae=1e-6,Xh=1e-12,pe=Math.PI,Ke=pe/2,Vh=pe/4,sn=pe*2,Qe=180/pe,he=pe/180,ve=Math.abs,dc=Math.atan,rr=Math.atan2,se=Math.cos,vd=Math.ceil,vk=Math.exp,Eb=Math.hypot,Kh=Math.log,N1=Math.pow,re=Math.sin,Xn=Math.sign||function(e){return e>0?1:e<0?-1:0},on=Math.sqrt,E9=Math.tan;function xk(e){return e>1?0:e<-1?pe:Math.acos(e)}function _n(e){return e>1?Ke:e<-1?-Ke:Math.asin(e)}function St(){}function Jh(e,t){e&&f3.hasOwnProperty(e.type)&&f3[e.type](e,t)}var l3={Feature:function(e,t){Jh(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,a=se(t),s=re(t),o=kb*s,u=Ab*a+o*se(i),c=o*r*re(i);Qh.add(rr(c,u)),$b=e,Ab=a,kb=s}function $W(e){return Zh=new nn,Oi(e,oi),Zh*2}function e0(e){return[rr(e[1],e[0]),_n(e[2])]}function no(e){var t=e[0],n=e[1],r=se(n);return[r*se(t),r*re(t),re(n)]}function xd(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Ou(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function D1(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function _d(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function t0(e){var t=on(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var Ge,hn,Ye,Fn,Fs,Sk,$k,fu,El,pa,Ji,Ti={point:Cb,lineStart:h3,lineEnd:g3,polygonStart:function(){Ti.point=kk,Ti.lineStart=AW,Ti.lineEnd=kW,El=new nn,oi.polygonStart()},polygonEnd:function(){oi.polygonEnd(),Ti.point=Cb,Ti.lineStart=h3,Ti.lineEnd=g3,Qh<0?(Ge=-(Ye=180),hn=-(Fn=90)):El>ae?Fn=90:El<-ae&&(hn=-90),Ji[0]=Ge,Ji[1]=Ye},sphere:function(){Ge=-(Ye=180),hn=-(Fn=90)}};function Cb(e,t){pa.push(Ji=[Ge=e,Ye=e]),tFn&&(Fn=t)}function Ak(e,t){var n=no([e*he,t*he]);if(fu){var r=Ou(fu,n),i=[r[1],-r[0],0],a=Ou(i,r);t0(a),a=e0(a);var s=e-Fs,o=s>0?1:-1,u=a[0]*Qe*o,c,l=ve(s)>180;l^(o*FsFn&&(Fn=c)):(u=(u+360)%360-180,l^(o*FsFn&&(Fn=t))),l?eCn(Ge,Ye)&&(Ye=e):Cn(e,Ye)>Cn(Ge,Ye)&&(Ge=e):Ye>=Ge?(eYe&&(Ye=e)):e>Fs?Cn(Ge,e)>Cn(Ge,Ye)&&(Ye=e):Cn(e,Ye)>Cn(Ge,Ye)&&(Ge=e)}else pa.push(Ji=[Ge=e,Ye=e]);tFn&&(Fn=t),fu=n,Fs=e}function h3(){Ti.point=Ak}function g3(){Ji[0]=Ge,Ji[1]=Ye,Ti.point=Cb,fu=null}function kk(e,t){if(fu){var n=e-Fs;El.add(ve(n)>180?n+(n>0?360:-360):n)}else Sk=e,$k=t;oi.point(e,t),Ak(e,t)}function AW(){oi.lineStart()}function kW(){kk(Sk,$k),oi.lineEnd(),ve(El)>ae&&(Ge=-(Ye=180)),Ji[0]=Ge,Ji[1]=Ye,fu=null}function Cn(e,t){return(t-=e)<0?t+360:t}function CW(e,t){return e[0]-t[0]}function p3(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tCn(r[0],r[1])&&(r[1]=i[1]),Cn(i[0],r[1])>Cn(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(s=-1/0,n=a.length-1,t=0,r=a[n];t<=n;r=i,++t)i=a[t],(o=Cn(r[1],i[0]))>s&&(s=o,Ge=i[0],Ye=r[1])}return pa=Ji=null,Ge===1/0||hn===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ge,hn],[Ye,Fn]]}var al,n0,r0,i0,a0,s0,o0,u0,Fb,Mb,Tb,Ck,Fk,Jt,Qt,Zt,xr={sphere:St,point:S9,lineStart:m3,lineEnd:b3,polygonStart:function(){xr.lineStart=NW,xr.lineEnd=DW},polygonEnd:function(){xr.lineStart=m3,xr.lineEnd=b3}};function S9(e,t){e*=he,t*=he;var n=se(t);Rf(n*se(e),n*re(e),re(t))}function Rf(e,t,n){++al,r0+=(e-r0)/al,i0+=(t-i0)/al,a0+=(n-a0)/al}function m3(){xr.point=MW}function MW(e,t){e*=he,t*=he;var n=se(t);Jt=n*se(e),Qt=n*re(e),Zt=re(t),xr.point=TW,Rf(Jt,Qt,Zt)}function TW(e,t){e*=he,t*=he;var n=se(t),r=n*se(e),i=n*re(e),a=re(t),s=rr(on((s=Qt*a-Zt*i)*s+(s=Zt*r-Jt*a)*s+(s=Jt*i-Qt*r)*s),Jt*r+Qt*i+Zt*a);n0+=s,s0+=s*(Jt+(Jt=r)),o0+=s*(Qt+(Qt=i)),u0+=s*(Zt+(Zt=a)),Rf(Jt,Qt,Zt)}function b3(){xr.point=S9}function NW(){xr.point=OW}function DW(){Mk(Ck,Fk),xr.point=S9}function OW(e,t){Ck=e,Fk=t,e*=he,t*=he,xr.point=Mk;var n=se(t);Jt=n*se(e),Qt=n*re(e),Zt=re(t),Rf(Jt,Qt,Zt)}function Mk(e,t){e*=he,t*=he;var n=se(t),r=n*se(e),i=n*re(e),a=re(t),s=Qt*a-Zt*i,o=Zt*r-Jt*a,u=Jt*i-Qt*r,c=Eb(s,o,u),l=_n(c),f=c&&-l/c;Fb.add(f*s),Mb.add(f*o),Tb.add(f*u),n0+=l,s0+=l*(Jt+(Jt=r)),o0+=l*(Qt+(Qt=i)),u0+=l*(Zt+(Zt=a)),Rf(Jt,Qt,Zt)}function RW(e){al=n0=r0=i0=a0=s0=o0=u0=0,Fb=new nn,Mb=new nn,Tb=new nn,Oi(e,xr);var t=+Fb,n=+Mb,r=+Tb,i=Eb(t,n,r);return ipe&&(e-=Math.round(e/sn)*sn),[e,t]}Db.invert=Db;function Tk(e,t,n){return(e%=sn)?t||n?Nb(v3(e),x3(t,n)):v3(e):t||n?x3(t,n):Db}function y3(e){return function(t,n){return t+=e,ve(t)>pe&&(t-=Math.round(t/sn)*sn),[t,n]}}function v3(e){var t=y3(e);return t.invert=y3(-e),t}function x3(e,t){var n=se(e),r=re(e),i=se(t),a=re(t);function s(o,u){var c=se(u),l=se(o)*c,f=re(o)*c,d=re(u),h=d*n+l*r;return[rr(f*i-h*a,l*n-d*r),_n(h*i+f*a)]}return s.invert=function(o,u){var c=se(u),l=se(o)*c,f=re(o)*c,d=re(u),h=d*i-f*a;return[rr(f*i+d*a,l*n+h*r),_n(h*n-l*r)]},s}function LW(e){e=Tk(e[0]*he,e[1]*he,e.length>2?e[2]*he:0);function t(n){return n=e(n[0]*he,n[1]*he),n[0]*=Qe,n[1]*=Qe,n}return t.invert=function(n){return n=e.invert(n[0]*he,n[1]*he),n[0]*=Qe,n[1]*=Qe,n},t}function PW(e,t,n,r,i,a){if(n){var s=se(t),o=re(t),u=r*n;i==null?(i=t+r*sn,a=t-u/2):(i=_3(s,i),a=_3(s,a),(r>0?ia)&&(i+=r*sn));for(var c,l=i;r>0?l>a:l1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function nh(e,t){return ve(e[0]-t[0])=0;--o)i.point((f=l[o])[0],f[1]);else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,l=d.z,h=!h}while(!d.v);i.lineEnd()}}}function w3(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n=0?1:-1,F=$*S,k=F>pe,D=m*E;if(u.add(rr(D*$*re(F),b*w+D*se(F))),s+=k?S+$*sn:S,k^g>=n^x>=n){var A=Ou(no(h),no(v));t0(A);var M=Ou(a,A);t0(M);var C=(k^S>=0?-1:1)*_n(M[2]);(r>C||r===C&&(A[0]||A[1]))&&(o+=k^S>=0?1:-1)}}return(s<-ae||s0){for(u||(i.polygonStart(),u=!0),i.lineStart(),E=0;E1&&x&2&&_.push(_.pop().concat(_.shift())),l.push(_.filter(zW))}}return d}}function zW(e){return e.length>1}function BW(e,t){return((e=e.x)[0]<0?e[1]-Ke-ae:Ke-e[1])-((t=t.x)[0]<0?t[1]-Ke-ae:Ke-t[1])}const E3=Ok(function(){return!0},UW,qW,[-pe,-Ke]);function UW(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(a,s){var o=a>0?pe:-pe,u=ve(a-t);ve(u-pe)0?Ke:-Ke),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),e.point(a,n),i=0):r!==o&&u>=pe&&(ve(t-r)ae?dc((re(t)*(a=se(r))*re(n)-re(r)*(i=se(t))*re(e))/(i*a*s)):(t+r)/2}function qW(e,t,n,r){var i;if(e==null)i=n*Ke,r.point(-pe,i),r.point(0,i),r.point(pe,i),r.point(pe,0),r.point(pe,-i),r.point(0,-i),r.point(-pe,-i),r.point(-pe,0),r.point(-pe,i);else if(ve(e[0]-t[0])>ae){var a=e[0]0,i=ve(t)>ae;function a(l,f,d,h){PW(h,e,n,d,l,f)}function s(l,f){return se(l)*se(f)>t}function o(l){var f,d,h,g,p;return{lineStart:function(){g=h=!1,p=1},point:function(m,b){var y=[m,b],v,x=s(m,b),_=r?x?0:c(m,b):x?c(m+(m<0?pe:-pe),b):0;if(!f&&(g=h=x)&&l.lineStart(),x!==h&&(v=u(f,y),(!v||nh(f,v)||nh(y,v))&&(y[2]=1)),x!==h)p=0,x?(l.lineStart(),v=u(y,f),l.point(v[0],v[1])):(v=u(f,y),l.point(v[0],v[1],2),l.lineEnd()),f=v;else if(i&&f&&r^x){var E;!(_&d)&&(E=u(y,f,!0))&&(p=0,r?(l.lineStart(),l.point(E[0][0],E[0][1]),l.point(E[1][0],E[1][1]),l.lineEnd()):(l.point(E[1][0],E[1][1]),l.lineEnd(),l.lineStart(),l.point(E[0][0],E[0][1],3)))}x&&(!f||!nh(f,y))&&l.point(y[0],y[1]),f=y,h=x,d=_},lineEnd:function(){h&&l.lineEnd(),f=null},clean:function(){return p|(g&&h)<<1}}}function u(l,f,d){var h=no(l),g=no(f),p=[1,0,0],m=Ou(h,g),b=xd(m,m),y=m[0],v=b-y*y;if(!v)return!d&&l;var x=t*b/v,_=-t*y/v,E=Ou(p,m),w=_d(p,x),S=_d(m,_);D1(w,S);var $=E,F=xd(w,$),k=xd($,$),D=F*F-k*(xd(w,w)-1);if(!(D<0)){var A=on(D),M=_d($,(-F-A)/k);if(D1(M,w),M=e0(M),!d)return M;var C=l[0],T=f[0],L=l[1],I=f[1],z;T0^M[1]<(ve(M[0]-C)pe^(C<=M[0]&&M[0]<=T)){var Ee=_d($,(-F+A)/k);return D1(Ee,w),[M,e0(Ee)]}}}function c(l,f){var d=r?e:pe-e,h=0;return l<-d?h|=1:l>d&&(h|=2),f<-d?h|=4:f>d&&(h|=8),h}return Ok(s,o,a,r?[0,-e]:[-pe,e-pe])}function HW(e,t,n,r,i,a){var s=e[0],o=e[1],u=t[0],c=t[1],l=0,f=1,d=u-s,h=c-o,g;if(g=n-s,!(!d&&g>0)){if(g/=d,d<0){if(g0){if(g>f)return;g>l&&(l=g)}if(g=i-s,!(!d&&g<0)){if(g/=d,d<0){if(g>f)return;g>l&&(l=g)}else if(d>0){if(g0)){if(g/=h,h<0){if(g0){if(g>f)return;g>l&&(l=g)}if(g=a-o,!(!h&&g<0)){if(g/=h,h<0){if(g>f)return;g>l&&(l=g)}else if(h>0){if(g0&&(e[0]=s+l*d,e[1]=o+l*h),f<1&&(t[0]=s+f*d,t[1]=o+f*h),!0}}}}}var sl=1e9,Ed=-sl;function Rk(e,t,n,r){function i(c,l){return e<=c&&c<=n&&t<=l&&l<=r}function a(c,l,f,d){var h=0,g=0;if(c==null||(h=s(c,f))!==(g=s(l,f))||u(c,l)<0^f>0)do d.point(h===0||h===3?e:n,h>1?r:t);while((h=(h+f+4)%4)!==g);else d.point(l[0],l[1])}function s(c,l){return ve(c[0]-e)0?0:3:ve(c[0]-n)0?2:1:ve(c[1]-t)0?1:0:l>0?3:2}function o(c,l){return u(c.x,l.x)}function u(c,l){var f=s(c,1),d=s(l,1);return f!==d?f-d:f===0?l[1]-c[1]:f===1?c[0]-l[0]:f===2?c[1]-l[1]:l[0]-c[0]}return function(c){var l=c,f=Nk(),d,h,g,p,m,b,y,v,x,_,E,w={point:S,lineStart:D,lineEnd:A,polygonStart:F,polygonEnd:k};function S(C,T){i(C,T)&&l.point(C,T)}function $(){for(var C=0,T=0,L=h.length;Tr&&(me-fe)*(r-Ee)>(Ie-Ee)*(e-fe)&&++C:Ie<=r&&(me-fe)*(r-Ee)<(Ie-Ee)*(e-fe)&&--C;return C}function F(){l=f,d=[],h=[],E=!0}function k(){var C=$(),T=E&&C,L=(d=Cw(d)).length;(T||L)&&(c.polygonStart(),T&&(c.lineStart(),a(null,null,1,c),c.lineEnd()),L&&Dk(d,o,C,a,c),c.polygonEnd()),l=c,d=h=g=null}function D(){w.point=M,h&&h.push(g=[]),_=!0,x=!1,y=v=NaN}function A(){d&&(M(p,m),b&&x&&f.rejoin(),d.push(f.result())),w.point=S,x&&l.lineEnd()}function M(C,T){var L=i(C,T);if(h&&g.push([C,T]),_)p=C,m=T,b=L,_=!1,L&&(l.lineStart(),l.point(C,T));else if(L&&x)l.point(C,T);else{var I=[y=Math.max(Ed,Math.min(sl,y)),v=Math.max(Ed,Math.min(sl,v))],z=[C=Math.max(Ed,Math.min(sl,C)),T=Math.max(Ed,Math.min(sl,T))];HW(I,z,e,t,n,r)?(x||(l.lineStart(),l.point(I[0],I[1])),l.point(z[0],z[1]),L||l.lineEnd(),E=!1):L&&(l.lineStart(),l.point(C,T),E=!1)}y=C,v=T,x=L}return w}}function S3(e,t,n){var r=Nn(e,t-ae,n).concat(t);return function(i){return r.map(function(a){return[i,a]})}}function $3(e,t,n){var r=Nn(e,t-ae,n).concat(t);return function(i){return r.map(function(a){return[a,i]})}}function GW(){var e,t,n,r,i,a,s,o,u=10,c=u,l=90,f=360,d,h,g,p,m=2.5;function b(){return{type:"MultiLineString",coordinates:y()}}function y(){return Nn(vd(r/l)*l,n,l).map(g).concat(Nn(vd(o/f)*f,s,f).map(p)).concat(Nn(vd(t/u)*u,e,u).filter(function(v){return ve(v%l)>ae}).map(d)).concat(Nn(vd(a/c)*c,i,c).filter(function(v){return ve(v%f)>ae}).map(h))}return b.lines=function(){return y().map(function(v){return{type:"LineString",coordinates:v}})},b.outline=function(){return{type:"Polygon",coordinates:[g(r).concat(p(s).slice(1),g(n).reverse().slice(1),p(o).reverse().slice(1))]}},b.extent=function(v){return arguments.length?b.extentMajor(v).extentMinor(v):b.extentMinor()},b.extentMajor=function(v){return arguments.length?(r=+v[0][0],n=+v[1][0],o=+v[0][1],s=+v[1][1],r>n&&(v=r,r=n,n=v),o>s&&(v=o,o=s,s=v),b.precision(m)):[[r,o],[n,s]]},b.extentMinor=function(v){return arguments.length?(t=+v[0][0],e=+v[1][0],a=+v[0][1],i=+v[1][1],t>e&&(v=t,t=e,e=v),a>i&&(v=a,a=i,i=v),b.precision(m)):[[t,a],[e,i]]},b.step=function(v){return arguments.length?b.stepMajor(v).stepMinor(v):b.stepMinor()},b.stepMajor=function(v){return arguments.length?(l=+v[0],f=+v[1],b):[l,f]},b.stepMinor=function(v){return arguments.length?(u=+v[0],c=+v[1],b):[u,c]},b.precision=function(v){return arguments.length?(m=+v,d=S3(a,i,90),h=$3(t,e,m),g=S3(o,s,90),p=$3(r,n,m),b):m},b.extentMajor([[-180,-90+ae],[180,90-ae]]).extentMinor([[-180,-80-ae],[180,80+ae]])}const Vl=e=>e;var R1=new nn,Ob=new nn,Lk,Pk,Rb,Lb,Ri={point:St,lineStart:St,lineEnd:St,polygonStart:function(){Ri.lineStart=YW,Ri.lineEnd=VW},polygonEnd:function(){Ri.lineStart=Ri.lineEnd=Ri.point=St,R1.add(ve(Ob)),Ob=new nn},result:function(){var e=R1/2;return R1=new nn,e}};function YW(){Ri.point=XW}function XW(e,t){Ri.point=Ik,Lk=Rb=e,Pk=Lb=t}function Ik(e,t){Ob.add(Lb*e-Rb*t),Rb=e,Lb=t}function VW(){Ik(Lk,Pk)}var Ru=1/0,c0=Ru,Kl=-Ru,l0=Kl,f0={point:KW,lineStart:St,lineEnd:St,polygonStart:St,polygonEnd:St,result:function(){var e=[[Ru,c0],[Kl,l0]];return Kl=l0=-(c0=Ru=1/0),e}};function KW(e,t){eKl&&(Kl=e),tl0&&(l0=t)}var Pb=0,Ib=0,ol=0,d0=0,h0=0,au=0,zb=0,Bb=0,ul=0,zk,Bk,Xr,Vr,Gn={point:ro,lineStart:A3,lineEnd:k3,polygonStart:function(){Gn.lineStart=ZW,Gn.lineEnd=eH},polygonEnd:function(){Gn.point=ro,Gn.lineStart=A3,Gn.lineEnd=k3},result:function(){var e=ul?[zb/ul,Bb/ul]:au?[d0/au,h0/au]:ol?[Pb/ol,Ib/ol]:[NaN,NaN];return Pb=Ib=ol=d0=h0=au=zb=Bb=ul=0,e}};function ro(e,t){Pb+=e,Ib+=t,++ol}function A3(){Gn.point=JW}function JW(e,t){Gn.point=QW,ro(Xr=e,Vr=t)}function QW(e,t){var n=e-Xr,r=t-Vr,i=on(n*n+r*r);d0+=i*(Xr+e)/2,h0+=i*(Vr+t)/2,au+=i,ro(Xr=e,Vr=t)}function k3(){Gn.point=ro}function ZW(){Gn.point=tH}function eH(){Uk(zk,Bk)}function tH(e,t){Gn.point=Uk,ro(zk=Xr=e,Bk=Vr=t)}function Uk(e,t){var n=e-Xr,r=t-Vr,i=on(n*n+r*r);d0+=i*(Xr+e)/2,h0+=i*(Vr+t)/2,au+=i,i=Vr*e-Xr*t,zb+=i*(Xr+e),Bb+=i*(Vr+t),ul+=i*3,ro(Xr=e,Vr=t)}function jk(e){this._context=e}jk.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,sn);break}}},result:St};var Ub=new nn,L1,qk,Wk,cl,ll,Jl={point:St,lineStart:function(){Jl.point=nH},lineEnd:function(){L1&&Hk(qk,Wk),Jl.point=St},polygonStart:function(){L1=!0},polygonEnd:function(){L1=null},result:function(){var e=+Ub;return Ub=new nn,e}};function nH(e,t){Jl.point=Hk,qk=cl=e,Wk=ll=t}function Hk(e,t){cl-=e,ll-=t,Ub.add(on(cl*cl+ll*ll)),cl=e,ll=t}let C3,g0,F3,M3;class T3{constructor(t){this._append=t==null?Gk:rH(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==F3||this._append!==g0){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,F3=r,g0=this._append,M3=this._,this._=i}this._+=M3;break}}}result(){const t=this._;return this._="",t.length?t:null}}function Gk(e){let t=1;this._+=e[0];for(const n=e.length;t=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return Gk;if(t!==C3){const n=10**t;C3=t,g0=function(i){let a=1;this._+=i[0];for(const s=i.length;a=0))throw new RangeError(`invalid digits: ${o}`);n=u}return t===null&&(a=new T3(n)),s},s.projection(e).digits(n).context(t)}function Hg(e){return function(t){var n=new jb;for(var r in e)n[r]=e[r];return n.stream=t,n}}function jb(){}jb.prototype={constructor:jb,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function $9(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),Oi(n,e.stream(f0)),t(f0.result()),r!=null&&e.clipExtent(r),e}function Gg(e,t,n){return $9(e,function(r){var i=t[1][0]-t[0][0],a=t[1][1]-t[0][1],s=Math.min(i/(r[1][0]-r[0][0]),a/(r[1][1]-r[0][1])),o=+t[0][0]+(i-s*(r[1][0]+r[0][0]))/2,u=+t[0][1]+(a-s*(r[1][1]+r[0][1]))/2;e.scale(150*s).translate([o,u])},n)}function A9(e,t,n){return Gg(e,[[0,0],t],n)}function k9(e,t,n){return $9(e,function(r){var i=+t,a=i/(r[1][0]-r[0][0]),s=(i-a*(r[1][0]+r[0][0]))/2,o=-a*r[0][1];e.scale(150*a).translate([s,o])},n)}function C9(e,t,n){return $9(e,function(r){var i=+t,a=i/(r[1][1]-r[0][1]),s=-a*r[0][0],o=(i-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([s,o])},n)}var N3=16,iH=se(30*he);function D3(e,t){return+t?sH(e,t):aH(e)}function aH(e){return Hg({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function sH(e,t){function n(r,i,a,s,o,u,c,l,f,d,h,g,p,m){var b=c-r,y=l-i,v=b*b+y*y;if(v>4*t&&p--){var x=s+d,_=o+h,E=u+g,w=on(x*x+_*_+E*E),S=_n(E/=w),$=ve(ve(E)-1)t||ve((b*A+y*M)/v-.5)>.3||s*d+o*h+u*g2?C[2]%360*he:0,A()):[o*Qe,u*Qe,c*Qe]},k.angle=function(C){return arguments.length?(f=C%360*he,A()):f*Qe},k.reflectX=function(C){return arguments.length?(d=C?-1:1,A()):d<0},k.reflectY=function(C){return arguments.length?(h=C?-1:1,A()):h<0},k.precision=function(C){return arguments.length?(E=D3(w,_=C*C),M()):on(_)},k.fitExtent=function(C,T){return Gg(k,C,T)},k.fitSize=function(C,T){return A9(k,C,T)},k.fitWidth=function(C,T){return k9(k,C,T)},k.fitHeight=function(C,T){return C9(k,C,T)};function A(){var C=O3(n,0,0,d,h,f).apply(null,t(a,s)),T=O3(n,r-C[0],i-C[1],d,h,f);return l=Tk(o,u,c),w=Nb(t,T),S=Nb(l,w),E=D3(w,_),M()}function M(){return $=F=null,k}return function(){return t=e.apply(this,arguments),k.invert=t.invert&&D,A()}}function F9(e){var t=0,n=pe/3,r=Xk(e),i=r(t,n);return i.parallels=function(a){return arguments.length?r(t=a[0]*he,n=a[1]*he):[t*Qe,n*Qe]},i}function lH(e){var t=se(e);function n(r,i){return[r*t,re(i)/t]}return n.invert=function(r,i){return[r/t,_n(i*t)]},n}function fH(e,t){var n=re(e),r=(n+re(t))/2;if(ve(r)=.12&&m<.234&&p>=-.425&&p<-.214?i:m>=.166&&m<.234&&p>=-.214&&p<-.115?s:n).invert(d)},l.stream=function(d){return e&&t===d?e:e=dH([n.stream(t=d),i.stream(d),s.stream(d)])},l.precision=function(d){return arguments.length?(n.precision(d),i.precision(d),s.precision(d),f()):n.precision()},l.scale=function(d){return arguments.length?(n.scale(d),i.scale(d*.35),s.scale(d),l.translate(n.translate())):n.scale()},l.translate=function(d){if(!arguments.length)return n.translate();var h=n.scale(),g=+d[0],p=+d[1];return r=n.translate(d).clipExtent([[g-.455*h,p-.238*h],[g+.455*h,p+.238*h]]).stream(c),a=i.translate([g-.307*h,p+.201*h]).clipExtent([[g-.425*h+ae,p+.12*h+ae],[g-.214*h-ae,p+.234*h-ae]]).stream(c),o=s.translate([g-.205*h,p+.212*h]).clipExtent([[g-.214*h+ae,p+.166*h+ae],[g-.115*h-ae,p+.234*h-ae]]).stream(c),f()},l.fitExtent=function(d,h){return Gg(l,d,h)},l.fitSize=function(d,h){return A9(l,d,h)},l.fitWidth=function(d,h){return k9(l,d,h)},l.fitHeight=function(d,h){return C9(l,d,h)};function f(){return e=t=null,l}return l.scale(1070)}function Kk(e){return function(t,n){var r=se(t),i=se(n),a=e(r*i);return a===1/0?[2,0]:[a*i*re(t),a*re(n)]}}function Lf(e){return function(t,n){var r=on(t*t+n*n),i=e(r),a=re(i),s=se(i);return[rr(t*a,r*s),_n(r&&n*a/r)]}}var Jk=Kk(function(e){return on(2/(1+e))});Jk.invert=Lf(function(e){return 2*_n(e/2)});function gH(){return pi(Jk).scale(124.75).clipAngle(180-.001)}var Qk=Kk(function(e){return(e=xk(e))&&e/re(e)});Qk.invert=Lf(function(e){return e});function pH(){return pi(Qk).scale(79.4188).clipAngle(180-.001)}function Yg(e,t){return[e,Kh(E9((Ke+t)/2))]}Yg.invert=function(e,t){return[e,2*dc(vk(t))-Ke]};function mH(){return Zk(Yg).scale(961/sn)}function Zk(e){var t=pi(e),n=t.center,r=t.scale,i=t.translate,a=t.clipExtent,s=null,o,u,c;t.scale=function(f){return arguments.length?(r(f),l()):r()},t.translate=function(f){return arguments.length?(i(f),l()):i()},t.center=function(f){return arguments.length?(n(f),l()):n()},t.clipExtent=function(f){return arguments.length?(f==null?s=o=u=c=null:(s=+f[0][0],o=+f[0][1],u=+f[1][0],c=+f[1][1]),l()):s==null?null:[[s,o],[u,c]]};function l(){var f=pe*r(),d=t(LW(t.rotate()).invert([0,0]));return a(s==null?[[d[0]-f,d[1]-f],[d[0]+f,d[1]+f]]:e===Yg?[[Math.max(d[0]-f,s),o],[Math.min(d[0]+f,u),c]]:[[s,Math.max(d[1]-f,o)],[u,Math.min(d[1]+f,c)]])}return l()}function Sd(e){return E9((Ke+e)/2)}function bH(e,t){var n=se(e),r=e===t?re(e):Kh(n/se(t))/Kh(Sd(t)/Sd(e)),i=n*N1(Sd(e),r)/r;if(!r)return Yg;function a(s,o){i>0?o<-Ke+ae&&(o=-Ke+ae):o>Ke-ae&&(o=Ke-ae);var u=i/N1(Sd(o),r);return[u*re(r*s),i-u*se(r*s)]}return a.invert=function(s,o){var u=i-o,c=Xn(r)*on(s*s+u*u),l=rr(s,ve(u))*Xn(u);return u*r<0&&(l-=pe*Xn(s)*Xn(u)),[l/r,2*dc(N1(i/c,1/r))-Ke]},a}function yH(){return F9(bH).scale(109.5).parallels([30,30])}function m0(e,t){return[e,t]}m0.invert=m0;function vH(){return pi(m0).scale(152.63)}function xH(e,t){var n=se(e),r=e===t?re(e):(n-se(t))/(t-e),i=n/r+e;if(ve(r)ae&&--r>0);return[e/(.8707+(a=n*n)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),n]};function AH(){return pi(nC).scale(175.295)}function rC(e,t){return[se(t)*re(e),re(t)]}rC.invert=Lf(_n);function kH(){return pi(rC).scale(249.5).clipAngle(90+ae)}function iC(e,t){var n=se(t),r=1+se(e)*n;return[n*re(e)/r,re(t)/r]}iC.invert=Lf(function(e){return 2*dc(e)});function CH(){return pi(iC).scale(250).clipAngle(142)}function aC(e,t){return[Kh(E9((Ke+t)/2)),-e]}aC.invert=function(e,t){return[-t,2*dc(vk(e))-Ke]};function FH(){var e=Zk(aC),t=e.center,n=e.rotate;return e.center=function(r){return arguments.length?t([-r[1],r[0]]):(r=t(),[r[1],-r[0]])},e.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}var MH=Math.abs,qb=Math.cos,y0=Math.sin,TH=1e-6,sC=Math.PI,Wb=sC/2,R3=NH(2);function L3(e){return e>1?Wb:e<-1?-Wb:Math.asin(e)}function NH(e){return e>0?Math.sqrt(e):0}function DH(e,t){var n=e*y0(t),r=30,i;do t-=i=(t+y0(t)-n)/(1+qb(t));while(MH(i)>TH&&--r>0);return t/2}function OH(e,t,n){function r(i,a){return[e*i*qb(a=DH(n,a)),t*y0(a)]}return r.invert=function(i,a){return a=L3(a/t),[i/(e*qb(a)),L3((2*a+y0(2*a))/n)]},r}var RH=OH(R3/Wb,R3,sC);function LH(){return pi(RH).scale(169.529)}const PH=Yk(),Hb=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function IH(e,t){return function n(){const r=t();return r.type=e,r.path=Yk().projection(r),r.copy=r.copy||function(){const i=n();return Hb.forEach(a=>{r[a]&&i[a](r[a]())}),i.path.pointRadius(r.path.pointRadius()),i},$$(r)}}function M9(e,t){if(!e||typeof e!="string")throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?(v0[e]=IH(e,t),this):v0[e]||null}function oC(e){return e&&e.path||PH}const v0={albers:Vk,albersusa:hH,azimuthalequalarea:gH,azimuthalequidistant:pH,conicconformal:yH,conicequalarea:p0,conicequidistant:_H,equalEarth:EH,equirectangular:vH,gnomonic:SH,identity:$H,mercator:mH,mollweide:LH,naturalEarth1:AH,orthographic:kH,stereographic:CH,transversemercator:FH};for(const e in v0)M9(e,v0[e]);function zH(){}const Ai=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function uC(){var e=1,t=1,n=o;function r(u,c){return c.map(l=>i(u,l))}function i(u,c){var l=[],f=[];return a(u,c,d=>{n(d,u,c),BH(d)>0?l.push([d]):f.push(d)}),f.forEach(d=>{for(var h=0,g=l.length,p;h=c,Ai[m<<1].forEach(v);++h=c,Ai[p|m<<1].forEach(v);for(Ai[m<<0].forEach(v);++g=c,b=u[g*e]>=c,Ai[m<<1|b<<2].forEach(v);++h=c,y=b,b=u[g*e+h+1]>=c,Ai[p|m<<1|b<<2|y<<3].forEach(v);Ai[m|b<<3].forEach(v)}for(h=-1,b=u[g*e]>=c,Ai[b<<2].forEach(v);++h=c,Ai[b<<2|y<<3].forEach(v);Ai[b<<3].forEach(v);function v(x){var _=[x[0][0]+h,x[0][1]+g],E=[x[1][0]+h,x[1][1]+g],w=s(_),S=s(E),$,F;($=d[w])?(F=f[S])?(delete d[$.end],delete f[F.start],$===F?($.ring.push(E),l($.ring)):f[$.start]=d[F.end]={start:$.start,end:F.end,ring:$.ring.concat(F.ring)}):(delete d[$.end],$.ring.push(E),d[$.end=S]=$):($=f[S])?(F=d[w])?(delete f[$.start],delete d[F.end],$===F?($.ring.push(E),l($.ring)):f[F.start]=d[$.end]={start:F.start,end:$.end,ring:F.ring.concat($.ring)}):(delete f[$.start],$.ring.unshift(_),f[$.start=w]=$):f[w]=d[S]={start:w,end:S,ring:[_,E]}}}function s(u){return u[0]*2+u[1]*(e+1)*4}function o(u,c,l){u.forEach(f=>{var d=f[0],h=f[1],g=d|0,p=h|0,m,b=c[p*e+g];d>0&&d0&&h=0&&l>=0||R("invalid size"),e=c,t=l,r},r.smooth=function(u){return arguments.length?(n=u?o:zH,r):n===o},r}function BH(e){for(var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++tr!=h>r&&n<(d-c)*(r-l)/(h-l)+c&&(i=-i)}return i}function qH(e,t,n){var r;return WH(e,t,n)&&HH(e[r=+(e[0]===t[0])],n[r],t[r])}function WH(e,t,n){return(t[0]-e[0])*(n[1]-e[1])===(n[0]-e[0])*(t[1]-e[1])}function HH(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}function cC(e,t,n){return function(r){var i=ri(r),a=n?Math.min(i[0],0):i[0],s=i[1],o=s-a,u=t?Ra(a,s,e):o/(e+1);return Nn(a+u,s,u)}}function T9(e){N.call(this,null,e)}T9.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]};W(T9,N,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=t.materialize(t.SOURCE).source,i=e.field||Wt,a=uC().smooth(e.smooth!==!1),s=e.thresholds||GH(r,i,e),o=e.as===null?null:e.as||"contour",u=[];return r.forEach(c=>{const l=i(c),f=a.size([l.width,l.height])(l.values,P(s)?s:s(l.values));YH(f,l,c,e),f.forEach(d=>{u.push(cg(c,Me(o!=null?{[o]:d}:d)))})}),this.value&&(n.rem=this.value),this.value=n.source=n.add=u,n}});function GH(e,t,n){const r=cC(n.levels||10,n.nice,n.zero!==!1);return n.resolve!=="shared"?r:r(e.map(i=>js(t(i).values)))}function YH(e,t,n,r){let i=r.scale||t.scale,a=r.translate||t.translate;if(le(i)&&(i=i(n,r)),le(a)&&(a=a(n,r)),(i===1||i==null)&&!a)return;const s=(we(i)?i:i[0])||1,o=(we(i)?i:i[1])||1,u=a&&a[0]||0,c=a&&a[1]||0;e.forEach(lC(t,s,o,u,c))}function lC(e,t,n,r,i){const a=e.x1||0,s=e.y1||0,o=t*n<0;function u(f){f.forEach(c)}function c(f){o&&f.reverse(),f.forEach(l)}function l(f){f[0]=(f[0]-a)*t+r,f[1]=(f[1]-s)*n+i}return function(f){return f.coordinates.forEach(u),f}}function P3(e,t,n){const r=e>=0?e:x2(t,n);return Math.round((Math.sqrt(4*r*r+1)-1)/2)}function P1(e){return le(e)?e:Ht(+e)}function fC(){var e=u=>u[0],t=u=>u[1],n=Zu,r=[-1,-1],i=960,a=500,s=2;function o(u,c){const l=P3(r[0],u,e)>>s,f=P3(r[1],u,t)>>s,d=l?l+2:0,h=f?f+2:0,g=2*d+(i>>s),p=2*h+(a>>s),m=new Float32Array(g*p),b=new Float32Array(g*p);let y=m;u.forEach(x=>{const _=d+(+e(x)>>s),E=h+(+t(x)>>s);_>=0&&_=0&&E0&&f>0?(qo(g,p,m,b,l),Wo(g,p,b,m,f),qo(g,p,m,b,l),Wo(g,p,b,m,f),qo(g,p,m,b,l),Wo(g,p,b,m,f)):l>0?(qo(g,p,m,b,l),qo(g,p,b,m,l),qo(g,p,m,b,l),y=b):f>0&&(Wo(g,p,m,b,f),Wo(g,p,b,m,f),Wo(g,p,m,b,f),y=b);const v=c?Math.pow(2,-2*s):1/Fw(y);for(let x=0,_=g*p;x<_;++x)y[x]*=v;return{values:y,scale:1<>s),y2:h+(a>>s)}}return o.x=function(u){return arguments.length?(e=P1(u),o):e},o.y=function(u){return arguments.length?(t=P1(u),o):t},o.weight=function(u){return arguments.length?(n=P1(u),o):n},o.size=function(u){if(!arguments.length)return[i,a];var c=+u[0],l=+u[1];return c>=0&&l>=0||R("invalid size"),i=c,a=l,o},o.cellSize=function(u){return arguments.length?((u=+u)>=1||R("invalid cell size"),s=Math.floor(Math.log(u)/Math.LN2),o):1<=i&&(o>=a&&(u-=n[o-a+s*e]),r[o-i+s*e]=u/Math.min(o+1,e-1+a-o,a))}function Wo(e,t,n,r,i){const a=(i<<1)+1;for(let s=0;s=i&&(o>=a&&(u-=n[s+(o-a)*e]),r[s+(o-i)*e]=u/Math.min(o+1,t-1+a-o,a))}function N9(e){N.call(this,null,e)}N9.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const XH=["x","y","weight","size","cellSize","bandwidth"];function dC(e,t){return XH.forEach(n=>t[n]!=null?e[n](t[n]):0),e}W(N9,N,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=t.materialize(t.SOURCE).source,i=VH(r,e.groupby),a=(e.groupby||[]).map(Je),s=dC(fC(),e),o=e.as||"grid",u=[];function c(l,f){for(let d=0;dMe(c({[o]:s(l,e.counts)},l.dims))),this.value&&(n.rem=this.value),this.value=n.source=n.add=u,n}});function VH(e,t){var n=[],r=l=>l(o),i,a,s,o,u,c;if(t==null)n.push(e);else for(i={},a=0,s=e.length;an.push(o(l))),a&&s&&(t.visit(u,l=>{var f=a(l),d=s(l);f!=null&&d!=null&&(f=+f)===f&&(d=+d)===d&&r.push([f,d])}),n=n.concat({type:Gb,geometry:{type:KH,coordinates:r}})),this.value={type:O9,features:n}}});function L9(e){N.call(this,null,e)}L9.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]};W(L9,N,{transform(e,t){var n=t.fork(t.ALL),r=this.value,i=e.field||Wt,a=e.as||"path",s=n.SOURCE;!r||e.modified()?(this.value=r=oC(e.projection),n.materialize().reflow()):s=i===Wt||t.modified(i.fields)?n.ADD_MOD:n.ADD;const o=JH(r,e.pointRadius);return n.visit(s,u=>u[a]=r(i(u))),r.pointRadius(o),n.modifies(a)}});function JH(e,t){const n=e.pointRadius();return e.context(null),t!=null&&e.pointRadius(t),n}function P9(e){N.call(this,null,e)}P9.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]};W(P9,N,{transform(e,t){var n=e.projection,r=e.fields[0],i=e.fields[1],a=e.as||["x","y"],s=a[0],o=a[1],u;function c(l){const f=n([r(l),i(l)]);f?(l[s]=f[0],l[o]=f[1]):(l[s]=void 0,l[o]=void 0)}return e.modified()?t=t.materialize().reflow(!0).visit(t.SOURCE,c):(u=t.modified(r.fields)||t.modified(i.fields),t.visit(u?t.ADD_MOD:t.ADD,c)),t.modifies(a)}});function I9(e){N.call(this,null,e)}I9.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]};W(I9,N,{transform(e,t){var n=t.fork(t.ALL),r=this.value,i=e.as||"shape",a=n.ADD;return(!r||e.modified())&&(this.value=r=QH(oC(e.projection),e.field||Zn("datum"),e.pointRadius),n.materialize().reflow(),a=n.SOURCE),n.visit(a,s=>s[i]=r),n.modifies(i)}});function QH(e,t,n){const r=n==null?i=>e(t(i)):i=>{var a=e.pointRadius(),s=e.pointRadius(n)(t(i));return e.pointRadius(a),s};return r.context=i=>(e.context(i),r),r}function z9(e){N.call(this,[],e),this.generator=GW()}z9.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]};W(z9,N,{transform(e,t){var n=this.value,r=this.generator,i;if(!n.length||e.modified())for(const a in e)le(r[a])&&r[a](e[a]);return i=r(),n.length?t.mod.push(SE(n[0],i)):t.add.push(Me(i)),n[0]=i,t}});function B9(e){N.call(this,null,e)}B9.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]};W(B9,N,{transform(e,t){if(!t.changed()&&!e.modified())return t.StopPropagation;var n=t.materialize(t.SOURCE).source,r=e.resolve==="shared",i=e.field||Wt,a=eG(e.opacity,e),s=ZH(e.color,e),o=e.as||"image",u={$x:0,$y:0,$value:0,$max:r?js(n.map(c=>js(i(c).values))):0};return n.forEach(c=>{const l=i(c),f=ce({},c,u);r||(f.$max=js(l.values||[])),c[o]=tG(l,f,s.dep?s:Ht(s(f)),a.dep?a:Ht(a(f)))}),t.reflow(!0).modifies(o)}});function ZH(e,t){let n;return le(e)?(n=r=>Ia(e(r,t)),n.dep=hC(e)):n=Ht(Ia(e||"#888")),n}function eG(e,t){let n;return le(e)?(n=r=>e(r,t),n.dep=hC(e)):e?n=Ht(e):(n=r=>r.$value/r.$max||0,n.dep=!0),n}function hC(e){if(!le(e))return!1;const t=Ar(Bt(e));return t.$x||t.$y||t.$value||t.$max}function tG(e,t,n,r){const i=e.width,a=e.height,s=e.x1||0,o=e.y1||0,u=e.x2||i,c=e.y2||a,l=e.values,f=l?m=>l[m]:ya,d=Ta(u-s,c-o),h=d.getContext("2d"),g=h.getImageData(0,0,u-s,c-o),p=g.data;for(let m=o,b=0;m{e[r]!=null&&I3(n,r,e[r])})):Hb.forEach(r=>{e.modified(r)&&I3(n,r,e[r])}),e.pointRadius!=null&&n.path.pointRadius(e.pointRadius),e.fit&&nG(n,e),t.fork(t.NO_SOURCE|t.NO_FIELDS)}});function nG(e,t){const n=iG(t.fit);t.extent?e.fitExtent(t.extent,n):t.size&&e.fitSize(t.size,n)}function rG(e){const t=M9((e||"mercator").toLowerCase());return t||R("Unrecognized projection type: "+e),t()}function I3(e,t,n){le(e[t])&&e[t](n)}function iG(e){return e=Y(e),e.length===1?e[0]:{type:O9,features:e.reduce((t,n)=>t.concat(aG(n)),[])}}function aG(e){return e.type===O9?e.features:Y(e).filter(t=>t!=null).map(t=>t.type===Gb?t:{type:Gb,geometry:t})}const sG=Object.freeze(Object.defineProperty({__proto__:null,contour:D9,geojson:R9,geopath:L9,geopoint:P9,geoshape:I9,graticule:z9,heatmap:B9,isocontour:T9,kde2d:N9,projection:gC},Symbol.toStringTag,{value:"Module"}));function oG(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=0);function i(){var a,s=n.length,o,u=0,c=0;for(a=0;a=(f=(o+c)/2))?o=f:c=f,(m=n>=(d=(u+l)/2))?u=d:l=d,i=a,!(a=a[b=m<<1|p]))return i[b]=s,e;if(h=+e._x.call(null,a.data),g=+e._y.call(null,a.data),t===h&&n===g)return s.next=a,i?i[b]=s:e._root=s,e;do i=i?i[b]=new Array(4):e._root=new Array(4),(p=t>=(f=(o+c)/2))?o=f:c=f,(m=n>=(d=(u+l)/2))?u=d:l=d;while((b=m<<1|p)===(y=(g>=d)<<1|h>=f));return i[y]=a,i[b]=s,e}function cG(e){var t,n,r=e.length,i,a,s=new Array(r),o=new Array(r),u=1/0,c=1/0,l=-1/0,f=-1/0;for(n=0;nl&&(l=i),af&&(f=a));if(u>l||c>f)return this;for(this.cover(u,c).cover(l,f),n=0;ne||e>=i||r>t||t>=a;)switch(c=(tl||(o=g.y0)>f||(u=g.x1)=b)<<1|e>=m)&&(g=d[d.length-1],d[d.length-1]=d[d.length-1-p],d[d.length-1-p]=g)}else{var y=e-+this._x.call(null,h.data),v=t-+this._y.call(null,h.data),x=y*y+v*v;if(x=(d=(s+u)/2))?s=d:u=d,(p=f>=(h=(o+c)/2))?o=h:c=h,t=n,!(n=n[m=p<<1|g]))return this;if(!n.length)break;(t[m+1&3]||t[m+2&3]||t[m+3&3])&&(r=t,b=m)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):t?(a?t[m]=a:delete t[m],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[b]=n:this._root=n),this):(this._root=a,this)}function pG(e){for(var t=0,n=e.length;td.index){var k=h-S.x-S.vx,D=g-S.y-S.vy,A=k*k+D*D;Ah+F||Eg+F||wc.r&&(c.r=c[l].r)}function u(){if(t){var c,l=t.length,f;for(n=new Array(l),c=0;c[t(_,E,s),_])),x;for(m=0,o=new Array(b);m{}};function mC(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}rh.prototype=mC.prototype={constructor:rh,on:function(e,t){var n=this._,r=MG(e+"",n),i,a=-1,s=r.length;if(arguments.length<2){for(;++a0)for(var n=new Array(i),r=0,i,a;r=0&&e._call.call(void 0,t),e=e._next;--Lu}function j3(){io=(_0=Ql.now())+Xg,Lu=fl=0;try{DG()}finally{Lu=0,RG(),io=0}}function OG(){var e=Ql.now(),t=e-_0;t>bC&&(Xg-=t,_0=e)}function RG(){for(var e,t=x0,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:x0=n);dl=e,Yb(r)}function Yb(e){if(!Lu){fl&&(fl=clearTimeout(fl));var t=e-io;t>24?(e<1/0&&(fl=setTimeout(j3,e-Ql.now()-Xg)),Lc&&(Lc=clearInterval(Lc))):(Lc||(_0=Ql.now(),Lc=setInterval(OG,bC)),Lu=1,yC(j3))}}function LG(e,t,n){var r=new w0,i=t;return t==null?(r.restart(e,t,n),r):(r._restart=r.restart,r.restart=function(a,s,o){s=+s,o=o==null?q9():+o,r._restart(function u(c){c+=i,r._restart(u,i+=s,o),a(c)},s,o)},r.restart(e,t,n),r)}const PG=1664525,IG=1013904223,q3=4294967296;function zG(){let e=1;return()=>(e=(PG*e+IG)%q3)/q3}function BG(e){return e.x}function UG(e){return e.y}var jG=10,qG=Math.PI*(3-Math.sqrt(5));function WG(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,s=.6,o=new Map,u=vC(f),c=mC("tick","end"),l=zG();e==null&&(e=[]);function f(){d(),c.call("tick",t),n1?(m==null?o.delete(p):o.set(p,g(m)),t):o.get(p)},find:function(p,m,b){var y=0,v=e.length,x,_,E,w,S;for(b==null?b=1/0:b*=b,y=0;y1?(c.on(p,m),t):c.on(p)}}}function HG(){var e,t,n,r,i=tn(-30),a,s=1,o=1/0,u=.81;function c(h){var g,p=e.length,m=U9(e,BG,UG).visitAfter(f);for(r=h,g=0;g=o)return;(h.data!==t||h.next)&&(b===0&&(b=$a(n),x+=b*b),y===0&&(y=$a(n),x+=y*y),x=0;)n.tick();else if(n.stopped()&&n.restart(),!r)return t.StopPropagation}return this.finish(e,t)},finish(e,t){const n=t.dataflow;for(let o=this._argops,u=0,c=o.length,l;ue.touch(t).run()}function KG(e,t){const n=WG(e),r=n.stop,i=n.restart;let a=!1;return n.stopped=()=>a,n.restart=()=>(a=!1,i()),n.stop=()=>(a=!0,r()),_C(n,t,!0).on("end",()=>a=!0)}function _C(e,t,n,r){var i=Y(t.forces),a,s,o,u;for(a=0,s=Xb.length;at(r,n):t)}const eY=Object.freeze(Object.defineProperty({__proto__:null,force:W9},Symbol.toStringTag,{value:"Module"}));function tY(e,t){return e.parent===t.parent?1:2}function nY(e){return e.reduce(rY,0)/e.length}function rY(e,t){return e+t.x}function iY(e){return 1+e.reduce(aY,0)}function aY(e,t){return Math.max(e,t.y)}function sY(e){for(var t;t=e.children;)e=t[0];return e}function oY(e){for(var t;t=e.children;)e=t[t.length-1];return e}function uY(){var e=tY,t=1,n=1,r=!1;function i(a){var s,o=0;a.eachAfter(function(d){var h=d.children;h?(d.x=nY(h),d.y=iY(h)):(d.x=s?o+=e(d,s):0,d.y=0,s=d)});var u=sY(a),c=oY(a),l=u.x-e(u,c)/2,f=c.x+e(c,u)/2;return a.eachAfter(r?function(d){d.x=(d.x-a.x)*t,d.y=(a.y-d.y)*n}:function(d){d.x=(d.x-l)/(f-l)*t,d.y=(1-(a.y?d.y/a.y:1))*n})}return i.separation=function(a){return arguments.length?(e=a,i):e},i.size=function(a){return arguments.length?(r=!1,t=+a[0],n=+a[1],i):r?null:[t,n]},i.nodeSize=function(a){return arguments.length?(r=!0,t=+a[0],n=+a[1],i):r?[t,n]:null},i}function cY(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function lY(){return this.eachAfter(cY)}function fY(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function dY(e,t){for(var n=this,r=[n],i,a,s=-1;n=r.pop();)if(e.call(t,n,++s,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function hY(e,t){for(var n=this,r=[n],i=[],a,s,o,u=-1;n=r.pop();)if(i.push(n),a=n.children)for(s=0,o=a.length;s=0;)n+=r[i].value;t.value=n})}function mY(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function bY(e){for(var t=this,n=yY(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function yY(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function vY(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function xY(){return Array.from(this)}function _Y(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function wY(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*EY(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i=0;--o)i.push(a=s[o]=new Pu(s[o])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(wC)}function SY(){return H9(this).eachBefore(kY)}function $Y(e){return e.children}function AY(e){return Array.isArray(e)?e[1]:null}function kY(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function wC(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Pu(e){this.data=e,this.depth=this.height=0,this.parent=null}Pu.prototype=H9.prototype={constructor:Pu,count:lY,each:fY,eachAfter:hY,eachBefore:dY,find:gY,sum:pY,sort:mY,path:bY,ancestors:vY,descendants:xY,leaves:_Y,links:wY,copy:SY,[Symbol.iterator]:EY};function ih(e){return e==null?null:EC(e)}function EC(e){if(typeof e!="function")throw new Error;return e}function Os(){return 0}function Zo(e){return function(){return e}}const CY=1664525,FY=1013904223,H3=4294967296;function MY(){let e=1;return()=>(e=(CY*e+FY)%H3)/H3}function TY(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function NY(e,t){let n=e.length,r,i;for(;n;)i=t()*n--|0,r=e[n],e[n]=e[i],e[i]=r;return e}function DY(e,t){for(var n=0,r=(e=NY(Array.from(e),t)).length,i=[],a,s;n0&&n*n>r*r+i*i}function I1(e,t){for(var n=0;n1e-6?(k+Math.sqrt(k*k-4*F*D))/(2*F):D/k);return{x:r+E+w*A,y:i+S+$*A,r:A}}function G3(e,t,n){var r=e.x-t.x,i,a,s=e.y-t.y,o,u,c=r*r+s*s;c?(a=t.r+n.r,a*=a,u=e.r+n.r,u*=u,a>u?(i=(c+u-a)/(2*c),o=Math.sqrt(Math.max(0,u/c-i*i)),n.x=e.x-i*r-o*s,n.y=e.y-i*s+o*r):(i=(c+a-u)/(2*c),o=Math.sqrt(Math.max(0,a/c-i*i)),n.x=t.x+i*r-o*s,n.y=t.y+i*s+o*r)):(n.x=t.x+n.r,n.y=t.y)}function Y3(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function X3(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,a=(t.y*n.r+n.y*t.r)/r;return i*i+a*a}function Ad(e){this._=e,this.next=null,this.previous=null}function PY(e,t){if(!(a=(e=TY(e)).length))return 0;var n,r,i,a,s,o,u,c,l,f,d;if(n=e[0],n.x=0,n.y=0,!(a>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(a>2))return n.r+r.r;G3(r,n,i=e[2]),n=new Ad(n),r=new Ad(r),i=new Ad(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;e:for(u=3;uWY(n(x,_,i))),y=b.map(Z3),v=new Set(b).add("");for(const x of y)v.has(x)||(v.add(x),b.push(x),y.push(Z3(x)),a.push(B1));s=(x,_)=>b[_],o=(x,_)=>y[_]}for(l=0,u=a.length;l=0&&(h=a[b],h.data===B1);--b)h.data=null}if(f.parent=UY,f.eachBefore(function(b){b.depth=b.parent.depth+1,--u}).eachBefore(wC),f.parent=null,u>0)throw new Error("cycle");return f}return r.id=function(i){return arguments.length?(e=ih(i),r):e},r.parentId=function(i){return arguments.length?(t=ih(i),r):t},r.path=function(i){return arguments.length?(n=ih(i),r):n},r}function WY(e){e=`${e}`;let t=e.length;return Vb(e,t-1)&&!Vb(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function Z3(e){let t=e.length;if(t<2)return"";for(;--t>1&&!Vb(e,t););return e.slice(0,t)}function Vb(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if(!(n&1))return!0}return!1}function HY(e,t){return e.parent===t.parent?1:2}function U1(e){var t=e.children;return t?t[0]:e.t}function j1(e){var t=e.children;return t?t[t.length-1]:e.t}function GY(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function YY(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function XY(e,t,n){return e.a.parent===t.parent?e.a:n}function ah(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}ah.prototype=Object.create(Pu.prototype);function VY(e){for(var t=new ah(e,0),n,r=[t],i,a,s,o;n=r.pop();)if(a=n._.children)for(n.children=new Array(o=a.length),s=o-1;s>=0;--s)r.push(i=n.children[s]=new ah(a[s],s)),i.parent=n;return(t.parent=new ah(null,0)).children=[t],t}function KY(){var e=HY,t=1,n=1,r=null;function i(c){var l=VY(c);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(s),r)c.eachBefore(u);else{var f=c,d=c,h=c;c.eachBefore(function(y){y.xd.x&&(d=y),y.depth>h.depth&&(h=y)});var g=f===d?1:e(f,d)/2,p=g-f.x,m=t/(d.x+g+p),b=n/(h.depth||1);c.eachBefore(function(y){y.x=(y.x+p)*m,y.y=y.depth*b})}return c}function a(c){var l=c.children,f=c.parent.children,d=c.i?f[c.i-1]:null;if(l){YY(c);var h=(l[0].z+l[l.length-1].z)/2;d?(c.z=d.z+e(c._,d._),c.m=c.z-h):c.z=h}else d&&(c.z=d.z+e(c._,d._));c.parent.A=o(c,d,c.parent.A||f[0])}function s(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function o(c,l,f){if(l){for(var d=c,h=c,g=l,p=d.parent.children[0],m=d.m,b=h.m,y=g.m,v=p.m,x;g=j1(g),d=U1(d),g&&d;)p=U1(p),h=j1(h),h.a=c,x=g.z+y-d.z-m+e(g._,d._),x>0&&(GY(XY(g,c,f),c,x),m+=x,b+=x),y+=g.m,m+=d.m,v+=p.m,b+=h.m;g&&!j1(h)&&(h.t=g,h.m+=y-b),d&&!U1(p)&&(p.t=d,p.m+=m-v,f=c)}return f}function u(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}function Vg(e,t,n,r,i){for(var a=e.children,s,o=-1,u=a.length,c=e.value&&(i-n)/e.value;++oy&&(y=c),E=m*m*_,v=Math.max(y/E,E/b),v>x){m-=c;break}x=v}s.push(u={value:m,dice:h1?r:1)},n}(kC);function JY(){var e=FC,t=!1,n=1,r=1,i=[0],a=Os,s=Os,o=Os,u=Os,c=Os;function l(d){return d.x0=d.y0=0,d.x1=n,d.y1=r,d.eachBefore(f),i=[0],t&&d.eachBefore(AC),d}function f(d){var h=i[d.depth],g=d.x0+h,p=d.y0+h,m=d.x1-h,b=d.y1-h;m=d-1){var y=a[f];y.x0=g,y.y0=p,y.x1=m,y.y1=b;return}for(var v=c[f],x=h/2+v,_=f+1,E=d-1;_>>1;c[w]b-p){var F=h?(g*$+m*S)/h:m;l(f,_,S,g,p,F,b),l(_,d,$,F,p,m,b)}else{var k=h?(p*$+b*S)/h:b;l(f,_,S,g,p,m,k),l(_,d,$,g,k,m,b)}}}function ZY(e,t,n,r,i){(e.depth&1?Vg:Pf)(e,t,n,r,i)}const eX=function e(t){function n(r,i,a,s,o){if((u=r._squarify)&&u.ratio===t)for(var u,c,l,f,d=-1,h,g=u.length,p=r.value;++d1?r:1)},n}(kC);function Kb(e,t,n){const r={};return e.each(i=>{const a=i.data;n(a)&&(r[t(a)]=i)}),e.lookup=r,e}function G9(e){N.call(this,null,e)}G9.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const tX=e=>e.values;W(G9,N,{transform(e,t){t.source||R("Nest transform requires an upstream data source.");var n=e.generate,r=e.modified(),i=t.clone(),a=this.value;return(!a||r||t.changed())&&(a&&a.each(s=>{s.children&&ug(s.data)&&i.rem.push(s.data)}),this.value=a=H9({values:Y(e.keys).reduce((s,o)=>(s.key(o),s),nX()).entries(i.source)},tX),n&&a.each(s=>{s.children&&(s=Me(s.data),i.add.push(s),i.source.push(s))}),Kb(a,ne,ne)),i.source.root=a,i}});function nX(){const e=[],t={entries:i=>r(n(i,0),0),key:i=>(e.push(i),t)};function n(i,a){if(a>=e.length)return i;const s=i.length,o=e[a++],u={},c={};let l=-1,f,d,h;for(;++le.length)return i;const s=[];for(const o in i)s.push({key:o,values:r(i[o],a)});return s}return t}function ta(e){N.call(this,null,e)}const rX=(e,t)=>e.parent===t.parent?1:2;W(ta,N,{transform(e,t){(!t.source||!t.source.root)&&R(this.constructor.name+" transform requires a backing tree data source.");const n=this.layout(e.method),r=this.fields,i=t.source.root,a=e.as||r;e.field?i.sum(e.field):i.count(),e.sort&&i.sort(Eo(e.sort,s=>s.data)),iX(n,this.params,e),n.separation&&n.separation(e.separation!==!1?rX:Zu);try{this.value=n(i)}catch(s){R(s)}return i.each(s=>aX(s,r,a)),t.reflow(e.modified()).modifies(a).modifies("leaf")}});function iX(e,t,n){for(let r,i=0,a=t.length;ia[ne(s)]=1),r.each(s=>{const o=s.data,u=s.parent&&s.parent.data;u&&a[ne(o)]&&a[ne(u)]&&i.add.push(Me({source:u,target:o}))}),this.value=i.add):t.changed(t.MOD)&&(t.visit(t.MOD,s=>a[ne(s)]=1),n.forEach(s=>{(a[ne(s.source)]||a[ne(s.target)])&&i.mod.push(s)})),i}});const t5={binary:QY,dice:Pf,slice:Vg,slicedice:ZY,squarify:FC,resquarify:eX},ey=["x0","y0","x1","y1","depth","children"];function Q9(e){ta.call(this,e)}Q9.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:ey.length,default:ey}]};W(Q9,ta,{layout(){const e=JY();return e.ratio=t=>{const n=e.tile();n.ratio&&e.tile(n.ratio(t))},e.method=t=>{ie(t5,t)?e.tile(t5[t]):R("Unrecognized Treemap layout method: "+t)},e},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:ey});const sX=Object.freeze(Object.defineProperty({__proto__:null,nest:G9,pack:Y9,partition:X9,stratify:V9,tree:K9,treelinks:J9,treemap:Q9},Symbol.toStringTag,{value:"Module"})),q1=4278190080;function oX(e,t){const n=e.bitmap();return(t||[]).forEach(r=>n.set(e(r.boundary[0]),e(r.boundary[3]))),[n,void 0]}function uX(e,t,n,r,i){const a=e.width,s=e.height,o=r||i,u=Ta(a,s).getContext("2d"),c=Ta(a,s).getContext("2d"),l=o&&Ta(a,s).getContext("2d");n.forEach(S=>sh(u,S,!1)),sh(c,t,!1),o&&sh(l,t,!0);const f=W1(u,a,s),d=W1(c,a,s),h=o&&W1(l,a,s),g=e.bitmap(),p=o&&e.bitmap();let m,b,y,v,x,_,E,w;for(b=0;b{i.items.forEach(a=>sh(e,a.items,n))}):zn[r].draw(e,{items:n?t.map(cX):t})}function cX(e){const t=cg(e,{});return t.stroke&&t.strokeOpacity!==0||t.fill&&t.fillOpacity!==0?{...t,strokeOpacity:1,stroke:"#000",fillOpacity:0}:t}const ki=5,Yt=31,Zl=32,ma=new Uint32Array(Zl+1),mr=new Uint32Array(Zl+1);mr[0]=0;ma[0]=~mr[0];for(let e=1;e<=Zl;++e)mr[e]=mr[e-1]<<1|1,ma[e]=~mr[e];function lX(e,t){const n=new Uint32Array(~~((e*t+Zl)/Zl));function r(a,s){n[a]|=s}function i(a,s){n[a]&=s}return{array:n,get:(a,s)=>{const o=s*e+a;return n[o>>>ki]&1<<(o&Yt)},set:(a,s)=>{const o=s*e+a;r(o>>>ki,1<<(o&Yt))},clear:(a,s)=>{const o=s*e+a;i(o>>>ki,~(1<<(o&Yt)))},getRange:(a,s,o,u)=>{let c=u,l,f,d,h;for(;c>=s;--c)if(l=c*e+a,f=c*e+o,d=l>>>ki,h=f>>>ki,d===h){if(n[d]&ma[l&Yt]&mr[(f&Yt)+1])return!0}else{if(n[d]&ma[l&Yt]||n[h]&mr[(f&Yt)+1])return!0;for(let g=d+1;g{let c,l,f,d,h;for(;s<=u;++s)if(c=s*e+a,l=s*e+o,f=c>>>ki,d=l>>>ki,f===d)r(f,ma[c&Yt]&mr[(l&Yt)+1]);else for(r(f,ma[c&Yt]),r(d,mr[(l&Yt)+1]),h=f+1;h{let c,l,f,d,h;for(;s<=u;++s)if(c=s*e+a,l=s*e+o,f=c>>>ki,d=l>>>ki,f===d)i(f,mr[c&Yt]|ma[(l&Yt)+1]);else for(i(f,mr[c&Yt]),i(d,ma[(l&Yt)+1]),h=f+1;ha<0||s<0||u>=t||o>=e}}function fX(e,t,n){const r=Math.max(1,Math.sqrt(e*t/1e6)),i=~~((e+2*n+r)/r),a=~~((t+2*n+r)/r),s=o=>~~((o+n)/r);return s.invert=o=>o*r-n,s.bitmap=()=>lX(i,a),s.ratio=r,s.padding=n,s.width=e,s.height=t,s}function dX(e,t,n,r){const i=e.width,a=e.height;return function(s){const o=s.datum.datum.items[r].items,u=o.length,c=s.datum.fontSize,l=On.width(s.datum,s.datum.text);let f=0,d,h,g,p,m,b,y;for(let v=0;v=f&&(f=y,s.x=m,s.y=b);return m=l/2,b=c/2,d=s.x-m,h=s.x+m,g=s.y-b,p=s.y+b,s.align="center",d<0&&h<=i?s.align="left":0<=d&&ii||t-(s=r/2)<0||t+s>a}function Aa(e,t,n,r,i,a,s,o){const u=i*a/(r*2),c=e(t-u),l=e(t+u),f=e(n-(a=a/2)),d=e(n+a);return s.outOfBounds(c,f,l,d)||s.getRange(c,f,l,d)||o&&o.getRange(c,f,l,d)}function hX(e,t,n,r){const i=e.width,a=e.height,s=t[0],o=t[1];function u(c,l,f,d,h){const g=e.invert(c),p=e.invert(l);let m=f,b=a,y;if(!E0(g,p,d,h,i,a)&&!Aa(e,g,p,h,d,m,s,o)&&!Aa(e,g,p,h,d,h,s,null)){for(;b-m>=1;)y=(m+b)/2,Aa(e,g,p,h,d,y,s,o)?b=y:m=y;if(m>f)return[g,p,m,!0]}}return function(c){const l=c.datum.datum.items[r].items,f=l.length,d=c.datum.fontSize,h=On.width(c.datum,c.datum.text);let g=n?d:0,p=!1,m=!1,b=0,y,v,x,_,E,w,S,$,F,k,D,A,M,C,T,L,I;for(let z=0;zv&&(I=y,y=v,v=I),x>_&&(I=x,x=_,_=I),F=e(y),D=e(v),k=~~((F+D)/2),A=e(x),C=e(_),M=~~((A+C)/2),S=k;S>=F;--S)for($=M;$>=A;--$)L=u(S,$,g,h,d),L&&([c.x,c.y,g,p]=L);for(S=k;S<=D;++S)for($=M;$<=C;++$)L=u(S,$,g,h,d),L&&([c.x,c.y,g,p]=L);!p&&!n&&(T=Math.abs(v-y+_-x),E=(y+v)/2,w=(x+_)/2,T>=b&&!E0(E,w,h,d,i,a)&&!Aa(e,E,w,d,h,d,s,null)&&(b=T,c.x=E,c.y=w,m=!0))}return p||m?(E=h/2,w=d/2,s.setRange(e(c.x-E),e(c.y-w),e(c.x+E),e(c.y+w)),c.align="center",c.baseline="middle",!0):!1}}const gX=[-1,-1,1,1],pX=[-1,1,-1,1];function mX(e,t,n,r){const i=e.width,a=e.height,s=t[0],o=t[1],u=e.bitmap();return function(c){const l=c.datum.datum.items[r].items,f=l.length,d=c.datum.fontSize,h=On.width(c.datum,c.datum.text),g=[];let p=n?d:0,m=!1,b=!1,y=0,v,x,_,E,w,S,$,F,k,D,A,M;for(let C=0;C=1;)A=(k+D)/2,Aa(e,w,S,d,h,A,s,o)?D=A:k=A;k>p&&(c.x=w,c.y=S,p=k,m=!0)}}!m&&!n&&(M=Math.abs(x-v+E-_),w=(v+x)/2,S=(_+E)/2,M>=y&&!E0(w,S,h,d,i,a)&&!Aa(e,w,S,d,h,d,s,null)&&(y=M,c.x=w,c.y=S,b=!0))}return m||b?(w=h/2,S=d/2,s.setRange(e(c.x-w),e(c.y-S),e(c.x+w),e(c.y+S)),c.align="center",c.baseline="middle",!0):!1}}const bX=["right","center","left"],yX=["bottom","middle","top"];function vX(e,t,n,r){const i=e.width,a=e.height,s=t[0],o=t[1],u=r.length;return function(c){const l=c.boundary,f=c.datum.fontSize;if(l[2]<0||l[5]<0||l[0]>i||l[3]>a)return!1;let d=c.textWidth??0,h,g,p,m,b,y,v,x,_,E,w,S,$,F,k;for(let D=0;D>>2&3)-1,p=h===0&&g===0||r[D]<0,m=h&&g?Math.SQRT1_2:1,b=r[D]<0?-1:1,y=l[1+h]+r[D]*h*m,w=l[4+g]+b*f*g/2+r[D]*g*m,x=w-f/2,_=w+f/2,S=e(y),F=e(x),k=e(_),!d)if(n5(S,S,F,k,s,o,y,y,x,_,l,p))d=On.width(c.datum,c.datum.text);else continue;if(E=y+b*d*h/2,y=E-d/2,v=E+d/2,S=e(y),$=e(v),n5(S,$,F,k,s,o,y,v,x,_,l,p))return c.x=h?h*b<0?v:y:E,c.y=g?g*b<0?_:x:w,c.align=bX[h*b+1],c.baseline=yX[g*b+1],s.setRange(S,F,$,k),!0}return!1}}function n5(e,t,n,r,i,a,s,o,u,c,l,f){return!(i.outOfBounds(e,n,t,r)||(f&&a||i).getRange(e,n,t,r))}const H1=0,G1=4,Y1=8,X1=0,V1=1,K1=2,xX={"top-left":H1+X1,top:H1+V1,"top-right":H1+K1,left:G1+X1,middle:G1+V1,right:G1+K1,"bottom-left":Y1+X1,bottom:Y1+V1,"bottom-right":Y1+K1},_X={naive:dX,"reduced-search":hX,floodfill:mX};function wX(e,t,n,r,i,a,s,o,u,c,l){if(!e.length)return e;const f=Math.max(r.length,i.length),d=EX(r,f),h=SX(i,f),g=$X(e[0].datum),p=g==="group"&&e[0].datum.items[u].marktype,m=p==="area",b=AX(g,p,o,u),y=c===null||c===1/0,v=m&&l==="naive";let x=-1,_=-1;const E=e.map(F=>{const k=y?On.width(F,F.text):void 0;return x=Math.max(x,k),_=Math.max(_,F.fontSize),{datum:F,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:b(F),textWidth:k}});c=c===null||c===1/0?Math.max(x,_)+Math.max(...r):c;const w=fX(t[0],t[1],c);let S;if(!v){n&&E.sort((D,A)=>n(D.datum,A.datum));let F=!1;for(let D=0;DD.datum);S=a.length||k?uX(w,k||[],a,F,m):oX(w,s&&E)}const $=m?_X[l](w,S,s,u):vX(w,S,h,d);return E.forEach(F=>F.opacity=+$(F)),E}function EX(e,t){const n=new Float64Array(t),r=e.length;for(let i=0;i[a.x,a.x,a.x,a.y,a.y,a.y];return e?e==="line"||e==="area"?a=>i(a.datum):t==="line"?a=>{const s=a.datum.items[r].items;return i(s.length?s[n==="start"?0:s.length-1]:{x:NaN,y:NaN})}:a=>{const s=a.datum.bounds;return[s.x1,(s.x1+s.x2)/2,s.x2,s.y1,(s.y1+s.y2)/2,s.y2]}:i}const ty=["x","y","opacity","align","baseline"],MC=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function Z9(e){N.call(this,null,e)}Z9.Definition={type:"Label",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"sort",type:"compare"},{name:"anchor",type:"string",array:!0,default:MC},{name:"offset",type:"number",array:!0,default:[1]},{name:"padding",type:"number",default:0,null:!0},{name:"lineAnchor",type:"string",values:["start","end"],default:"end"},{name:"markIndex",type:"number",default:0},{name:"avoidBaseMark",type:"boolean",default:!0},{name:"avoidMarks",type:"data",array:!0},{name:"method",type:"string",default:"naive"},{name:"as",type:"string",array:!0,length:ty.length,default:ty}]};W(Z9,N,{transform(e,t){function n(a){const s=e[a];return le(s)&&t.modified(s.fields)}const r=e.modified();if(!(r||t.changed(t.ADD_REM)||n("sort")))return;(!e.size||e.size.length!==2)&&R("Size parameter should be specified as a [width, height] array.");const i=e.as||ty;return wX(t.materialize(t.SOURCE).source||[],e.size,e.sort,Y(e.offset==null?1:e.offset),Y(e.anchor||MC),e.avoidMarks||[],e.avoidBaseMark!==!1,e.lineAnchor||"end",e.markIndex||0,e.padding===void 0?0:e.padding,e.method||"naive").forEach(a=>{const s=a.datum;s[i[0]]=a.x,s[i[1]]=a.y,s[i[2]]=a.opacity,s[i[3]]=a.align,s[i[4]]=a.baseline}),t.reflow(r).modifies(i)}});const kX=Object.freeze(Object.defineProperty({__proto__:null,label:Z9},Symbol.toStringTag,{value:"Module"}));function TC(e,t){var n=[],r=function(l){return l(o)},i,a,s,o,u,c;if(t==null)n.push(e);else for(i={},a=0,s=e.length;a{jE(c,e.x,e.y,e.bandwidth||.3).forEach(l=>{const f={};for(let d=0;de==="poly"?t:e==="quad"?2:1;function t7(e){N.call(this,null,e)}t7.Definition={type:"Regression",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"string",default:"linear",values:Object.keys(ny)},{name:"order",type:"number",default:3},{name:"extent",type:"number",array:!0,length:2},{name:"params",type:"boolean",default:!1},{name:"as",type:"string",array:!0}]};W(t7,N,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const r=t.materialize(t.SOURCE).source,i=TC(r,e.groupby),a=(e.groupby||[]).map(Je),s=e.method||"linear",o=e.order==null?3:e.order,u=CX(s,o),c=e.as||[Je(e.x),Je(e.y)],l=ny[s],f=[];let d=e.extent;ie(ny,s)||R("Invalid regression method: "+s),d!=null&&s==="log"&&d[0]<=0&&(t.dataflow.warn("Ignoring extent with values <= 0 for log regression."),d=null),i.forEach(h=>{if(h.length<=u){t.dataflow.warn("Skipping regression with more parameters than data points.");return}const p=l(h,e.x,e.y,o);if(e.params){f.push(Me({keys:h.dims,coef:p.coef,rSquared:p.rSquared}));return}const m=d||ri(h,e.x),b=y=>{const v={};for(let x=0;xb([y,p.predict(y)])):mg(p.predict,m,25,200).forEach(b)}),this.value&&(n.rem=this.value),this.value=n.add=n.source=f}return n}});const FX=Object.freeze(Object.defineProperty({__proto__:null,loess:e7,regression:t7},Symbol.toStringTag,{value:"Module"})),Wi=11102230246251565e-32,Nt=134217729,MX=(3+8*Wi)*Wi;function J1(e,t,n,r,i){let a,s,o,u,c=t[0],l=r[0],f=0,d=0;l>c==l>-c?(a=c,c=t[++f]):(a=l,l=r[++d]);let h=0;if(fc==l>-c?(s=c+a,o=a-(s-c),c=t[++f]):(s=l+a,o=a-(s-l),l=r[++d]),a=s,o!==0&&(i[h++]=o);fc==l>-c?(s=a+c,u=s-a,o=a-(s-u)+(c-u),c=t[++f]):(s=a+l,u=s-a,o=a-(s-u)+(l-u),l=r[++d]),a=s,o!==0&&(i[h++]=o);for(;f=M||-A>=M||(f=e-$,o=e-($+f)+(f-i),f=n-F,c=n-(F+f)+(f-i),f=t-k,u=t-(k+f)+(f-a),f=r-D,l=r-(D+f)+(f-a),o===0&&u===0&&c===0&&l===0)||(M=OX*s+MX*Math.abs(A),A+=$*l+D*o-(k*c+F*u),A>=M||-A>=M))return A;x=o*D,d=Nt*o,h=d-(d-o),g=o-h,d=Nt*D,p=d-(d-D),m=D-p,_=g*m-(x-h*p-g*p-h*m),E=u*F,d=Nt*u,h=d-(d-u),g=u-h,d=Nt*F,p=d-(d-F),m=F-p,w=g*m-(E-h*p-g*p-h*m),b=_-w,f=_-b,Xt[0]=_-(b+f)+(f-w),y=x+b,f=y-x,v=x-(y-f)+(b-f),b=v-E,f=v-b,Xt[1]=v-(b+f)+(f-E),S=y+b,f=S-y,Xt[2]=y-(S-f)+(b-f),Xt[3]=S;const C=J1(4,Ho,4,Xt,r5);x=$*l,d=Nt*$,h=d-(d-$),g=$-h,d=Nt*l,p=d-(d-l),m=l-p,_=g*m-(x-h*p-g*p-h*m),E=k*c,d=Nt*k,h=d-(d-k),g=k-h,d=Nt*c,p=d-(d-c),m=c-p,w=g*m-(E-h*p-g*p-h*m),b=_-w,f=_-b,Xt[0]=_-(b+f)+(f-w),y=x+b,f=y-x,v=x-(y-f)+(b-f),b=v-E,f=v-b,Xt[1]=v-(b+f)+(f-E),S=y+b,f=S-y,Xt[2]=y-(S-f)+(b-f),Xt[3]=S;const T=J1(C,r5,4,Xt,i5);x=o*l,d=Nt*o,h=d-(d-o),g=o-h,d=Nt*l,p=d-(d-l),m=l-p,_=g*m-(x-h*p-g*p-h*m),E=u*c,d=Nt*u,h=d-(d-u),g=u-h,d=Nt*c,p=d-(d-c),m=c-p,w=g*m-(E-h*p-g*p-h*m),b=_-w,f=_-b,Xt[0]=_-(b+f)+(f-w),y=x+b,f=y-x,v=x-(y-f)+(b-f),b=v-E,f=v-b,Xt[1]=v-(b+f)+(f-E),S=y+b,f=S-y,Xt[2]=y-(S-f)+(b-f),Xt[3]=S;const L=J1(T,i5,4,Xt,a5);return a5[L-1]}function kd(e,t,n,r,i,a){const s=(t-a)*(n-i),o=(e-i)*(r-a),u=s-o,c=Math.abs(s+o);return Math.abs(u)>=NX*c?u:-RX(e,t,n,r,i,a,c)}const s5=Math.pow(2,-52),Cd=new Uint32Array(512);class S0{static from(t,n=BX,r=UX){const i=t.length,a=new Float64Array(i*2);for(let s=0;s>1;if(n>0&&typeof t[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=t;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:a}=this,s=t.length>>1;let o=1/0,u=1/0,c=-1/0,l=-1/0;for(let $=0;$c&&(c=F),k>l&&(l=k),this._ids[$]=$}const f=(o+c)/2,d=(u+l)/2;let h,g,p;for(let $=0,F=1/0;$0&&(g=$,F=k)}let y=t[2*g],v=t[2*g+1],x=1/0;for(let $=0;$D&&($[F++]=A,D=M)}this.hull=$.subarray(0,F),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(kd(m,b,y,v,_,E)<0){const $=g,F=y,k=v;g=p,y=_,v=E,p=$,_=F,E=k}const w=zX(m,b,y,v,_,E);this._cx=w.x,this._cy=w.y;for(let $=0;$0&&Math.abs(A-F)<=s5&&Math.abs(M-k)<=s5||(F=A,k=M,D===h||D===g||D===p))continue;let C=0;for(let Z=0,ee=this._hashKey(A,M);Z=0;)if(T=L,T===C){T=-1;break}if(T===-1)continue;let I=this._addTriangle(T,D,r[T],-1,-1,i[T]);i[D]=this._legalize(I+2),i[T]=I,S++;let z=r[T];for(;L=r[z],kd(A,M,t[2*z],t[2*z+1],t[2*L],t[2*L+1])<0;)I=this._addTriangle(z,D,L,i[D],-1,i[z]),i[D]=this._legalize(I+2),r[z]=z,S--,z=L;if(T===C)for(;L=n[T],kd(A,M,t[2*L],t[2*L+1],t[2*T],t[2*T+1])<0;)I=this._addTriangle(L,D,T,-1,i[T],i[L]),this._legalize(I+2),i[L]=I,r[T]=T,S--,T=L;this._hullStart=n[D]=T,r[T]=n[z]=D,r[D]=z,a[this._hashKey(A,M)]=D,a[this._hashKey(t[2*T],t[2*T+1])]=T}this.hull=new Uint32Array(S);for(let $=0,F=this._hullStart;$0?3-n:1+n)/4}function Q1(e,t,n,r){const i=e-n,a=t-r;return i*i+a*a}function PX(e,t,n,r,i,a,s,o){const u=e-s,c=t-o,l=n-s,f=r-o,d=i-s,h=a-o,g=u*u+c*c,p=l*l+f*f,m=d*d+h*h;return u*(f*m-p*h)-c*(l*m-p*d)+g*(l*h-f*d)<0}function IX(e,t,n,r,i,a){const s=n-e,o=r-t,u=i-e,c=a-t,l=s*s+o*o,f=u*u+c*c,d=.5/(s*c-o*u),h=(c*l-o*f)*d,g=(s*f-u*l)*d;return h*h+g*g}function zX(e,t,n,r,i,a){const s=n-e,o=r-t,u=i-e,c=a-t,l=s*s+o*o,f=u*u+c*c,d=.5/(s*c-o*u),h=e+(c*l-o*f)*d,g=t+(s*f-u*l)*d;return{x:h,y:g}}function su(e,t,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const a=e[i],s=t[a];let o=i-1;for(;o>=n&&t[e[o]]>s;)e[o+1]=e[o--];e[o+1]=a}else{const i=n+r>>1;let a=n+1,s=r;Pc(e,i,a),t[e[n]]>t[e[r]]&&Pc(e,n,r),t[e[a]]>t[e[r]]&&Pc(e,a,r),t[e[n]]>t[e[a]]&&Pc(e,n,a);const o=e[a],u=t[o];for(;;){do a++;while(t[e[a]]u);if(s=s-n?(su(e,t,a,r),su(e,t,n,s-1)):(su(e,t,n,s-1),su(e,t,a,r))}}function Pc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function BX(e){return e[0]}function UX(e){return e[1]}const o5=1e-6;class zs{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,r){t=+t,n=+n,r=+r;const i=t+r,a=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${a}`:(Math.abs(this._x1-i)>o5||Math.abs(this._y1-a)>o5)&&(this._+="L"+i+","+a),r&&(this._+=`A${r},${r},0,1,1,${t-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=a}`)}rect(t,n,r,i){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class ry{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}let jX=class{constructor(t,[n,r,i,a]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((a=+a)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(t.points.length*2),this.vectors=new Float64Array(t.points.length*2),this.xmax=i,this.xmin=n,this.ymax=a,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:r},vectors:i}=this;let a,s;const o=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let p=0,m=0,b=r.length,y,v;p1;)a-=2;for(let s=2;s0){if(n>=this.ymax)return null;(s=(this.ymax-n)/i)0){if(t>=this.xmax)return null;(s=(this.xmax-t)/r)this.xmax?2:0)|(nthis.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let n=0;n1e-10)return!1}return!0}function YX(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class n7{static from(t,n=WX,r=HX,i){return new n7("length"in t?XX(t,n,r,i):Float64Array.from(VX(t,n,r,i)))}constructor(t){this._delaunator=new S0(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,n=this.points;if(t.hull&&t.hull.length>2&&GX(t)){this.collinear=Int32Array.from({length:n.length/2},(d,h)=>h).sort((d,h)=>n[2*d]-n[2*h]||n[2*d+1]-n[2*h+1]);const u=this.collinear[0],c=this.collinear[this.collinear.length-1],l=[n[2*u],n[2*u+1],n[2*c],n[2*c+1]],f=1e-8*Math.hypot(l[3]-l[1],l[2]-l[0]);for(let d=0,h=n.length/2;d0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],s[i[0]]=1,i.length===2&&(s[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(t){return new jX(this,t)}*neighbors(t){const{inedges:n,hull:r,_hullIndex:i,halfedges:a,triangles:s,collinear:o}=this;if(o){const f=o.indexOf(t);f>0&&(yield o[f-1]),f=0&&a!==r&&a!==i;)r=a;return a}_step(t,n,r){const{inedges:i,hull:a,_hullIndex:s,halfedges:o,triangles:u,points:c}=this;if(i[t]===-1||!c.length)return(t+1)%(c.length>>1);let l=t,f=Go(n-c[t*2],2)+Go(r-c[t*2+1],2);const d=i[t];let h=d;do{let g=u[h];const p=Go(n-c[g*2],2)+Go(r-c[g*2+1],2);if(p>5)*e[1]),m=null,b=c.length,y=-1,v=[],x=c.map(E=>({text:t(E),font:n(E),style:i(E),weight:a(E),rotate:s(E),size:~~(r(E)+1e-14),padding:o(E),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:E})).sort((E,w)=>w.size-E.size);++y>1,_.y=e[1]*(l()+.5)>>1,tV(g,_,x,y),_.hasText&&h(p,_,m)&&(v.push(_),m?rV(m,_):m=[{x:_.x+_.x0,y:_.y+_.y0},{x:_.x+_.x1,y:_.y+_.y1}],_.x-=e[0]>>1,_.y-=e[1]>>1)}return v};function d(g){g.width=g.height=1;var p=Math.sqrt(g.getContext("2d").getImageData(0,0,1,1).data.length>>2);g.width=(pl<<5)/p,g.height=oh/p;var m=g.getContext("2d");return m.fillStyle=m.strokeStyle="red",m.textAlign="center",{context:m,ratio:p}}function h(g,p,m){for(var b=p.x,y=p.y,v=Math.sqrt(e[0]*e[0]+e[1]*e[1]),x=u(e),_=l()<.5?1:-1,E=-_,w,S,$;(w=x(E+=_))&&(S=~~w[0],$=~~w[1],!(Math.min(Math.abs(S),Math.abs($))>=v));)if(p.x=b+S,p.y=y+$,!(p.x+p.x0<0||p.y+p.y0<0||p.x+p.x1>e[0]||p.y+p.y1>e[1])&&(!m||!nV(p,g,e[0]))&&(!m||iV(p,m))){for(var F=p.sprite,k=p.width>>5,D=e[0]>>5,A=p.x-(k<<4),M=A&127,C=32-M,T=p.y1-p.y0,L=(p.y+p.y0)*D+(A>>5),I,z=0;z>>M:0);L+=D}return p.sprite=null,!0}return!1}return f.words=function(g){return arguments.length?(c=g,f):c},f.size=function(g){return arguments.length?(e=[+g[0],+g[1]],f):e},f.font=function(g){return arguments.length?(n=bs(g),f):n},f.fontStyle=function(g){return arguments.length?(i=bs(g),f):i},f.fontWeight=function(g){return arguments.length?(a=bs(g),f):a},f.rotate=function(g){return arguments.length?(s=bs(g),f):s},f.text=function(g){return arguments.length?(t=bs(g),f):t},f.spiral=function(g){return arguments.length?(u=oV[g]||g,f):u},f.fontSize=function(g){return arguments.length?(r=bs(g),f):r},f.padding=function(g){return arguments.length?(o=bs(g),f):o},f.random=function(g){return arguments.length?(l=g,f):l},f}function tV(e,t,n,r){if(!t.sprite){var i=e.context,a=e.ratio;i.clearRect(0,0,(pl<<5)/a,oh/a);var s=0,o=0,u=0,c=n.length,l,f,d,h,g;for(--r;++r>5<<5,d=~~Math.max(Math.abs(y+v),Math.abs(y-v))}else l=l+31>>5<<5;if(d>u&&(u=d),s+l>=pl<<5&&(s=0,o+=u,u=0),o+d>=oh)break;i.translate((s+(l>>1))/a,(o+(d>>1))/a),t.rotate&&i.rotate(t.rotate*Z1),i.fillText(t.text,0,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,0,0)),i.restore(),t.width=l,t.height=d,t.xoff=s,t.yoff=o,t.x1=l>>1,t.y1=d>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,s+=l}for(var _=i.getImageData(0,0,(pl<<5)/a,oh/a).data,E=[];--r>=0;)if(t=n[r],!!t.hasText){for(l=t.width,f=l>>5,d=t.y1-t.y0,h=0;h>5),F=_[(o+g)*(pl<<5)+(s+h)<<2]?1<<31-h%32:0;E[$]|=F,w|=F}w?S=g:(t.y0++,d--,g--,o++)}t.y1=t.y0+S,t.sprite=E.slice(0,(t.y1-t.y0)*f)}}}function nV(e,t,n){n>>=5;for(var r=e.sprite,i=e.width>>5,a=e.x-(i<<4),s=a&127,o=32-s,u=e.y1-e.y0,c=(e.y+e.y0)*n+(a>>5),l,f=0;f>>s:0))&t[c+d])return!0;c+=n}return!1}function rV(e,t){var n=e[0],r=e[1];t.x+t.x0r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function iV(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0t[0].y&&e.y+e.y0p(g(m))}i.forEach(g=>{g[s[0]]=NaN,g[s[1]]=NaN,g[s[3]]=0});const c=a.words(i).text(e.text).size(e.size||[500,500]).padding(e.padding||1).spiral(e.spiral||"archimedean").rotate(e.rotate||0).font(e.font||"sans-serif").fontStyle(e.fontStyle||"normal").fontWeight(e.fontWeight||"normal").fontSize(o).random(nr).layout(),l=a.size(),f=l[0]>>1,d=l[1]>>1,h=c.length;for(let g=0,p,m;gnew Uint8Array(e),fV=e=>new Uint16Array(e),Cl=e=>new Uint32Array(e);function dV(){let e=8,t=[],n=Cl(0),r=Fd(0,e),i=Fd(0,e);return{data:()=>t,seen:()=>n=hV(n,t.length),add(a){for(let s=0,o=t.length,u=a.length,c;st.length,curr:()=>r,prev:()=>i,reset:a=>i[a]=r[a],all:()=>e<257?255:e<65537?65535:4294967295,set(a,s){r[a]|=s},clear(a,s){r[a]&=~s},resize(a,s){const o=r.length;(a>o||s>e)&&(e=Math.max(s,e),r=Fd(a,e,r),i=Fd(a,e))}}}function hV(e,t,n){return e.length>=t?e:(n=n||new e.constructor(t),n.set(e),n)}function Fd(e,t,n){const r=(t<257?lV:t<65537?fV:Cl)(e);return n&&r.set(n),r}function u5(e,t,n){const r=1<0)for(m=0;me,size:()=>n}}function gV(e,t){return e.sort.call(t,(n,r)=>{const i=e[n],a=e[r];return ia?1:0}),NO(e,t)}function pV(e,t,n,r,i,a,s,o,u){let c=0,l=0,f;for(f=0;ct.modified(r.fields));return n?this.reinit(e,t):this.eval(e,t)}else return this.init(e,t)},init(e,t){const n=e.fields,r=e.query,i=this._indices={},a=this._dims=[],s=r.length;let o=0,u,c;for(;o{const a=i.remove(t,n);for(const s in r)r[s].reindex(a)})},update(e,t,n){const r=this._dims,i=e.query,a=t.stamp,s=r.length;let o=0,u,c;for(n.filters=0,c=0;ch)for(m=h,b=Math.min(f,g);mg)for(m=Math.max(f,g),b=d;mf)for(g=f,p=Math.min(c,d);gd)for(g=Math.max(c,d),p=l;go[l]&n?null:s[l];return a.filter(a.MOD,c),i&i-1?(a.filter(a.ADD,l=>{const f=o[l]&n;return!f&&f^u[l]&n?s[l]:null}),a.filter(a.REM,l=>{const f=o[l]&n;return f&&!(f^(f^u[l]&n))?s[l]:null})):(a.filter(a.ADD,c),a.filter(a.REM,l=>(o[l]&n)===i?s[l]:null)),a.filter(a.SOURCE,l=>c(l._index))}});const mV=Object.freeze(Object.defineProperty({__proto__:null,crossfilter:a7,resolvefilter:s7},Symbol.toStringTag,{value:"Module"})),bV="RawCode",ao="Literal",yV="Property",vV="Identifier",xV="ArrayExpression",_V="BinaryExpression",OC="CallExpression",wV="ConditionalExpression",EV="LogicalExpression",SV="MemberExpression",$V="ObjectExpression",AV="UnaryExpression";function Tr(e){this.type=e}Tr.prototype.visit=function(e){let t,n,r;if(e(this))return 1;for(t=kV(this),n=0,r=t.length;n";mi[so]="Identifier";mi[is]="Keyword";mi[Jg]="Null";mi[ko]="Numeric";mi[dn]="Punctuator";mi[Bf]="String";mi[CV]="RegularExpression";var FV="ArrayExpression",MV="BinaryExpression",TV="CallExpression",NV="ConditionalExpression",RC="Identifier",DV="Literal",OV="LogicalExpression",RV="MemberExpression",LV="ObjectExpression",PV="Property",IV="UnaryExpression",pt="Unexpected token %0",zV="Unexpected number",BV="Unexpected string",UV="Unexpected identifier",jV="Unexpected reserved word",qV="Unexpected end of input",iy="Invalid regular expression",em="Invalid regular expression: missing /",LC="Octal literals are not allowed in strict mode.",WV="Duplicate data property in object literal not allowed in strict mode",$t="ILLEGAL",ef="Disabled.",HV=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),GV=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function Qg(e,t){if(!e)throw new Error("ASSERT: "+t)}function Ni(e){return e>=48&&e<=57}function o7(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function Fl(e){return"01234567".indexOf(e)>=0}function YV(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function tf(e){return e===10||e===13||e===8232||e===8233}function Uf(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&HV.test(String.fromCharCode(e))}function $0(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&GV.test(String.fromCharCode(e))}const XV={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function PC(){for(;O1114111||e!=="}")&&Se({},pt,$t),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,r=(t-65536&1023)+56320,String.fromCharCode(n,r))}function IC(){var e,t;for(e=J.charCodeAt(O++),t=String.fromCharCode(e),e===92&&(J.charCodeAt(O)!==117&&Se({},pt,$t),++O,e=ay("u"),(!e||e==="\\"||!Uf(e.charCodeAt(0)))&&Se({},pt,$t),t=e);O>>=")return O+=4,{type:dn,value:s,start:e,end:O};if(a=s.substr(0,3),a===">>>"||a==="<<="||a===">>=")return O+=3,{type:dn,value:a,start:e,end:O};if(i=a.substr(0,2),r===i[1]&&"+-<>&|".indexOf(r)>=0||i==="=>")return O+=2,{type:dn,value:i,start:e,end:O};if(i==="//"&&Se({},pt,$t),"<>=!+-*%&|^/".indexOf(r)>=0)return++O,{type:dn,value:r,start:e,end:O};Se({},pt,$t)}function QV(e){let t="";for(;O=0&&O=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(r,i)=>{if(parseInt(i,16)<=1114111)return"x";Se({},iy)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{Se({},iy)}try{return new RegExp(e,t)}catch{return null}}function nK(){var e,t,n,r,i;for(e=J[O],Qg(e==="/","Regular expression literal must start with a slash"),t=J[O++],n=!1,r=!1;O=0&&Se({},iy,n),{value:n,literal:t}}function iK(){var e,t,n,r;return Ne=null,PC(),e=O,t=nK(),n=rK(),r=tK(t.value,n.value),{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},start:e,end:O}}function aK(e){return e.type===so||e.type===is||e.type===Kg||e.type===Jg}function zC(){if(PC(),O>=jt)return{type:zf,start:O,end:O};const e=J.charCodeAt(O);return Uf(e)?JV():e===40||e===41||e===59?tm():e===39||e===34?eK():e===46?Ni(J.charCodeAt(O+1))?l5():tm():Ni(e)?l5():tm()}function pn(){const e=Ne;return O=e.end,Ne=zC(),O=e.end,e}function BC(){const e=O;Ne=zC(),O=e}function sK(e){const t=new Tr(FV);return t.elements=e,t}function f5(e,t,n){const r=new Tr(e==="||"||e==="&&"?OV:MV);return r.operator=e,r.left=t,r.right=n,r}function oK(e,t){const n=new Tr(TV);return n.callee=e,n.arguments=t,n}function uK(e,t,n){const r=new Tr(NV);return r.test=e,r.consequent=t,r.alternate=n,r}function u7(e){const t=new Tr(RC);return t.name=e,t}function ml(e){const t=new Tr(DV);return t.value=e.value,t.raw=J.slice(e.start,e.end),e.regex&&(t.raw==="//"&&(t.raw="/(?:)/"),t.regex=e.regex),t}function d5(e,t,n){const r=new Tr(RV);return r.computed=e==="[",r.object=t,r.property=n,r.computed||(n.member=!0),r}function cK(e){const t=new Tr(LV);return t.properties=e,t}function h5(e,t,n){const r=new Tr(PV);return r.key=t,r.value=n,r.kind=e,r}function lK(e,t){const n=new Tr(IV);return n.operator=e,n.argument=t,n.prefix=!0,n}function Se(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,(a,s)=>(Qg(s":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11;break}return t}function wK(){var e,t,n,r,i,a,s,o,u,c;if(e=Ne,u=uh(),r=Ne,i=m5(r),i===0)return u;for(r.prec=i,pn(),t=[e,Ne],s=uh(),a=[u,r,s];(i=m5(Ne))>0;){for(;a.length>2&&i<=a[a.length-2].prec;)s=a.pop(),o=a.pop().value,u=a.pop(),t.pop(),n=f5(o,u,s),a.push(n);r=pn(),r.prec=i,a.push(r),t.push(Ne),n=uh(),a.push(n)}for(c=a.length-1,n=a[c],t.pop();c>1;)t.pop(),n=f5(a[c-1].value,a[c-2],n),c-=2;return n}function oo(){var e,t,n;return e=wK(),Ue("?")&&(pn(),t=oo(),qt(":"),n=oo(),e=uK(e,t,n)),e}function c7(){const e=oo();if(Ue(","))throw new Error(ef);return e}function l7(e){J=e,O=0,jt=J.length,Ne=null,BC();const t=c7();if(Ne.type!==zf)throw new Error("Unexpect token after expression.");return t}var UC={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function jC(e){function t(s,o,u,c){let l=e(o[0]);return u&&(l=u+"("+l+")",u.lastIndexOf("new ",0)===0&&(l="("+l+")")),l+"."+s+(c<0?"":c===0?"()":"("+o.slice(1).map(e).join(",")+")")}function n(s,o,u){return c=>t(s,c,o,u)}const r="new Date",i="String",a="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(s){s.length<3&&R("Missing arguments to clamp function."),s.length>3&&R("Too many arguments to clamp function.");const o=s.map(e);return"Math.max("+o[1]+", Math.min("+o[2]+","+o[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:r,date:n("getDate",r,0),day:n("getDay",r,0),year:n("getFullYear",r,0),month:n("getMonth",r,0),hours:n("getHours",r,0),minutes:n("getMinutes",r,0),seconds:n("getSeconds",r,0),milliseconds:n("getMilliseconds",r,0),time:n("getTime",r,0),timezoneoffset:n("getTimezoneOffset",r,0),utcdate:n("getUTCDate",r,0),utcday:n("getUTCDay",r,0),utcyear:n("getUTCFullYear",r,0),utcmonth:n("getUTCMonth",r,0),utchours:n("getUTCHours",r,0),utcminutes:n("getUTCMinutes",r,0),utcseconds:n("getUTCSeconds",r,0),utcmilliseconds:n("getUTCMilliseconds",r,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",i,0),lower:n("toLowerCase",i,0),substring:n("substring",i),split:n("split",i),trim:n("trim",i,0),regexp:a,test:n("test",a),if:function(s){s.length<3&&R("Missing arguments to if function."),s.length>3&&R("Too many arguments to if function.");const o=s.map(e);return"("+o[0]+"?"+o[1]+":"+o[2]+")"}}}function EK(e){const t=e&&e.length-1;return t&&(e[0]==='"'&&e[t]==='"'||e[0]==="'"&&e[t]==="'")?e.slice(1,-1):e}function qC(e){e=e||{};const t=e.allowed?Ar(e.allowed):{},n=e.forbidden?Ar(e.forbidden):{},r=e.constants||UC,i=(e.functions||jC)(f),a=e.globalvar,s=e.fieldvar,o=le(a)?a:g=>`${a}["${g}"]`;let u={},c={},l=0;function f(g){if(X(g))return g;const p=d[g.type];return p==null&&R("Unsupported type: "+g.type),p(g)}const d={Literal:g=>g.raw,Identifier:g=>{const p=g.name;return l>0?p:ie(n,p)?R("Illegal identifier: "+p):ie(r,p)?r[p]:ie(t,p)?p:(u[p]=1,o(p))},MemberExpression:g=>{const p=!g.computed,m=f(g.object);p&&(l+=1);const b=f(g.property);return m===s&&(c[EK(b)]=1),p&&(l-=1),m+(p?"."+b:"["+b+"]")},CallExpression:g=>{g.callee.type!=="Identifier"&&R("Illegal callee type: "+g.callee.type);const p=g.callee.name,m=g.arguments,b=ie(i,p)&&i[p];return b||R("Unrecognized function: "+p),le(b)?b(m):b+"("+m.map(f).join(",")+")"},ArrayExpression:g=>"["+g.elements.map(f).join(",")+"]",BinaryExpression:g=>"("+f(g.left)+" "+g.operator+" "+f(g.right)+")",UnaryExpression:g=>"("+g.operator+f(g.argument)+")",ConditionalExpression:g=>"("+f(g.test)+"?"+f(g.consequent)+":"+f(g.alternate)+")",LogicalExpression:g=>"("+f(g.left)+g.operator+f(g.right)+")",ObjectExpression:g=>"{"+g.properties.map(f).join(",")+"}",Property:g=>{l+=1;const p=f(g.key);return l-=1,p+":"+f(g.value)}};function h(g){const p={code:f(g),globals:Object.keys(u),fields:Object.keys(c)};return u={},c={},p}return h.functions=i,h.constants=r,h}const b5=Symbol("vega_selection_getter");function WC(e){return(!e.getter||!e.getter[b5])&&(e.getter=Zn(e.field),e.getter[b5]=!0),e.getter}const f7="intersect",y5="union",SK="vlMulti",$K="vlPoint",v5="or",AK="and",Gr="_vgsid_",nf=Zn(Gr),kK="E",CK="R",FK="R-E",MK="R-LE",TK="R-RE",A0="index:unit";function x5(e,t){for(var n=t.fields,r=t.values,i=n.length,a=0,s,o;ace(t.fields?{values:t.fields.map(r=>WC(r)(n.datum))}:{[Gr]:nf(n.datum)},t))}function PK(e,t,n,r){for(var i=this.context.data[e],a=i?i.values.value:[],s={},o={},u={},c,l,f,d,h,g,p,m,b,y,v=a.length,x=0,_,E;x(w[l[$].field]=S,w),{})))}else h=Gr,g=nf(c),p=s[h]||(s[h]={}),m=p[d]||(p[d]=[]),m.push(g),n&&(m=o[d]||(o[d]=[]),m.push({[Gr]:g}));if(t=t||y5,s[Gr]?s[Gr]=rm[`${Gr}_${t}`](...Object.values(s[Gr])):Object.keys(s).forEach(w=>{s[w]=Object.keys(s[w]).map(S=>s[w][S]).reduce((S,$)=>S===void 0?$:rm[`${u[w]}_${t}`](S,$))}),a=Object.keys(o),n&&a.length){const w=r?$K:SK;s[w]=t===y5?{[v5]:a.reduce((S,$)=>(S.push(...o[$]),S),[])}:{[AK]:a.map(S=>({[v5]:o[S]}))}}return s}var rm={[`${Gr}_union`]:UO,[`${Gr}_intersect`]:zO,E_union:function(e,t){if(!e.length)return t;for(var n=0,r=t.length;nt.indexOf(n)>=0):t},R_union:function(e,t){var n=Pt(t[0]),r=Pt(t[1]);return n>r&&(n=t[1],r=t[0]),e.length?(e[0]>n&&(e[0]=n),e[1]r&&(n=t[1],r=t[0]),e.length?rr&&(e[1]=r),e):[n,r]}};const IK=":",zK="@";function d7(e,t,n,r){t[0].type!==ao&&R("First argument to selection functions must be a string literal.");const i=t[0].value,a=t.length>=2&&xe(t).value,s="unit",o=zK+s,u=IK+i;a===f7&&!ie(r,o)&&(r[o]=n.getData(i).indataRef(n,s)),ie(r,u)||(r[u]=n.getData(i).tuplesRef())}function GC(e){const t=this.context.data[e];return t?t.values.value:[]}function BK(e,t,n){const r=this.context.data[e]["index:"+t],i=r?r.value.get(n):void 0;return i&&i.count}function UK(e,t){const n=this.context.dataflow,r=this.context.data[e],i=r.input;return n.pulse(i,n.changeset().remove(er).insert(t)),1}function jK(e,t,n){if(e){const r=this.context.dataflow,i=e.mark.source;r.pulse(i,r.changeset().encode(e,t))}return n!==void 0?n:e}const jf=e=>function(t,n){return this.context.dataflow.locale()[e](n)(t)},qK=jf("format"),YC=jf("timeFormat"),WK=jf("utcFormat"),HK=jf("timeParse"),GK=jf("utcParse"),Md=new Date(2e3,0,1);function ep(e,t,n){return!Number.isInteger(e)||!Number.isInteger(t)?"":(Md.setYear(2e3),Md.setMonth(e),Md.setDate(t),YC.call(this,Md,n))}function YK(e){return ep.call(this,e,1,"%B")}function XK(e){return ep.call(this,e,1,"%b")}function VK(e){return ep.call(this,0,2+e,"%A")}function KK(e){return ep.call(this,0,2+e,"%a")}const JK=":",QK="@",sy="%",XC="$";function h7(e,t,n,r){t[0].type!==ao&&R("First argument to data functions must be a string literal.");const i=t[0].value,a=JK+i;if(!ie(a,r))try{r[a]=n.getData(i).tuplesRef()}catch{}}function ZK(e,t,n,r){t[0].type!==ao&&R("First argument to indata must be a string literal."),t[1].type!==ao&&R("Second argument to indata must be a string literal.");const i=t[0].value,a=t[1].value,s=QK+a;ie(s,r)||(r[s]=n.getData(i).indataRef(n,a))}function rn(e,t,n,r){if(t[0].type===ao)_5(n,r,t[0].value);else for(e in n.scales)_5(n,r,e)}function _5(e,t,n){const r=sy+n;if(!ie(t,r))try{t[r]=e.scaleRef(n)}catch{}}function bi(e,t){if(le(e))return e;if(X(e)){const n=t.scales[e];return n&&lB(n.value)?n.value:void 0}}function eJ(e,t,n){t.__bandwidth=i=>i&&i.bandwidth?i.bandwidth():0,n._bandwidth=rn,n._range=rn,n._scale=rn;const r=i=>"_["+(i.type===ao?H(sy+i.value):H(sy)+"+"+e(i))+"]";return{_bandwidth:i=>`this.__bandwidth(${r(i[0])})`,_range:i=>`${r(i[0])}.range()`,_scale:i=>`${r(i[0])}(${e(i[1])})`}}function g7(e,t){return function(n,r,i){if(n){const a=bi(n,(i||this).context);return a&&a.path[e](r)}else return t(r)}}const tJ=g7("area",$W),nJ=g7("bounds",FW),rJ=g7("centroid",RW);function iJ(e,t){const n=bi(e,(t||this).context);return n&&n.scale()}function aJ(e){const t=this.context.group;let n=!1;if(t)for(;e;){if(e===t){n=!0;break}e=e.mark.group}return n}function p7(e,t,n){try{e[t].apply(e,["EXPRESSION"].concat([].slice.call(n)))}catch(r){e.warn(r)}return n[n.length-1]}function sJ(){return p7(this.context.dataflow,"warn",arguments)}function oJ(){return p7(this.context.dataflow,"info",arguments)}function uJ(){return p7(this.context.dataflow,"debug",arguments)}function im(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function oy(e){const t=Ia(e),n=im(t.r),r=im(t.g),i=im(t.b);return .2126*n+.7152*r+.0722*i}function cJ(e,t){const n=oy(e),r=oy(t),i=Math.max(n,r),a=Math.min(n,r);return(i+.05)/(a+.05)}function lJ(){const e=[].slice.call(arguments);return e.unshift({}),ce(...e)}function VC(e,t){return e===t||e!==e&&t!==t?!0:P(e)?P(t)&&e.length===t.length?fJ(e,t):!1:V(e)&&V(t)?KC(e,t):!1}function fJ(e,t){for(let n=0,r=e.length;nKC(e,t)}function dJ(e,t,n,r,i,a){const s=this.context.dataflow,o=this.context.data[e],u=o.input,c=s.stamp();let l=o.changes,f,d;if(s._trigger===!1||!(u.value.length||t||r))return 0;if((!l||l.stamp{o.modified=!0,s.pulse(u,l).run()},!0,1)),n&&(f=n===!0?er:P(n)||ug(n)?n:w5(n),l.remove(f)),t&&l.insert(t),r&&(f=w5(r),u.value.some(f)?l.remove(f):l.insert(r)),i)for(d in a)l.modify(i,d,a[d]);return 1}function hJ(e){const t=e.touches,n=t[0].clientX-t[1].clientX,r=t[0].clientY-t[1].clientY;return Math.hypot(n,r)}function gJ(e){const t=e.touches;return Math.atan2(t[0].clientY-t[1].clientY,t[0].clientX-t[1].clientX)}const E5={};function pJ(e,t){const n=E5[t]||(E5[t]=Zn(t));return P(e)?e.map(n):n(e)}function m7(e){return P(e)||ArrayBuffer.isView(e)?e:null}function b7(e){return m7(e)||(X(e)?e:null)}function mJ(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;ra.stop(c(l),e(l))),a}function MJ(e,t,n){const r=bi(e,(n||this).context);return function(i){return r?r.path.context(i)(t):""}}function TJ(e){let t=null;return function(n){return n?Wl(n,t=t||Mu(e)):e}}const JC=e=>e.data;function QC(e,t){const n=GC.call(t,e);return n.root&&n.root.lookup||{}}function NJ(e,t,n){const r=QC(e,this),i=r[t],a=r[n];return i&&a?i.path(a).map(JC):void 0}function DJ(e,t){const n=QC(e,this)[t];return n?n.ancestors().map(JC):void 0}const ZC=()=>typeof window<"u"&&window||null;function OJ(){const e=ZC();return e?e.screen:{}}function RJ(){const e=ZC();return e?[e.innerWidth,e.innerHeight]:[void 0,void 0]}function LJ(){const e=this.context.dataflow,t=e.container&&e.container();return t?[t.clientWidth,t.clientHeight]:[void 0,void 0]}function eF(e,t,n){if(!e)return[];const[r,i]=e,a=new nt().set(r[0],r[1],i[0],i[1]),s=n||this.context.dataflow.scenegraph().root;return PA(s,a,PJ(t))}function PJ(e){let t=null;if(e){const n=Y(e.marktype),r=Y(e.markname);t=i=>(!n.length||n.some(a=>i.marktype===a))&&(!r.length||r.some(a=>i.name===a))}return t}function IJ(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:5;e=Y(e);const i=e[e.length-1];return i===void 0||Math.hypot(i[0]-t,i[1]-n)>r?[...e,[t,n]]:e}function zJ(e){return Y(e).reduce((t,n,r)=>{let[i,a]=n;return t+=r==0?`M ${i},${a} `:r===e.length-1?" Z":`L ${i},${a} `},"")}function BJ(e,t,n){const{x:r,y:i,mark:a}=n,s=new nt().set(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);for(const[u,c]of t)us.x2&&(s.x2=u),cs.y2&&(s.y2=c);return s.translate(r,i),eF([[s.x1,s.y1],[s.x2,s.y2]],e,a).filter(u=>UJ(u.x,u.y,t))}function UJ(e,t,n){let r=0;for(let i=0,a=n.length-1;it!=o>t&&e<(s-u)*(t-c)/(o-c)+u&&r++}return r&1}const rf={random(){return nr()},cumulativeNormal:hg,cumulativeLogNormal:A2,cumulativeUniform:M2,densityNormal:_2,densityLogNormal:$2,densityUniform:F2,quantileNormal:gg,quantileLogNormal:k2,quantileUniform:T2,sampleNormal:dg,sampleLogNormal:S2,sampleUniform:C2,isArray:P,isBoolean:Za,isDate:Ca,isDefined(e){return e!==void 0},isNumber:we,isObject:V,isRegExp:fw,isString:X,isTuple:ug,isValid(e){return e!=null&&e===e},toBoolean:e2,toDate(e){return t2(e)},toNumber:Pt,toString:n2,indexof:bJ,join:mJ,lastindexof:yJ,replace:xJ,reverse:_J,slice:vJ,flush:cw,lerp:dw,merge:lJ,pad:pw,peek:xe,pluck:pJ,span:bf,inrange:nu,truncate:mw,rgb:Ia,lab:Dh,hcl:Oh,hsl:Th,luminance:oy,contrast:cJ,sequence:Nn,format:qK,utcFormat:WK,utcParse:GK,utcOffset:Vw,utcSequence:Qw,timeFormat:YC,timeParse:HK,timeOffset:Xw,timeSequence:Jw,timeUnitSpecifier:Pw,monthFormat:YK,monthAbbrevFormat:XK,dayFormat:VK,dayAbbrevFormat:KK,quarter:aw,utcquarter:sw,week:zw,utcweek:jw,dayofyear:Iw,utcdayofyear:Uw,warn:sJ,info:oJ,debug:uJ,extent(e){return ri(e)},inScope:aJ,intersect:eF,clampRange:ow,pinchDistance:hJ,pinchAngle:gJ,screen:OJ,containerSize:LJ,windowSize:RJ,bandspace:wJ,setdata:UK,pathShape:TJ,panLinear:tw,panLog:nw,panPow:rw,panSymlog:iw,zoomLinear:Xy,zoomLog:Vy,zoomPow:yh,zoomSymlog:Ky,encode:jK,modify:dJ,lassoAppend:IJ,lassoPath:zJ,intersectLasso:BJ},jJ=["view","item","group","xy","x","y"],qJ="event.vega.",tF="this.",y7={},nF={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:e=>`_[${H(XC+e)}]`,functions:WJ,constants:UC,visitors:y7},uy=qC(nF);function WJ(e){const t=jC(e);jJ.forEach(n=>t[n]=qJ+n);for(const n in rf)t[n]=tF+n;return ce(t,eJ(e,rf,y7)),t}function tt(e,t,n){return arguments.length===1?rf[e]:(rf[e]=t,n&&(y7[e]=n),uy&&(uy.functions[e]=tF+e),this)}tt("bandwidth",EJ,rn);tt("copy",SJ,rn);tt("domain",$J,rn);tt("range",kJ,rn);tt("invert",AJ,rn);tt("scale",CJ,rn);tt("gradient",FJ,rn);tt("geoArea",tJ,rn);tt("geoBounds",nJ,rn);tt("geoCentroid",rJ,rn);tt("geoShape",MJ,rn);tt("geoScale",iJ,rn);tt("indata",BK,ZK);tt("data",GC,h7);tt("treePath",NJ,h7);tt("treeAncestors",DJ,h7);tt("vlSelectionTest",NK,d7);tt("vlSelectionIdTest",RK,d7);tt("vlSelectionResolve",PK,d7);tt("vlSelectionTuples",LK);function ui(e,t){const n={};let r;try{e=X(e)?e:H(e)+"",r=l7(e)}catch{R("Expression parse error: "+e)}r.visit(a=>{if(a.type!==OC)return;const s=a.callee.name,o=nF.visitors[s];o&&o(s,a.arguments,t,n)});const i=uy(r);return i.globals.forEach(a=>{const s=XC+a;!ie(n,s)&&t.getSignal(a)&&(n[s]=t.signalRef(a))}),{$expr:ce({code:i.code},t.options.ast?{ast:r}:null),$fields:i.fields,$params:n}}function HJ(e){const t=this,n=e.operators||[];return e.background&&(t.background=e.background),e.eventConfig&&(t.eventConfig=e.eventConfig),e.locale&&(t.locale=e.locale),n.forEach(r=>t.parseOperator(r)),n.forEach(r=>t.parseOperatorParameters(r)),(e.streams||[]).forEach(r=>t.parseStream(r)),(e.updates||[]).forEach(r=>t.parseUpdate(r)),t.resolve()}const GJ=Ar(["rule"]),S5=Ar(["group","image","rect"]);function YJ(e,t){let n="";return GJ[t]||(e.x2&&(e.x?(S5[t]&&(n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),n+="o.width=o.x2-o.x;"):n+="o.x=o.x2-(o.width||0);"),e.xc&&(n+="o.x=o.xc-(o.width||0)/2;"),e.y2&&(e.y?(S5[t]&&(n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),n+="o.height=o.y2-o.y;"):n+="o.y=o.y2-(o.height||0);"),e.yc&&(n+="o.y=o.yc-(o.height||0)/2;")),n}function v7(e){return(e+"").toLowerCase()}function XJ(e){return v7(e)==="operator"}function VJ(e){return v7(e)==="collect"}function Ic(e,t,n){n.endsWith(";")||(n="return("+n+");");const r=Function(...t.concat(n));return e&&e.functions?r.bind(e.functions):r}function KJ(e,t,n,r){return`((u = ${e}) < (v = ${t}) || u == null) && v != null ? ${n} - : (u > v || v == null) && u != null ? ${r} - : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ${n} - : v !== v && u === u ? ${r} : `}var JJ={operator:(e,t)=>Ic(e,["_"],t.code),parameter:(e,t)=>Ic(e,["datum","_"],t.code),event:(e,t)=>Ic(e,["event"],t.code),handler:(e,t)=>{const n=`var datum=event.item&&event.item.datum;return ${t.code};`;return Ic(e,["_","event"],n)},encode:(e,t)=>{const{marktype:n,channels:r}=t;let i="var o=item,datum=o.datum,m=0,$;";for(const a in r){const s="o["+H(a)+"]";i+=`$=${r[a].code};if(${s}!==$)${s}=$,m=1;`}return i+=YJ(r,n),i+="return m;",Ic(e,["item","_"],i)},codegen:{get(e){const t=`[${e.map(H).join("][")}]`,n=Function("_",`return _${t};`);return n.path=t,n},comparator(e,t){let n;const r=(a,s)=>{const o=t[s];let u,c;return a.path?(u=`a${a.path}`,c=`b${a.path}`):((n=n||{})["f"+s]=a,u=`this.f${s}(a)`,c=`this.f${s}(b)`),KJ(u,c,-o,o)},i=Function("a","b","var u, v; return "+e.map(r).join("")+"0;");return n?i.bind(n):i}}};function QJ(e){const t=this;XJ(e.type)||!e.type?t.operator(e,e.update?t.operatorExpression(e.update):null):t.transform(e,e.type)}function ZJ(e){const t=this;if(e.params){const n=t.get(e.id);n||R("Invalid operator id: "+e.id),t.dataflow.connect(n,n.parameters(t.parseParameters(e.params),e.react,e.initonly))}}function eQ(e,t){t=t||{};const n=this;for(const r in e){const i=e[r];t[r]=P(i)?i.map(a=>$5(a,n,t)):$5(i,n,t)}return t}function $5(e,t,n){if(!e||!V(e))return e;for(let r=0,i=A5.length,a;ri&&i.$tupleid?ne:i);return t.fn[n]||(t.fn[n]=Jy(r,e.$order,t.expr.codegen))}function sQ(e,t){const n=e.$encode,r={};for(const i in n){const a=n[i];r[i]=$n(t.encodeExpression(a.$expr),a.$fields),r[i].output=a.$output}return r}function oQ(e,t){return t}function uQ(e,t){const n=e.$subflow;return function(r,i,a){const s=t.fork().parse(n),o=s.get(n.operators[0].id),u=s.signals.parent;return u&&u.set(a),o.detachSubflow=()=>t.detach(s),o}}function cQ(){return ne}function lQ(e){var t=this,n=e.filter!=null?t.eventExpression(e.filter):void 0,r=e.stream!=null?t.get(e.stream):void 0,i;e.source?r=t.events(e.source,e.type,n):e.merge&&(i=e.merge.map(a=>t.get(a)),r=i[0].merge.apply(i[0],i.slice(1))),e.between&&(i=e.between.map(a=>t.get(a)),r=r.between(i[0],i[1])),e.filter&&(r=r.filter(n)),e.throttle!=null&&(r=r.throttle(+e.throttle)),e.debounce!=null&&(r=r.debounce(+e.debounce)),r==null&&R("Invalid stream definition: "+JSON.stringify(e)),e.consume&&r.consume(!0),t.stream(e,r)}function fQ(e){var t=this,n=V(n=e.source)?n.$ref:n,r=t.get(n),i=null,a=e.update,s=void 0;r||R("Source not defined: "+e.source),i=e.target&&e.target.$expr?t.eventExpression(e.target.$expr):t.get(e.target),a&&a.$expr&&(a.$params&&(s=t.parseParameters(a.$params)),a=t.handlerExpression(a.$expr)),t.update(e,r,i,a,s)}const dQ={skip:!0};function hQ(e){var t=this,n={};if(e.signals){var r=n.signals={};Object.keys(t.signals).forEach(a=>{const s=t.signals[a];e.signals(a,s)&&(r[a]=s.value)})}if(e.data){var i=n.data={};Object.keys(t.data).forEach(a=>{const s=t.data[a];e.data(a,s)&&(i[a]=s.input.value)})}return t.subcontext&&e.recurse!==!1&&(n.subcontext=t.subcontext.map(a=>a.getState(e))),n}function gQ(e){var t=this,n=t.dataflow,r=e.data,i=e.signals;Object.keys(i||{}).forEach(a=>{n.update(t.signals[a],i[a],dQ)}),Object.keys(r||{}).forEach(a=>{n.pulse(t.data[a].input,n.changeset().remove(er).insert(r[a]))}),(e.subcontext||[]).forEach((a,s)=>{const o=t.subcontext[s];o&&o.setState(a)})}function rF(e,t,n,r){return new iF(e,t,n,r)}function iF(e,t,n,r){this.dataflow=e,this.transforms=t,this.events=e.events.bind(e),this.expr=r||JJ,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},n&&(this.functions=Object.create(n),this.functions.context=this)}function k5(e){this.dataflow=e.dataflow,this.transforms=e.transforms,this.events=e.events,this.expr=e.expr,this.signals=Object.create(e.signals),this.scales=Object.create(e.scales),this.nodes=Object.create(e.nodes),this.data=Object.create(e.data),this.fn=Object.create(e.fn),e.functions&&(this.functions=Object.create(e.functions),this.functions.context=this)}iF.prototype=k5.prototype={fork(){const e=new k5(this);return(this.subcontext||(this.subcontext=[])).push(e),e},detach(e){this.subcontext=this.subcontext.filter(n=>n!==e);const t=Object.keys(e.nodes);for(const n of t)e.nodes[n]._targets=null;for(const n of t)e.nodes[n].detach();e.nodes=null},get(e){return this.nodes[e]},set(e,t){return this.nodes[e]=t},add(e,t){const n=this,r=n.dataflow,i=e.value;if(n.set(e.id,t),VJ(e.type)&&i&&(i.$ingest?r.ingest(t,i.$ingest,i.$format):i.$request?r.preload(t,i.$request,i.$format):r.pulse(t,r.changeset().insert(i))),e.root&&(n.root=t),e.parent){let a=n.get(e.parent.$ref);a?(r.connect(a,[t]),t.targets().add(a)):(n.unresolved=n.unresolved||[]).push(()=>{a=n.get(e.parent.$ref),r.connect(a,[t]),t.targets().add(a)})}if(e.signal&&(n.signals[e.signal]=t),e.scale&&(n.scales[e.scale]=t),e.data)for(const a in e.data){const s=n.data[a]||(n.data[a]={});e.data[a].forEach(o=>s[o]=t)}},resolve(){return(this.unresolved||[]).forEach(e=>e()),delete this.unresolved,this},operator(e,t){this.add(e,this.dataflow.add(e.value,t))},transform(e,t){this.add(e,this.dataflow.add(this.transforms[v7(t)]))},stream(e,t){this.set(e.id,t)},update(e,t,n,r,i){this.dataflow.on(t,n,r,i,e.options)},operatorExpression(e){return this.expr.operator(this,e)},parameterExpression(e){return this.expr.parameter(this,e)},eventExpression(e){return this.expr.event(this,e)},handlerExpression(e){return this.expr.handler(this,e)},encodeExpression(e){return this.expr.encode(this,e)},parse:HJ,parseOperator:QJ,parseOperatorParameters:ZJ,parseParameters:eQ,parseStream:lQ,parseUpdate:fQ,getState:hQ,setState:gQ};function pQ(e){const t=e.container();t&&(t.setAttribute("role","graphics-document"),t.setAttribute("aria-roleDescription","visualization"),aF(t,e.description()))}function aF(e,t){e&&(t==null?e.removeAttribute("aria-label"):e.setAttribute("aria-label",t))}function mQ(e){e.add(null,t=>(e._background=t.bg,e._resize=1,t.bg),{bg:e._signals.background})}const am="default";function bQ(e){const t=e._signals.cursor||(e._signals.cursor=e.add({user:am,item:null}));e.on(e.events("view","pointermove"),t,(n,r)=>{const i=t.value,a=i?X(i)?i:i.user:am,s=r.item&&r.item.cursor||null;return i&&a===i.user&&s==i.item?i:{user:a,item:s}}),e.add(null,function(n){let r=n.cursor,i=this.value;return X(r)||(i=r.item,r=r.user),cy(e,r&&r!==am?r:i||r),i},{cursor:t})}function cy(e,t){const n=e.globalCursor()?typeof document<"u"&&document.body:e.container();if(n)return t==null?n.style.removeProperty("cursor"):n.style.cursor=t}function k0(e,t){var n=e._runtime.data;return ie(n,t)||R("Unrecognized data set: "+t),n[t]}function yQ(e,t){return arguments.length<2?k0(this,e).values.value:tp.call(this,e,So().remove(er).insert(t))}function tp(e,t){$E(t)||R("Second argument to changes must be a changeset.");const n=k0(this,e);return n.modified=!0,this.pulse(n.input,t)}function vQ(e,t){return tp.call(this,e,So().insert(t))}function xQ(e,t){return tp.call(this,e,So().remove(t))}function sF(e){var t=e.padding();return Math.max(0,e._viewWidth+t.left+t.right)}function oF(e){var t=e.padding();return Math.max(0,e._viewHeight+t.top+t.bottom)}function np(e){var t=e.padding(),n=e._origin;return[t.left+n[0],t.top+n[1]]}function _Q(e){var t=np(e),n=sF(e),r=oF(e);e._renderer.background(e.background()),e._renderer.resize(n,r,t),e._handler.origin(t),e._resizeListeners.forEach(i=>{try{i(n,r)}catch(a){e.error(a)}})}function wQ(e,t,n){var r=e._renderer,i=r&&r.canvas(),a,s,o;return i&&(o=np(e),s=t.changedTouches?t.changedTouches[0]:t,a=Ug(s,i),a[0]-=o[0],a[1]-=o[1]),t.dataflow=e,t.item=n,t.vega=EQ(e,n,a),t}function EQ(e,t,n){const r=t?t.mark.marktype==="group"?t:t.mark.group:null;function i(s){var o=r,u;if(s){for(u=t;u;u=u.mark.group)if(u.mark.name===s){o=u;break}}return o&&o.mark&&o.mark.interactive?o:{}}function a(s){if(!s)return n;X(s)&&(s=i(s));const o=n.slice();for(;s;)o[0]-=s.x||0,o[1]-=s.y||0,s=s.mark&&s.mark.group;return o}return{view:Ht(e),item:Ht(t||{}),group:i,xy:a,x:s=>a(s)[0],y:s=>a(s)[1]}}const C5="view",SQ="timer",$Q="window",AQ={trap:!1};function kQ(e){const t=ce({defaults:{}},e),n=(r,i)=>{i.forEach(a=>{P(r[a])&&(r[a]=Ar(r[a]))})};return n(t.defaults,["prevent","allow"]),n(t,["view","window","selector"]),t}function uF(e,t,n,r){e._eventListeners.push({type:n,sources:Y(t),handler:r})}function CQ(e,t){var n=e._eventConfig.defaults,r=n.prevent,i=n.allow;return r===!1||i===!0?!1:r===!0||i===!1?!0:r?r[t]:i?!i[t]:e.preventDefault()}function Td(e,t,n){const r=e._eventConfig&&e._eventConfig[t];return r===!1||V(r)&&!r[n]?(e.warn(`Blocked ${t} ${n} event listener.`),!1):!0}function FQ(e,t,n){var r=this,i=new fg(n),a=function(c,l){r.runAsync(null,()=>{e===C5&&CQ(r,t)&&c.preventDefault(),i.receive(wQ(r,c,l))})},s;if(e===SQ)Td(r,"timer",t)&&r.timer(a,t);else if(e===C5)Td(r,"view",t)&&r.addEventListener(t,a,AQ);else if(e===$Q?Td(r,"window",t)&&typeof window<"u"&&(s=[window]):typeof document<"u"&&Td(r,"selector",t)&&(s=Array.from(document.querySelectorAll(e))),!s)r.warn("Can not resolve event source: "+e);else{for(var o=0,u=s.length;o=0;)t[r].stop();for(r=n.length;--r>=0;)for(a=n[r],i=a.sources.length;--i>=0;)a.sources[i].removeEventListener(a.type,a.handler);return e&&e.call(this,this._handler,null,null,null),this}function Rn(e,t,n){const r=document.createElement(e);for(const i in t)r.setAttribute(i,t[i]);return n!=null&&(r.textContent=n),r}const NQ="vega-bind",DQ="vega-bind-name",OQ="vega-bind-radio";function RQ(e,t,n){if(!t)return;const r=n.param;let i=n.state;return i||(i=n.state={elements:null,active:!1,set:null,update:s=>{s!=e.signal(r.signal)&&e.runAsync(null,()=>{i.source=!0,e.signal(r.signal,s)})}},r.debounce&&(i.update=Qy(r.debounce,i.update))),(r.input==null&&r.element?LQ:IQ)(i,t,r,e),i.active||(e.on(e._signals[r.signal],null,()=>{i.source?i.source=!1:i.set(e.signal(r.signal))}),i.active=!0),i}function LQ(e,t,n,r){const i=n.event||"input",a=()=>e.update(t.value);r.signal(n.signal,t.value),t.addEventListener(i,a),uF(r,t,i,a),e.set=s=>{t.value=s,t.dispatchEvent(PQ(i))}}function PQ(e){return typeof Event<"u"?new Event(e):{type:e}}function IQ(e,t,n,r){const i=r.signal(n.signal),a=Rn("div",{class:NQ}),s=n.input==="radio"?a:a.appendChild(Rn("label"));s.appendChild(Rn("span",{class:DQ},n.name||n.signal)),t.appendChild(a);let o=zQ;switch(n.input){case"checkbox":o=BQ;break;case"select":o=UQ;break;case"radio":o=jQ;break;case"range":o=qQ;break}o(e,s,n,i)}function zQ(e,t,n,r){const i=Rn("input");for(const a in n)a!=="signal"&&a!=="element"&&i.setAttribute(a==="input"?"type":a,n[a]);i.setAttribute("name",n.signal),i.value=r,t.appendChild(i),i.addEventListener("input",()=>e.update(i.value)),e.elements=[i],e.set=a=>i.value=a}function BQ(e,t,n,r){const i={type:"checkbox",name:n.signal};r&&(i.checked=!0);const a=Rn("input",i);t.appendChild(a),a.addEventListener("change",()=>e.update(a.checked)),e.elements=[a],e.set=s=>a.checked=!!s||null}function UQ(e,t,n,r){const i=Rn("select",{name:n.signal}),a=n.labels||[];n.options.forEach((s,o)=>{const u={value:s};C0(s,r)&&(u.selected=!0),i.appendChild(Rn("option",u,(a[o]||s)+""))}),t.appendChild(i),i.addEventListener("change",()=>{e.update(n.options[i.selectedIndex])}),e.elements=[i],e.set=s=>{for(let o=0,u=n.options.length;o{const u={type:"radio",name:n.signal,value:s};C0(s,r)&&(u.checked=!0);const c=Rn("input",u);c.addEventListener("change",()=>e.update(s));const l=Rn("label",{},(a[o]||s)+"");return l.prepend(c),i.appendChild(l),c}),e.set=s=>{const o=e.elements,u=o.length;for(let c=0;c{u.textContent=o.value,e.update(+o.value)};o.addEventListener("input",c),o.addEventListener("change",c),e.elements=[o],e.set=l=>{o.value=l,u.textContent=l}}function C0(e,t){return e===t||e+""==t+""}function cF(e,t,n,r,i,a){return t=t||new r(e.loader()),t.initialize(n,sF(e),oF(e),np(e),i,a).background(e.background())}function x7(e,t){return t?function(){try{t.apply(this,arguments)}catch(n){e.error(n)}}:null}function WQ(e,t,n,r){const i=new r(e.loader(),x7(e,e.tooltip())).scene(e.scenegraph().root).initialize(n,np(e),e);return t&&t.handlers().forEach(a=>{i.on(a.type,a.handler)}),i}function HQ(e,t){const n=this,r=n._renderType,i=n._eventConfig.bind,a=qg(r);e=n._el=e?sm(n,e,!0):null,pQ(n),a||n.error("Unrecognized renderer type: "+r);const s=a.handler||qa,o=e?a.renderer:a.headless;return n._renderer=o?cF(n,n._renderer,e,o):null,n._handler=WQ(n,n._handler,e,s),n._redraw=!0,e&&i!=="none"&&(t=t?n._elBind=sm(n,t,!0):e.appendChild(Rn("form",{class:"vega-bindings"})),n._bind.forEach(u=>{u.param.element&&i!=="container"&&(u.element=sm(n,u.param.element,!!u.param.input))}),n._bind.forEach(u=>{RQ(n,u.element||t,u)})),n}function sm(e,t,n){if(typeof t=="string")if(typeof document<"u"){if(t=document.querySelector(t),!t)return e.error("Signal bind element not found: "+t),null}else return e.error("DOM document instance not found."),null;if(t&&n)try{t.textContent=""}catch(r){t=null,e.error(r)}return t}const zc=e=>+e||0,GQ=e=>({top:e,bottom:e,left:e,right:e});function N5(e){return V(e)?{top:zc(e.top),bottom:zc(e.bottom),left:zc(e.left),right:zc(e.right)}:GQ(zc(e))}async function _7(e,t,n,r){const i=qg(t),a=i&&i.headless;return a||R("Unrecognized renderer type: "+t),await e.runAsync(),cF(e,null,null,a,n,r).renderAsync(e._scenegraph.root)}async function YQ(e,t){e!==wa.Canvas&&e!==wa.SVG&&e!==wa.PNG&&R("Unrecognized image type: "+e);const n=await _7(this,e,t);return e===wa.SVG?XQ(n.svg(),"image/svg+xml"):n.canvas().toDataURL("image/png")}function XQ(e,t){const n=new Blob([e],{type:t});return window.URL.createObjectURL(n)}async function VQ(e,t){return(await _7(this,wa.Canvas,e,t)).canvas()}async function KQ(e){return(await _7(this,wa.SVG,e)).svg()}function JQ(e,t,n){return rF(e,Su,rf,n).parse(t)}function QQ(e){var t=this._runtime.scales;return ie(t,e)||R("Unrecognized scale or projection: "+e),t[e].value}var lF="width",fF="height",w7="padding",D5={skip:!0};function dF(e,t){var n=e.autosize(),r=e.padding();return t-(n&&n.contains===w7?r.left+r.right:0)}function hF(e,t){var n=e.autosize(),r=e.padding();return t-(n&&n.contains===w7?r.top+r.bottom:0)}function ZQ(e){var t=e._signals,n=t[lF],r=t[fF],i=t[w7];function a(){e._autosize=e._resize=1}e._resizeWidth=e.add(null,o=>{e._width=o.size,e._viewWidth=dF(e,o.size),a()},{size:n}),e._resizeHeight=e.add(null,o=>{e._height=o.size,e._viewHeight=hF(e,o.size),a()},{size:r});const s=e.add(null,a,{pad:i});e._resizeWidth.rank=n.rank+1,e._resizeHeight.rank=r.rank+1,s.rank=i.rank+1}function eZ(e,t,n,r,i,a){this.runAfter(s=>{let o=0;s._autosize=0,s.width()!==n&&(o=1,s.signal(lF,n,D5),s._resizeWidth.skip(!0)),s.height()!==r&&(o=1,s.signal(fF,r,D5),s._resizeHeight.skip(!0)),s._viewWidth!==e&&(s._resize=1,s._viewWidth=e),s._viewHeight!==t&&(s._resize=1,s._viewHeight=t),(s._origin[0]!==i[0]||s._origin[1]!==i[1])&&(s._resize=1,s._origin=i),o&&s.run("enter"),a&&s.runAfter(u=>u.resize())},!1,1)}function tZ(e){return this._runtime.getState(e||{data:nZ,signals:rZ,recurse:!0})}function nZ(e,t){return t.modified&&P(t.input.value)&&!e.startsWith("_:vega:_")}function rZ(e,t){return!(e==="parent"||t instanceof Su.proxy)}function iZ(e){return this.runAsync(null,t=>{t._trigger=!1,t._runtime.setState(e)},t=>{t._trigger=!0}),this}function aZ(e,t){function n(r){e({timestamp:Date.now(),elapsed:r})}this._timers.push(LG(n,t))}function sZ(e,t,n,r){const i=e.element();i&&i.setAttribute("title",oZ(r))}function oZ(e){return e==null?"":P(e)?gF(e):V(e)&&!Ca(e)?uZ(e):e+""}function uZ(e){return Object.keys(e).map(t=>{const n=e[t];return t+": "+(P(n)?gF(n):pF(n))}).join(` -`)}function gF(e){return"["+e.map(pF).join(", ")+"]"}function pF(e){return P(e)?"[…]":V(e)&&!Ca(e)?"{…}":e}function cZ(){if(this.renderer()==="canvas"&&this._renderer._canvas){let e=null;const t=()=>{e!=null&&e();const n=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);n.addEventListener("change",t),e=()=>{n.removeEventListener("change",t)},this._renderer._canvas.getContext("2d").pixelRatio=window.devicePixelRatio||1,this._redraw=!0,this._resize=1,this.resize().runAsync()};t()}}function mF(e,t){const n=this;if(t=t||{},uu.call(n),t.loader&&n.loader(t.loader),t.logger&&n.logger(t.logger),t.logLevel!=null&&n.logLevel(t.logLevel),t.locale||e.locale){const a=ce({},e.locale,t.locale);n.locale(pE(a.number,a.time))}n._el=null,n._elBind=null,n._renderType=t.renderer||wa.Canvas,n._scenegraph=new n9;const r=n._scenegraph.root;n._renderer=null,n._tooltip=t.tooltip||sZ,n._redraw=!0,n._handler=new qa().scene(r),n._globalCursor=!1,n._preventDefault=!1,n._timers=[],n._eventListeners=[],n._resizeListeners=[],n._eventConfig=kQ(e.eventConfig),n.globalCursor(n._eventConfig.globalCursor);const i=JQ(n,e,t.expr);n._runtime=i,n._signals=i.signals,n._bind=(e.bindings||[]).map(a=>({state:null,param:ce({},a)})),i.root&&i.root.set(r),r.source=i.data.root.input,n.pulse(i.data.root.input,n.changeset().insert(r.items)),n._width=n.width(),n._height=n.height(),n._viewWidth=dF(n,n._width),n._viewHeight=hF(n,n._height),n._origin=[0,0],n._resize=0,n._autosize=1,ZQ(n),mQ(n),bQ(n),n.description(e.description),t.hover&&n.hover(),t.container&&n.initialize(t.container,t.bind),t.watchPixelRatio&&n._watchPixelRatio()}function Nd(e,t){return ie(e._signals,t)?e._signals[t]:R("Unrecognized signal name: "+H(t))}function bF(e,t){const n=(e._targets||[]).filter(r=>r._update&&r._update.handler===t);return n.length?n[0]:null}function O5(e,t,n,r){let i=bF(n,r);return i||(i=x7(e,()=>r(t,n.value)),i.handler=r,e.on(n,null,i)),e}function R5(e,t,n){const r=bF(t,n);return r&&t._targets.remove(r),e}W(mF,uu,{async evaluate(e,t,n){if(await uu.prototype.evaluate.call(this,e,t),this._redraw||this._resize)try{this._renderer&&(this._resize&&(this._resize=0,_Q(this)),await this._renderer.renderAsync(this._scenegraph.root)),this._redraw=!1}catch(r){this.error(r)}return n&&Gd(this,n),this},dirty(e){this._redraw=!0,this._renderer&&this._renderer.dirty(e)},description(e){if(arguments.length){const t=e!=null?e+"":null;return t!==this._desc&&aF(this._el,this._desc=t),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(e,t,n){const r=Nd(this,e);return arguments.length===1?r.value:this.update(r,t,n)},width(e){return arguments.length?this.signal("width",e):this.signal("width")},height(e){return arguments.length?this.signal("height",e):this.signal("height")},padding(e){return arguments.length?this.signal("padding",N5(e)):N5(this.signal("padding"))},autosize(e){return arguments.length?this.signal("autosize",e):this.signal("autosize")},background(e){return arguments.length?this.signal("background",e):this.signal("background")},renderer(e){return arguments.length?(qg(e)||R("Unrecognized renderer type: "+e),e!==this._renderType&&(this._renderType=e,this._resetRenderer()),this):this._renderType},tooltip(e){return arguments.length?(e!==this._tooltip&&(this._tooltip=e,this._resetRenderer()),this):this._tooltip},loader(e){return arguments.length?(e!==this._loader&&(uu.prototype.loader.call(this,e),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(Nd(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:eZ,addEventListener(e,t,n){let r=t;return n&&n.trap===!1||(r=x7(this,t),r.raw=t),this._handler.on(e,r),this},removeEventListener(e,t){for(var n=this._handler.handlers(e),r=n.length,i,a;--r>=0;)if(a=n[r].type,i=n[r].handler,e===a&&(t===i||t===i.raw)){this._handler.off(a,i);break}return this},addResizeListener(e){const t=this._resizeListeners;return t.includes(e)||t.push(e),this},removeResizeListener(e){var t=this._resizeListeners,n=t.indexOf(e);return n>=0&&t.splice(n,1),this},addSignalListener(e,t){return O5(this,e,Nd(this,e),t)},removeSignalListener(e,t){return R5(this,Nd(this,e),t)},addDataListener(e,t){return O5(this,e,k0(this,e).values,t)},removeDataListener(e,t){return R5(this,k0(this,e).values,t)},globalCursor(e){if(arguments.length){if(this._globalCursor!==!!e){const t=cy(this,null);this._globalCursor=!!e,t&&cy(this,t)}return this}else return this._globalCursor},preventDefault(e){return arguments.length?(this._preventDefault=e,this):this._preventDefault},timer:aZ,events:FQ,finalize:TQ,hover:MQ,data:yQ,change:tp,insert:vQ,remove:xQ,scale:QQ,initialize:HQ,toImageURL:YQ,toCanvas:VQ,toSVG:KQ,getState:tZ,setState:iZ,_watchPixelRatio:cZ});const lZ="view",F0="[",M0="]",yF="{",vF="}",fZ=":",xF=",",dZ="@",hZ=">",gZ=/[[\]{}]/,pZ={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let _F,wF;function as(e,t,n){return _F=t||lZ,wF=n||pZ,EF(e.trim()).map(ly)}function mZ(e){return wF[e]}function Ml(e,t,n,r,i){const a=e.length;let s=0,o;for(;t=0?--s:r&&r.indexOf(o)>=0&&++s}return t}function EF(e){const t=[],n=e.length;let r=0,i=0;for(;i' after between selector: "+e;r=r.map(ly);const i=ly(e.slice(1).trim());return i.between?{between:r,stream:i}:(i.between=r,i)}function yZ(e){const t={source:_F},n=[];let r=[0,0],i=0,a=0,s=e.length,o=0,u,c;if(e[s-1]===vF){if(o=e.lastIndexOf(yF),o>=0){try{r=vZ(e.substring(o+1,s-1))}catch{throw"Invalid throttle specification: "+e}e=e.slice(0,o).trim(),s=e.length}else throw"Unmatched right brace: "+e;o=0}if(!s)throw e;if(e[0]===dZ&&(i=++o),u=Ml(e,o,fZ),u1?(t.type=n[1],i?t.markname=n[0].slice(1):mZ(n[0])?t.marktype=n[0]:t.source=n[0]):t.type=n[0],t.type.slice(-1)==="!"&&(t.consume=!0,t.type=t.type.slice(0,-1)),c!=null&&(t.filter=c),r[0]&&(t.throttle=r[0]),r[1]&&(t.debounce=r[1]),t}function vZ(e){const t=e.split(xF);if(!e.length||t.length>2)throw e;return t.map(n=>{const r=+n;if(r!==r)throw e;return r})}function xZ(e){return V(e)?e:{type:e||"pad"}}const Bc=e=>+e||0,_Z=e=>({top:e,bottom:e,left:e,right:e});function wZ(e){return V(e)?e.signal?e:{top:Bc(e.top),bottom:Bc(e.bottom),left:Bc(e.left),right:Bc(e.right)}:_Z(Bc(e))}const mt=e=>V(e)&&!P(e)?ce({},e):{value:e};function L5(e,t,n,r){return n!=null?(V(n)&&!P(n)||P(n)&&n.length&&V(n[0])?e.update[t]=n:e[r||"enter"][t]={value:n},1):0}function Ct(e,t,n){for(const r in t)L5(e,r,t[r]);for(const r in n)L5(e,r,n[r],"update")}function hc(e,t,n){for(const r in t)n&&ie(n,r)||(e[r]=ce(e[r]||{},t[r]));return e}function eu(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}const E7="mark",S7="frame",$7="scope",EZ="axis",SZ="axis-domain",$Z="axis-grid",AZ="axis-label",kZ="axis-tick",CZ="axis-title",FZ="legend",MZ="legend-band",TZ="legend-entry",NZ="legend-gradient",SF="legend-label",DZ="legend-symbol",OZ="legend-title",RZ="title",LZ="title-text",PZ="title-subtitle";function IZ(e,t,n,r,i){const a={},s={};let o,u,c,l;u="lineBreak",t==="text"&&i[u]!=null&&!eu(u,e)&&om(a,u,i[u]),(n=="legend"||String(n).startsWith("axis"))&&(n=null),l=n===S7?i.group:n===E7?ce({},i.mark,i[t]):null;for(u in l)c=eu(u,e)||(u==="fill"||u==="stroke")&&(eu("fill",e)||eu("stroke",e)),c||om(a,u,l[u]);Y(r).forEach(f=>{const d=i.style&&i.style[f];for(const h in d)eu(h,e)||om(a,h,d[h])}),e=ce({},e);for(u in a)l=a[u],l.signal?(o=o||{})[u]=l:s[u]=l;return e.enter=ce(s,e.enter),o&&(e.update=ce(o,e.update)),e}function om(e,t,n){e[t]=n&&n.signal?{signal:n.signal}:{value:n}}const $F=e=>X(e)?H(e):e.signal?`(${e.signal})`:AF(e);function rp(e){if(e.gradient!=null)return BZ(e);let t=e.signal?`(${e.signal})`:e.color?zZ(e.color):e.field!=null?AF(e.field):e.value!==void 0?H(e.value):void 0;return e.scale!=null&&(t=UZ(e,t)),t===void 0&&(t=null),e.exponent!=null&&(t=`pow(${t},${ch(e.exponent)})`),e.mult!=null&&(t+=`*${ch(e.mult)}`),e.offset!=null&&(t+=`+${ch(e.offset)}`),e.round&&(t=`round(${t})`),t}const Dd=(e,t,n,r)=>`(${e}(${[t,n,r].map(rp).join(",")})+'')`;function zZ(e){return e.c?Dd("hcl",e.h,e.c,e.l):e.h||e.s?Dd("hsl",e.h,e.s,e.l):e.l||e.a?Dd("lab",e.l,e.a,e.b):e.r||e.g||e.b?Dd("rgb",e.r,e.g,e.b):null}function BZ(e){const t=[e.start,e.stop,e.count].map(n=>n==null?null:H(n));for(;t.length&&xe(t)==null;)t.pop();return t.unshift($F(e.gradient)),`gradient(${t.join(",")})`}function ch(e){return V(e)?"("+rp(e)+")":e}function AF(e){return kF(V(e)?e:{datum:e})}function kF(e){let t,n,r;if(e.signal)t="datum",r=e.signal;else if(e.group||e.parent){for(n=Math.max(1,e.level||1),t="item";n-- >0;)t+=".mark.group";e.parent?(r=e.parent,t+=".datum"):r=e.group}else e.datum?(t="datum",r=e.datum):R("Invalid field reference: "+H(e));return e.signal||(r=X(r)?di(r).map(H).join("]["):kF(r)),t+"["+r+"]"}function UZ(e,t){const n=$F(e.scale);return e.range!=null?t=`lerp(_range(${n}), ${+e.range})`:(t!==void 0&&(t=`_scale(${n}, ${t})`),e.band&&(t=(t?t+"+":"")+`_bandwidth(${n})`+(+e.band==1?"":"*"+ch(e.band)),e.extra&&(t=`(datum.extra ? _scale(${n}, datum.extra.value) : ${t})`)),t==null&&(t="0")),t}function jZ(e){let t="";return e.forEach(n=>{const r=rp(n);t+=n.test?`(${n.test})?${r}:`:r}),xe(t)===":"&&(t+="null"),t}function CF(e,t,n,r,i,a){const s={};a=a||{},a.encoders={$encode:s},e=IZ(e,t,n,r,i.config);for(const o in e)s[o]=qZ(e[o],t,a,i);return a}function qZ(e,t,n,r){const i={},a={};for(const s in e)e[s]!=null&&(i[s]=HZ(WZ(e[s]),r,n,a));return{$expr:{marktype:t,channels:i},$fields:Object.keys(a),$output:Object.keys(e)}}function WZ(e){return P(e)?jZ(e):rp(e)}function HZ(e,t,n,r){const i=ui(e,t);return i.$fields.forEach(a=>r[a]=1),ce(n,i.$params),i.$expr}const GZ="outer",YZ=["value","update","init","react","bind"];function P5(e,t){R(e+' for "outer" push: '+H(t))}function FF(e,t){const n=e.name;if(e.push===GZ)t.signals[n]||P5("No prior signal definition",n),YZ.forEach(r=>{e[r]!==void 0&&P5("Invalid property ",r)});else{const r=t.addSignal(n,e.value);e.react===!1&&(r.react=!1),e.bind&&t.addBinding(n,e.bind)}}function fy(e,t,n,r){this.id=-1,this.type=e,this.value=t,this.params=n,r&&(this.parent=r)}function ip(e,t,n,r){return new fy(e,t,n,r)}function T0(e,t){return ip("operator",e,t)}function te(e){const t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}function af(e,t){return t?{$field:e,$name:t}:{$field:e}}const dy=af("key");function I5(e,t){return{$compare:e,$order:t}}function XZ(e,t){const n={$key:e};return t&&(n.$flat=!0),n}const VZ="ascending",KZ="descending";function JZ(e){return V(e)?(e.order===KZ?"-":"+")+ap(e.op,e.field):""}function ap(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}const A7="scope",hy="view";function ot(e){return e&&e.signal}function QZ(e){return e&&e.expr}function lh(e){if(ot(e))return!0;if(V(e)){for(const t in e)if(lh(e[t]))return!0}return!1}function gr(e,t){return e??t}function Gs(e){return e&&e.signal||e}const z5="timer";function sf(e,t){return(e.merge?eee:e.stream?tee:e.type?nee:R("Invalid stream specification: "+H(e)))(e,t)}function ZZ(e){return e===A7?hy:e||hy}function eee(e,t){const n=e.merge.map(i=>sf(i,t)),r=k7({merge:n},e,t);return t.addStream(r).id}function tee(e,t){const n=sf(e.stream,t),r=k7({stream:n},e,t);return t.addStream(r).id}function nee(e,t){let n;e.type===z5?(n=t.event(z5,e.throttle),e={between:e.between,filter:e.filter}):n=t.event(ZZ(e.source),e.type);const r=k7({stream:n},e,t);return Object.keys(r).length===1?n:t.addStream(r).id}function k7(e,t,n){let r=t.between;return r&&(r.length!==2&&R('Stream "between" parameter must have 2 entries: '+H(t)),e.between=[sf(r[0],n),sf(r[1],n)]),r=t.filter?[].concat(t.filter):[],(t.marktype||t.markname||t.markrole)&&r.push(ree(t.marktype,t.markname,t.markrole)),t.source===A7&&r.push("inScope(event.item)"),r.length&&(e.filter=ui("("+r.join(")&&(")+")",n).$expr),(r=t.throttle)!=null&&(e.throttle=+r),(r=t.debounce)!=null&&(e.debounce=+r),t.consume&&(e.consume=!0),e}function ree(e,t,n){const r="event.item";return r+(e&&e!=="*"?"&&"+r+".mark.marktype==='"+e+"'":"")+(n?"&&"+r+".mark.role==='"+n+"'":"")+(t?"&&"+r+".mark.name==='"+t+"'":"")}const iee={code:"_.$value",ast:{type:"Identifier",value:"value"}};function aee(e,t,n){const r=e.encode,i={target:n};let a=e.events,s=e.update,o=[];a||R("Signal update missing events specification."),X(a)&&(a=as(a,t.isSubscope()?A7:hy)),a=Y(a).filter(u=>u.signal||u.scale?(o.push(u),0):1),o.length>1&&(o=[oee(o)]),a.length&&o.push(a.length>1?{merge:a}:a[0]),r!=null&&(s&&R("Signal encode and update are mutually exclusive."),s="encode(item(),"+H(r)+")"),i.update=X(s)?ui(s,t):s.expr!=null?ui(s.expr,t):s.value!=null?s.value:s.signal!=null?{$expr:iee,$params:{$value:t.signalRef(s.signal)}}:R("Invalid signal update specification."),e.force&&(i.options={force:!0}),o.forEach(u=>t.addUpdate(ce(see(u,t),i)))}function see(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):sf(e,t)}}function oee(e){return{signal:"["+e.map(t=>t.scale?'scale("'+t.scale+'")':t.signal)+"]"}}function uee(e,t){const n=t.getSignal(e.name);let r=e.update;e.init&&(r?R("Signals can not include both init and update expressions."):(r=e.init,n.initonly=!0)),r&&(r=ui(r,t),n.update=r.$expr,n.params=r.$params),e.on&&e.on.forEach(i=>aee(i,t,n.id))}const Le=e=>(t,n,r)=>ip(e,n,t||void 0,r),MF=Le("aggregate"),cee=Le("axisticks"),TF=Le("bound"),Nr=Le("collect"),B5=Le("compare"),lee=Le("datajoin"),NF=Le("encode"),fee=Le("expression"),dee=Le("facet"),hee=Le("field"),gee=Le("key"),pee=Le("legendentries"),mee=Le("load"),bee=Le("mark"),yee=Le("multiextent"),vee=Le("multivalues"),xee=Le("overlap"),_ee=Le("params"),DF=Le("prefacet"),wee=Le("projection"),Eee=Le("proxy"),See=Le("relay"),OF=Le("render"),$ee=Le("scale"),Co=Le("sieve"),Aee=Le("sortitems"),RF=Le("viewlayout"),kee=Le("values");let Cee=0;const LF={min:"min",max:"max",count:"sum"};function Fee(e,t){const n=e.type||"linear";A$(n)||R("Unrecognized scale type: "+H(n)),t.addScale(e.name,{type:n,domain:void 0})}function Mee(e,t){const n=t.getScale(e.name).params;let r;n.domain=PF(e.domain,e,t),e.range!=null&&(n.range=zF(e,t,n)),e.interpolate!=null&&Bee(e.interpolate,n),e.nice!=null&&(n.nice=zee(e.nice,t)),e.bins!=null&&(n.bins=Iee(e.bins,t));for(r in e)ie(n,r)||r==="name"||(n[r]=Vn(e[r],t))}function Vn(e,t){return V(e)?e.signal?t.signalRef(e.signal):R("Unsupported object: "+H(e)):e}function fh(e,t){return e.signal?t.signalRef(e.signal):e.map(n=>Vn(n,t))}function sp(e){R("Can not find data set: "+H(e))}function PF(e,t,n){if(!e){(t.domainMin!=null||t.domainMax!=null)&&R("No scale domain defined for domainMin/domainMax to override.");return}return e.signal?n.signalRef(e.signal):(P(e)?Tee:e.fields?Dee:Nee)(e,t,n)}function Tee(e,t,n){return e.map(r=>Vn(r,n))}function Nee(e,t,n){const r=n.getData(e.data);return r||sp(e.data),Fu(t.type)?r.valuesRef(n,e.field,IF(e.sort,!1)):F$(t.type)?r.domainRef(n,e.field):r.extentRef(n,e.field)}function Dee(e,t,n){const r=e.data,i=e.fields.reduce((a,s)=>(s=X(s)?{data:r,field:s}:P(s)||s.signal?Oee(s,n):s,a.push(s),a),[]);return(Fu(t.type)?Ree:F$(t.type)?Lee:Pee)(e,n,i)}function Oee(e,t){const n="_:vega:_"+Cee++,r=Nr({});if(P(e))r.value={$ingest:e};else if(e.signal){const i="setdata("+H(n)+","+e.signal+")";r.params.input=t.signalRef(i)}return t.addDataPipeline(n,[r,Co({})]),{data:n,field:"data"}}function Ree(e,t,n){const r=IF(e.sort,!0);let i,a;const s=n.map(c=>{const l=t.getData(c.data);return l||sp(c.data),l.countsRef(t,c.field,r)}),o={groupby:dy,pulse:s};r&&(i=r.op||"count",a=r.field?ap(i,r.field):"count",o.ops=[LF[i]],o.fields=[t.fieldRef(a)],o.as=[a]),i=t.add(MF(o));const u=t.add(Nr({pulse:te(i)}));return a=t.add(kee({field:dy,sort:t.sortRef(r),pulse:te(u)})),te(a)}function IF(e,t){return e&&(!e.field&&!e.op?V(e)?e.field="key":e={field:"key"}:!e.field&&e.op!=="count"?R("No field provided for sort aggregate op: "+e.op):t&&e.field&&e.op&&!LF[e.op]&&R("Multiple domain scales can not be sorted using "+e.op)),e}function Lee(e,t,n){const r=n.map(i=>{const a=t.getData(i.data);return a||sp(i.data),a.domainRef(t,i.field)});return te(t.add(vee({values:r})))}function Pee(e,t,n){const r=n.map(i=>{const a=t.getData(i.data);return a||sp(i.data),a.extentRef(t,i.field)});return te(t.add(yee({extents:r})))}function Iee(e,t){return e.signal||P(e)?fh(e,t):t.objectProperty(e)}function zee(e,t){return e.signal?t.signalRef(e.signal):V(e)?{interval:Vn(e.interval),step:Vn(e.step)}:Vn(e)}function Bee(e,t){t.interpolate=Vn(e.type||e),e.gamma!=null&&(t.interpolateGamma=Vn(e.gamma))}function zF(e,t,n){const r=t.config.range;let i=e.range;if(i.signal)return t.signalRef(i.signal);if(X(i)){if(r&&ie(r,i))return e=ce({},e,{range:r[i]}),zF(e,t,n);i==="width"?i=[0,{signal:"width"}]:i==="height"?i=Fu(e.type)?[0,{signal:"height"}]:[{signal:"height"},0]:R("Unrecognized scale range value: "+H(i))}else if(i.scheme){n.scheme=P(i.scheme)?fh(i.scheme,t):Vn(i.scheme,t),i.extent&&(n.schemeExtent=fh(i.extent,t)),i.count&&(n.schemeCount=Vn(i.count,t));return}else if(i.step){n.rangeStep=Vn(i.step,t);return}else{if(Fu(e.type)&&!P(i))return PF(i,e,t);P(i)||R("Unsupported range type: "+H(i))}return i.map(a=>(P(a)?fh:Vn)(a,t))}function Uee(e,t){const n=t.config.projection||{},r={};for(const i in e)i!=="name"&&(r[i]=gy(e[i],i,t));for(const i in n)r[i]==null&&(r[i]=gy(n[i],i,t));t.addProjection(e.name,r)}function gy(e,t,n){return P(e)?e.map(r=>gy(r,t,n)):V(e)?e.signal?n.signalRef(e.signal):t==="fit"?e:R("Unsupported parameter object: "+H(e)):e}const Dr="top",gc="left",pc="right",Ha="bottom",BF="center",jee="vertical",qee="start",Wee="middle",Hee="end",py="index",C7="label",Gee="offset",Iu="perc",Yee="perc2",Jn="value",qf="guide-label",F7="guide-title",Xee="group-title",Vee="group-subtitle",U5="symbol",dh="gradient",my="discrete",by="size",Kee="shape",Jee="fill",Qee="stroke",Zee="strokeWidth",ete="strokeDash",tte="opacity",M7=[by,Kee,Jee,Qee,Zee,ete,tte],Wf={name:1,style:1,interactive:1},_e={value:0},Qn={value:1},op="group",UF="rect",T7="rule",nte="symbol",Fo="text";function of(e){return e.type=op,e.interactive=e.interactive||!1,e}function An(e,t){const n=(r,i)=>gr(e[r],gr(t[r],i));return n.isVertical=r=>jee===gr(e.direction,t.direction||(r?t.symbolDirection:t.gradientDirection)),n.gradientLength=()=>gr(e.gradientLength,t.gradientLength||t.gradientWidth),n.gradientThickness=()=>gr(e.gradientThickness,t.gradientThickness||t.gradientHeight),n.entryColumns=()=>gr(e.columns,gr(t.columns,+n.isVertical(!0))),n}function jF(e,t){const n=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return n&&n.signal?n:n?n.value:null}function rte(e,t,n){const r=t.config.style[n];return r&&r[e]}function up(e,t,n){return`item.anchor === '${qee}' ? ${e} : item.anchor === '${Hee}' ? ${t} : ${n}`}const N7=up(H(gc),H(pc),H(BF));function ite(e){const t=e("tickBand");let n=e("tickOffset"),r,i;return t?t.signal?(r={signal:`(${t.signal}) === 'extent' ? 1 : 0.5`},i={signal:`(${t.signal}) === 'extent'`},V(n)||(n={signal:`(${t.signal}) === 'extent' ? 0 : ${n}`})):t==="extent"?(r=1,i=!0,n=0):(r=.5,i=!1):(r=e("bandPosition"),i=e("tickExtra")),{extra:i,band:r,offset:n}}function qF(e,t){return t?e?V(e)?Object.assign({},e,{offset:qF(e.offset,t)}):{value:e,offset:t}:t:e}function Bn(e,t){return t?(e.name=t.name,e.style=t.style||e.style,e.interactive=!!t.interactive,e.encode=hc(e.encode,t,Wf)):e.interactive=!1,e}function ate(e,t,n,r){const i=An(e,n),a=i.isVertical(),s=i.gradientThickness(),o=i.gradientLength();let u,c,l,f,d;a?(c=[0,1],l=[0,0],f=s,d=o):(c=[0,0],l=[1,0],f=o,d=s);const h={enter:u={opacity:_e,x:_e,y:_e,width:mt(f),height:mt(d)},update:ce({},u,{opacity:Qn,fill:{gradient:t,start:c,stop:l}}),exit:{opacity:_e}};return Ct(h,{stroke:i("gradientStrokeColor"),strokeWidth:i("gradientStrokeWidth")},{opacity:i("gradientOpacity")}),Bn({type:UF,role:NZ,encode:h},r)}function ste(e,t,n,r,i){const a=An(e,n),s=a.isVertical(),o=a.gradientThickness(),u=a.gradientLength();let c,l,f,d,h="";s?(c="y",f="y2",l="x",d="width",h="1-"):(c="x",f="x2",l="y",d="height");const g={opacity:_e,fill:{scale:t,field:Jn}};g[c]={signal:h+"datum."+Iu,mult:u},g[l]=_e,g[f]={signal:h+"datum."+Yee,mult:u},g[d]=mt(o);const p={enter:g,update:ce({},g,{opacity:Qn}),exit:{opacity:_e}};return Ct(p,{stroke:a("gradientStrokeColor"),strokeWidth:a("gradientStrokeWidth")},{opacity:a("gradientOpacity")}),Bn({type:UF,role:MZ,key:Jn,from:i,encode:p},r)}const ote=`datum.${Iu}<=0?"${gc}":datum.${Iu}>=1?"${pc}":"${BF}"`,ute=`datum.${Iu}<=0?"${Ha}":datum.${Iu}>=1?"${Dr}":"${Wee}"`;function j5(e,t,n,r){const i=An(e,t),a=i.isVertical(),s=mt(i.gradientThickness()),o=i.gradientLength();let u=i("labelOverlap"),c,l,f,d,h="";const g={enter:c={opacity:_e},update:l={opacity:Qn,text:{field:C7}},exit:{opacity:_e}};return Ct(g,{fill:i("labelColor"),fillOpacity:i("labelOpacity"),font:i("labelFont"),fontSize:i("labelFontSize"),fontStyle:i("labelFontStyle"),fontWeight:i("labelFontWeight"),limit:gr(e.labelLimit,t.gradientLabelLimit)}),a?(c.align={value:"left"},c.baseline=l.baseline={signal:ute},f="y",d="x",h="1-"):(c.align=l.align={signal:ote},c.baseline={value:"top"},f="x",d="y"),c[f]=l[f]={signal:h+"datum."+Iu,mult:o},c[d]=l[d]=s,s.offset=gr(e.labelOffset,t.gradientLabelOffset)||0,u=u?{separation:i("labelSeparation"),method:u,order:"datum."+py}:void 0,Bn({type:Fo,role:SF,style:qf,key:Jn,from:r,encode:g,overlap:u},n)}function cte(e,t,n,r,i){const a=An(e,t),s=n.entries,o=!!(s&&s.interactive),u=s?s.name:void 0,c=a("clipHeight"),l=a("symbolOffset"),f={data:"value"},d=`(${i}) ? datum.${Gee} : datum.${by}`,h=c?mt(c):{field:by},g=`datum.${py}`,p=`max(1, ${i})`;let m,b,y,v,x;h.mult=.5,m={enter:b={opacity:_e,x:{signal:d,mult:.5,offset:l},y:h},update:y={opacity:Qn,x:b.x,y:b.y},exit:{opacity:_e}};let _=null,E=null;e.fill||(_=t.symbolBaseFillColor,E=t.symbolBaseStrokeColor),Ct(m,{fill:a("symbolFillColor",_),shape:a("symbolType"),size:a("symbolSize"),stroke:a("symbolStrokeColor",E),strokeDash:a("symbolDash"),strokeDashOffset:a("symbolDashOffset"),strokeWidth:a("symbolStrokeWidth")},{opacity:a("symbolOpacity")}),M7.forEach(F=>{e[F]&&(y[F]=b[F]={scale:e[F],field:Jn})});const w=Bn({type:nte,role:DZ,key:Jn,from:f,clip:c?!0:void 0,encode:m},n.symbols),S=mt(l);S.offset=a("labelOffset"),m={enter:b={opacity:_e,x:{signal:d,offset:S},y:h},update:y={opacity:Qn,text:{field:C7},x:b.x,y:b.y},exit:{opacity:_e}},Ct(m,{align:a("labelAlign"),baseline:a("labelBaseline"),fill:a("labelColor"),fillOpacity:a("labelOpacity"),font:a("labelFont"),fontSize:a("labelFontSize"),fontStyle:a("labelFontStyle"),fontWeight:a("labelFontWeight"),limit:a("labelLimit")});const $=Bn({type:Fo,role:SF,style:qf,key:Jn,from:f,encode:m},n.labels);return m={enter:{noBound:{value:!c},width:_e,height:c?mt(c):_e,opacity:_e},exit:{opacity:_e},update:y={opacity:Qn,row:{signal:null},column:{signal:null}}},a.isVertical(!0)?(v=`ceil(item.mark.items.length / ${p})`,y.row.signal=`${g}%${v}`,y.column.signal=`floor(${g} / ${v})`,x={field:["row",g]}):(y.row.signal=`floor(${g} / ${p})`,y.column.signal=`${g} % ${p}`,x={field:g}),y.column.signal=`(${i})?${y.column.signal}:${g}`,r={facet:{data:r,name:"value",groupby:py}},of({role:$7,from:r,encode:hc(m,s,Wf),marks:[w,$],name:u,interactive:o,sort:x})}function lte(e,t){const n=An(e,t);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:!0,column:!1},padding:{row:n("rowPadding"),column:n("columnPadding")}}}const D7='item.orient === "left"',O7='item.orient === "right"',cp=`(${D7} || ${O7})`,fte=`datum.vgrad && ${cp}`,dte=up('"top"','"bottom"','"middle"'),hte=up('"right"','"left"','"center"'),gte=`datum.vgrad && ${O7} ? (${hte}) : (${cp} && !(datum.vgrad && ${D7})) ? "left" : ${N7}`,pte=`item._anchor || (${cp} ? "middle" : "start")`,mte=`${fte} ? (${D7} ? -90 : 90) : 0`,bte=`${cp} ? (datum.vgrad ? (${O7} ? "bottom" : "top") : ${dte}) : "top"`;function yte(e,t,n,r){const i=An(e,t),a={enter:{opacity:_e},update:{opacity:Qn,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:_e}};return Ct(a,{orient:i("titleOrient"),_anchor:i("titleAnchor"),anchor:{signal:pte},angle:{signal:mte},align:{signal:gte},baseline:{signal:bte},text:e.title,fill:i("titleColor"),fillOpacity:i("titleOpacity"),font:i("titleFont"),fontSize:i("titleFontSize"),fontStyle:i("titleFontStyle"),fontWeight:i("titleFontWeight"),limit:i("titleLimit"),lineHeight:i("titleLineHeight")},{align:i("titleAlign"),baseline:i("titleBaseline")}),Bn({type:Fo,role:OZ,style:F7,from:r,encode:a},n)}function vte(e,t){let n;return V(e)&&(e.signal?n=e.signal:e.path?n="pathShape("+q5(e.path)+")":e.sphere&&(n="geoShape("+q5(e.sphere)+', {type: "Sphere"})')),n?t.signalRef(n):!!e}function q5(e){return V(e)&&e.signal?e.signal:H(e)}function WF(e){const t=e.role||"";return t.startsWith("axis")||t.startsWith("legend")||t.startsWith("title")?t:e.type===op?$7:t||E7}function xte(e){return{marktype:e.type,name:e.name||void 0,role:e.role||WF(e),zindex:+e.zindex||void 0,aria:e.aria,description:e.description}}function _te(e,t){return e&&e.signal?t.signalRef(e.signal):e!==!1}function R7(e,t){const n=CE(e.type);n||R("Unrecognized transform type: "+H(e.type));const r=ip(n.type.toLowerCase(),null,HF(n,e,t));return e.signal&&t.addSignal(e.signal,t.proxy(r)),r.metadata=n.metadata||{},r}function HF(e,t,n){const r={},i=e.params.length;for(let a=0;aW5(e,a,n)):W5(e,i,n)}function W5(e,t,n){const r=e.type;if(ot(t))return G5(r)?R("Expression references can not be signals."):um(r)?n.fieldRef(t):Y5(r)?n.compareRef(t):n.signalRef(t.signal);{const i=e.expr||um(r);return i&&$te(t)?n.exprRef(t.expr,t.as):i&&Ate(t)?af(t.field,t.as):G5(r)?ui(t,n):kte(r)?te(n.getData(t).values):um(r)?af(t):Y5(r)?n.compareRef(t):t}}function Ete(e,t,n){return X(t.from)||R('Lookup "from" parameter must be a string literal.'),n.getData(t.from).lookupRef(n,t.key)}function Ste(e,t,n){const r=t[e.name];return e.array?(P(r)||R("Expected an array of sub-parameters. Instead: "+H(r)),r.map(i=>H5(e,i,n))):H5(e,r,n)}function H5(e,t,n){const r=e.params.length;let i;for(let s=0;se&&e.expr,Ate=e=>e&&e.field,kte=e=>e==="data",G5=e=>e==="expr",um=e=>e==="field",Y5=e=>e==="compare";function Cte(e,t,n){let r,i,a,s,o;return e?(r=e.facet)&&(t||R("Only group marks can be faceted."),r.field!=null?s=o=hh(r,n):(e.data?o=te(n.getData(e.data).aggregate):(a=R7(ce({type:"aggregate",groupby:Y(r.groupby)},r.aggregate),n),a.params.key=n.keyRef(r.groupby),a.params.pulse=hh(r,n),s=o=te(n.add(a))),i=n.keyRef(r.groupby,!0))):s=te(n.add(Nr(null,[{}]))),s||(s=hh(e,n)),{key:i,pulse:s,parent:o}}function hh(e,t){return e.$ref?e:e.data&&e.data.$ref?e.data:te(t.getData(e.data).output)}function uo(e,t,n,r,i){this.scope=e,this.input=t,this.output=n,this.values=r,this.aggregate=i,this.index={}}uo.fromEntries=function(e,t){const n=t.length,r=t[n-1],i=t[n-2];let a=t[0],s=null,o=1;for(a&&a.type==="load"&&(a=t[1]),e.add(t[0]);of??"null").join(",")+"),0)",l=ui(c,t);u.update=l.$expr,u.params=l.$params}function lp(e,t){const n=WF(e),r=e.type===op,i=e.from&&e.from.facet,a=e.overlap;let s=e.layout||n===$7||n===S7,o,u,c,l,f,d,h;const g=n===E7||s||i,p=Cte(e.from,r,t);u=t.add(lee({key:p.key||(e.key?af(e.key):void 0),pulse:p.pulse,clean:!r}));const m=te(u);u=c=t.add(Nr({pulse:m})),u=t.add(bee({markdef:xte(e),interactive:_te(e.interactive,t),clip:vte(e.clip,t),context:{$context:!0},groups:t.lookup(),parent:t.signals.parent?t.signalRef("parent"):null,index:t.markpath(),pulse:te(u)}));const b=te(u);u=l=t.add(NF(CF(e.encode,e.type,n,e.style,t,{mod:!1,pulse:b}))),u.params.parent=t.encode(),e.transform&&e.transform.forEach(E=>{const w=R7(E,t),S=w.metadata;(S.generates||S.changes)&&R("Mark transforms should not generate new data."),S.nomod||(l.params.mod=!0),w.params.pulse=te(u),t.add(u=w)}),e.sort&&(u=t.add(Aee({sort:t.compareRef(e.sort),pulse:te(u)})));const y=te(u);(i||s)&&(s=t.add(RF({layout:t.objectProperty(e.layout),legends:t.legends,mark:b,pulse:y})),d=te(s));const v=t.add(TF({mark:b,pulse:d||y}));h=te(v),r&&(g&&(o=t.operators,o.pop(),s&&o.pop()),t.pushState(y,d||h,m),i?Fte(e,t,p):g?Mte(e,t,p):t.parse(e),t.popState(),g&&(s&&o.push(s),o.push(v))),a&&(h=Tte(a,h,t));const x=t.add(OF({pulse:h})),_=t.add(Co({pulse:te(x)},void 0,t.parent()));e.name!=null&&(f=e.name,t.addData(f,new uo(t,c,x,_)),e.on&&e.on.forEach(E=>{(E.insert||E.remove||E.toggle)&&R("Marks only support modify triggers."),YF(E,t,f)}))}function Tte(e,t,n){const r=e.method,i=e.bound,a=e.separation,s={separation:ot(a)?n.signalRef(a.signal):a,method:ot(r)?n.signalRef(r.signal):r,pulse:t};if(e.order&&(s.sort=n.compareRef({field:e.order})),i){const o=i.tolerance;s.boundTolerance=ot(o)?n.signalRef(o.signal):+o,s.boundScale=n.scaleRef(i.scale),s.boundOrient=i.orient}return te(n.add(xee(s)))}function Nte(e,t){const n=t.config.legend,r=e.encode||{},i=An(e,n),a=r.legend||{},s=a.name||void 0,o=a.interactive,u=a.style,c={};let l=0,f,d,h;M7.forEach(v=>e[v]?(c[v]=e[v],l=l||e[v]):0),l||R("Missing valid scale for legend.");const g=Dte(e,t.scaleType(l)),p={title:e.title!=null,scales:c,type:g,vgrad:g!=="symbol"&&i.isVertical()},m=te(t.add(Nr(null,[p]))),b={enter:{x:{value:0},y:{value:0}}},y=te(t.add(pee(d={type:g,scale:t.scaleRef(l),count:t.objectProperty(i("tickCount")),limit:t.property(i("symbolLimit")),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)})));return g===dh?(h=[ate(e,l,n,r.gradient),j5(e,n,r.labels,y)],d.count=d.count||t.signalRef(`max(2,2*floor((${Gs(i.gradientLength())})/100))`)):g===my?h=[ste(e,l,n,r.gradient,y),j5(e,n,r.labels,y)]:(f=lte(e,n),h=[cte(e,n,r,y,Gs(f.columns))],d.size=Lte(e,t,h[0].marks)),h=[of({role:TZ,from:m,encode:b,marks:h,layout:f,interactive:o})],p.title&&h.push(yte(e,n,r.title,m)),lp(of({role:FZ,from:m,encode:hc(Rte(i,e,n),a,Wf),marks:h,aria:i("aria"),description:i("description"),zindex:i("zindex"),name:s,interactive:o,style:u}),t)}function Dte(e,t){let n=e.type||U5;return!e.type&&Ote(e)===1&&(e.fill||e.stroke)&&(n=T4(t)?dh:ob(t)?my:U5),n!==dh?n:ob(t)?my:dh}function Ote(e){return M7.reduce((t,n)=>t+(e[n]?1:0),0)}function Rte(e,t,n){const r={enter:{},update:{}};return Ct(r,{orient:e("orient"),offset:e("offset"),padding:e("padding"),titlePadding:e("titlePadding"),cornerRadius:e("cornerRadius"),fill:e("fillColor"),stroke:e("strokeColor"),strokeWidth:n.strokeWidth,strokeDash:n.strokeDash,x:e("legendX"),y:e("legendY"),format:t.format,formatType:t.formatType}),r}function Lte(e,t,n){const r=Gs(V5("size",e,n)),i=Gs(V5("strokeWidth",e,n)),a=Gs(Pte(n[1].encode,t,qf));return ui(`max(ceil(sqrt(${r})+${i}),${a})`,t)}function V5(e,t,n){return t[e]?`scale("${t[e]}",datum)`:jF(e,n[0].encode)}function Pte(e,t,n){return jF("fontSize",e)||rte("fontSize",t,n)}const Ite=`item.orient==="${gc}"?-90:item.orient==="${pc}"?90:0`;function zte(e,t){e=X(e)?{text:e}:e;const n=An(e,t.config.title),r=e.encode||{},i=r.group||{},a=i.name||void 0,s=i.interactive,o=i.style,u=[],c={},l=te(t.add(Nr(null,[c])));return u.push(jte(e,n,Bte(e),l)),e.subtitle&&u.push(qte(e,n,r.subtitle,l)),lp(of({role:RZ,from:l,encode:Ute(n,i),marks:u,aria:n("aria"),description:n("description"),zindex:n("zindex"),name:a,interactive:s,style:o}),t)}function Bte(e){const t=e.encode;return t&&t.title||ce({name:e.name,interactive:e.interactive,style:e.style},t)}function Ute(e,t){const n={enter:{},update:{}};return Ct(n,{orient:e("orient"),anchor:e("anchor"),align:{signal:N7},angle:{signal:Ite},limit:e("limit"),frame:e("frame"),offset:e("offset")||0,padding:e("subtitlePadding")}),hc(n,t,Wf)}function jte(e,t,n,r){const i={value:0},a=e.text,s={enter:{opacity:i},update:{opacity:{value:1}},exit:{opacity:i}};return Ct(s,{text:a,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("color"),font:t("font"),fontSize:t("fontSize"),fontStyle:t("fontStyle"),fontWeight:t("fontWeight"),lineHeight:t("lineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),Bn({type:Fo,role:LZ,style:Xee,from:r,encode:s},n)}function qte(e,t,n,r){const i={value:0},a=e.subtitle,s={enter:{opacity:i},update:{opacity:{value:1}},exit:{opacity:i}};return Ct(s,{text:a,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("subtitleColor"),font:t("subtitleFont"),fontSize:t("subtitleFontSize"),fontStyle:t("subtitleFontStyle"),fontWeight:t("subtitleFontWeight"),lineHeight:t("subtitleLineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),Bn({type:Fo,role:PZ,style:Vee,from:r,encode:s},n)}function Wte(e,t){const n=[];e.transform&&e.transform.forEach(r=>{n.push(R7(r,t))}),e.on&&e.on.forEach(r=>{YF(r,t,e.name)}),t.addDataPipeline(e.name,Hte(e,t,n))}function Hte(e,t,n){const r=[];let i=null,a=!1,s=!1,o,u,c,l,f;for(e.values?ot(e.values)||lh(e.format)?(r.push(K5(t,e)),r.push(i=ys())):r.push(i=ys({$ingest:e.values,$format:e.format})):e.url?lh(e.url)||lh(e.format)?(r.push(K5(t,e)),r.push(i=ys())):r.push(i=ys({$request:e.url,$format:e.format})):e.source&&(i=o=Y(e.source).map(d=>te(t.getData(d).output)),r.push(null)),u=0,c=n.length;ue===Ha||e===Dr,fp=(e,t,n)=>ot(e)?Vte(e.signal,t,n):e===gc||e===Dr?t:n,bt=(e,t,n)=>ot(e)?Yte(e.signal,t,n):XF(e)?t:n,Sr=(e,t,n)=>ot(e)?Xte(e.signal,t,n):XF(e)?n:t,VF=(e,t,n)=>ot(e)?Kte(e.signal,t,n):e===Dr?{value:t}:{value:n},Gte=(e,t,n)=>ot(e)?Jte(e.signal,t,n):e===pc?{value:t}:{value:n},Yte=(e,t,n)=>KF(`${e} === '${Dr}' || ${e} === '${Ha}'`,t,n),Xte=(e,t,n)=>KF(`${e} !== '${Dr}' && ${e} !== '${Ha}'`,t,n),Vte=(e,t,n)=>L7(`${e} === '${gc}' || ${e} === '${Dr}'`,t,n),Kte=(e,t,n)=>L7(`${e} === '${Dr}'`,t,n),Jte=(e,t,n)=>L7(`${e} === '${pc}'`,t,n),KF=(e,t,n)=>(t=t!=null?mt(t):t,n=n!=null?mt(n):n,J5(t)&&J5(n)?(t=t?t.signal||H(t.value):null,n=n?n.signal||H(n.value):null,{signal:`${e} ? (${t}) : (${n})`}):[ce({test:e},t)].concat(n||[])),J5=e=>e==null||Object.keys(e).length===1,L7=(e,t,n)=>({signal:`${e} ? (${ou(t)}) : (${ou(n)})`}),Qte=(e,t,n,r,i)=>({signal:(r!=null?`${e} === '${gc}' ? (${ou(r)}) : `:"")+(n!=null?`${e} === '${Ha}' ? (${ou(n)}) : `:"")+(i!=null?`${e} === '${pc}' ? (${ou(i)}) : `:"")+(t!=null?`${e} === '${Dr}' ? (${ou(t)}) : `:"")+"(null)"}),ou=e=>ot(e)?e.signal:e==null?null:H(e),Zte=(e,t)=>t===0?0:ot(e)?{signal:`(${e.signal}) * ${t}`}:{value:e*t},du=(e,t)=>{const n=e.signal;return n&&n.endsWith("(null)")?{signal:n.slice(0,-6)+t.signal}:e};function Yo(e,t,n,r){let i;if(t&&ie(t,e))return t[e];if(ie(n,e))return n[e];if(e.startsWith("title")){switch(e){case"titleColor":i="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":i=e[5].toLowerCase()+e.slice(6)}return r[F7][i]}else if(e.startsWith("label")){switch(e){case"labelColor":i="fill";break;case"labelFont":case"labelFontSize":i=e[5].toLowerCase()+e.slice(6)}return r[qf][i]}return null}function Q5(e){const t={};for(const n of e)if(n)for(const r in n)t[r]=1;return Object.keys(t)}function ene(e,t){var n=t.config,r=n.style,i=n.axis,a=t.scaleType(e.scale)==="band"&&n.axisBand,s=e.orient,o,u,c;if(ot(s)){const f=Q5([n.axisX,n.axisY]),d=Q5([n.axisTop,n.axisBottom,n.axisLeft,n.axisRight]);o={};for(c of f)o[c]=bt(s,Yo(c,n.axisX,i,r),Yo(c,n.axisY,i,r));u={};for(c of d)u[c]=Qte(s.signal,Yo(c,n.axisTop,i,r),Yo(c,n.axisBottom,i,r),Yo(c,n.axisLeft,i,r),Yo(c,n.axisRight,i,r))}else o=s===Dr||s===Ha?n.axisX:n.axisY,u=n["axis"+s[0].toUpperCase()+s.slice(1)];return o||u||a?ce({},i,o,u,a):i}function tne(e,t,n,r){const i=An(e,t),a=e.orient;let s,o;const u={enter:s={opacity:_e},update:o={opacity:Qn},exit:{opacity:_e}};Ct(u,{stroke:i("domainColor"),strokeCap:i("domainCap"),strokeDash:i("domainDash"),strokeDashOffset:i("domainDashOffset"),strokeWidth:i("domainWidth"),strokeOpacity:i("domainOpacity")});const c=Z5(e,0),l=Z5(e,1);return s.x=o.x=bt(a,c,_e),s.x2=o.x2=bt(a,l),s.y=o.y=Sr(a,c,_e),s.y2=o.y2=Sr(a,l),Bn({type:T7,role:SZ,from:r,encode:u},n)}function Z5(e,t){return{scale:e.scale,range:t}}function nne(e,t,n,r,i){const a=An(e,t),s=e.orient,o=e.gridScale,u=fp(s,1,-1),c=rne(e.offset,u);let l,f,d;const h={enter:l={opacity:_e},update:d={opacity:Qn},exit:f={opacity:_e}};Ct(h,{stroke:a("gridColor"),strokeCap:a("gridCap"),strokeDash:a("gridDash"),strokeDashOffset:a("gridDashOffset"),strokeOpacity:a("gridOpacity"),strokeWidth:a("gridWidth")});const g={scale:e.scale,field:Jn,band:i.band,extra:i.extra,offset:i.offset,round:a("tickRound")},p=bt(s,{signal:"height"},{signal:"width"}),m=o?{scale:o,range:0,mult:u,offset:c}:{value:0,offset:c},b=o?{scale:o,range:1,mult:u,offset:c}:ce(p,{mult:u,offset:c});return l.x=d.x=bt(s,g,m),l.y=d.y=Sr(s,g,m),l.x2=d.x2=Sr(s,b),l.y2=d.y2=bt(s,b),f.x=bt(s,g),f.y=Sr(s,g),Bn({type:T7,role:$Z,key:Jn,from:r,encode:h},n)}function rne(e,t){if(t!==1)if(!V(e))e=ot(t)?{signal:`(${t.signal}) * (${e||0})`}:t*(e||0);else{let n=e=ce({},e);for(;n.mult!=null;)if(V(n.mult))n=n.mult=ce({},n.mult);else return n.mult=ot(t)?{signal:`(${n.mult}) * (${t.signal})`}:n.mult*t,e;n.mult=t}return e}function ine(e,t,n,r,i,a){const s=An(e,t),o=e.orient,u=fp(o,-1,1);let c,l,f;const d={enter:c={opacity:_e},update:f={opacity:Qn},exit:l={opacity:_e}};Ct(d,{stroke:s("tickColor"),strokeCap:s("tickCap"),strokeDash:s("tickDash"),strokeDashOffset:s("tickDashOffset"),strokeOpacity:s("tickOpacity"),strokeWidth:s("tickWidth")});const h=mt(i);h.mult=u;const g={scale:e.scale,field:Jn,band:a.band,extra:a.extra,offset:a.offset,round:s("tickRound")};return f.y=c.y=bt(o,_e,g),f.y2=c.y2=bt(o,h),l.x=bt(o,g),f.x=c.x=Sr(o,_e,g),f.x2=c.x2=Sr(o,h),l.y=Sr(o,g),Bn({type:T7,role:kZ,key:Jn,from:r,encode:d},n)}function cm(e,t,n,r,i){return{signal:'flush(range("'+e+'"), scale("'+e+'", datum.value), '+t+","+n+","+r+","+i+")"}}function ane(e,t,n,r,i,a){const s=An(e,t),o=e.orient,u=e.scale,c=fp(o,-1,1),l=Gs(s("labelFlush")),f=Gs(s("labelFlushOffset")),d=s("labelAlign"),h=s("labelBaseline");let g=l===0||!!l,p;const m=mt(i);m.mult=c,m.offset=mt(s("labelPadding")||0),m.offset.mult=c;const b={scale:u,field:Jn,band:.5,offset:qF(a.offset,s("labelOffset"))},y=bt(o,g?cm(u,l,'"left"','"right"','"center"'):{value:"center"},Gte(o,"left","right")),v=bt(o,VF(o,"bottom","top"),g?cm(u,l,'"top"','"bottom"','"middle"'):{value:"middle"}),x=cm(u,l,`-(${f})`,f,0);g=g&&f;const _={opacity:_e,x:bt(o,b,m),y:Sr(o,b,m)},E={enter:_,update:p={opacity:Qn,text:{field:C7},x:_.x,y:_.y,align:y,baseline:v},exit:{opacity:_e,x:_.x,y:_.y}};Ct(E,{dx:!d&&g?bt(o,x):null,dy:!h&&g?Sr(o,x):null}),Ct(E,{angle:s("labelAngle"),fill:s("labelColor"),fillOpacity:s("labelOpacity"),font:s("labelFont"),fontSize:s("labelFontSize"),fontWeight:s("labelFontWeight"),fontStyle:s("labelFontStyle"),limit:s("labelLimit"),lineHeight:s("labelLineHeight")},{align:d,baseline:h});const w=s("labelBound");let S=s("labelOverlap");return S=S||w?{separation:s("labelSeparation"),method:S,order:"datum.index",bound:w?{scale:u,orient:o,tolerance:w}:null}:void 0,p.align!==y&&(p.align=du(p.align,y)),p.baseline!==v&&(p.baseline=du(p.baseline,v)),Bn({type:Fo,role:AZ,style:qf,key:Jn,from:r,encode:E,overlap:S},n)}function sne(e,t,n,r){const i=An(e,t),a=e.orient,s=fp(a,-1,1);let o,u;const c={enter:o={opacity:_e,anchor:mt(i("titleAnchor",null)),align:{signal:N7}},update:u=ce({},o,{opacity:Qn,text:mt(e.title)}),exit:{opacity:_e}},l={signal:`lerp(range("${e.scale}"), ${up(0,1,.5)})`};return u.x=bt(a,l),u.y=Sr(a,l),o.angle=bt(a,_e,Zte(s,90)),o.baseline=bt(a,VF(a,Ha,Dr),{value:Ha}),u.angle=o.angle,u.baseline=o.baseline,Ct(c,{fill:i("titleColor"),fillOpacity:i("titleOpacity"),font:i("titleFont"),fontSize:i("titleFontSize"),fontStyle:i("titleFontStyle"),fontWeight:i("titleFontWeight"),limit:i("titleLimit"),lineHeight:i("titleLineHeight")},{align:i("titleAlign"),angle:i("titleAngle"),baseline:i("titleBaseline")}),one(i,a,c,n),c.update.align=du(c.update.align,o.align),c.update.angle=du(c.update.angle,o.angle),c.update.baseline=du(c.update.baseline,o.baseline),Bn({type:Fo,role:CZ,style:F7,from:r,encode:c},n)}function one(e,t,n,r){const i=(o,u)=>o!=null?(n.update[u]=du(mt(o),n.update[u]),!1):!eu(u,r),a=i(e("titleX"),"x"),s=i(e("titleY"),"y");n.enter.auto=s===a?mt(s):bt(t,mt(s),mt(a))}function une(e,t){const n=ene(e,t),r=e.encode||{},i=r.axis||{},a=i.name||void 0,s=i.interactive,o=i.style,u=An(e,n),c=ite(u),l={scale:e.scale,ticks:!!u("ticks"),labels:!!u("labels"),grid:!!u("grid"),domain:!!u("domain"),title:e.title!=null},f=te(t.add(Nr({},[l]))),d=te(t.add(cee({scale:t.scaleRef(e.scale),extra:t.property(c.extra),count:t.objectProperty(e.tickCount),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)}))),h=[];let g;return l.grid&&h.push(nne(e,n,r.grid,d,c)),l.ticks&&(g=u("tickSize"),h.push(ine(e,n,r.ticks,d,g,c))),l.labels&&(g=l.ticks?g:0,h.push(ane(e,n,r.labels,d,g,c))),l.domain&&h.push(tne(e,n,r.domain,f)),l.title&&h.push(sne(e,n,r.title,f)),lp(of({role:EZ,from:f,encode:hc(cne(u,e),i,Wf),marks:h,aria:u("aria"),description:u("description"),zindex:u("zindex"),name:a,interactive:s,style:o}),t)}function cne(e,t){const n={enter:{},update:{}};return Ct(n,{orient:e("orient"),offset:e("offset")||0,position:gr(t.position,0),titlePadding:e("titlePadding"),minExtent:e("minExtent"),maxExtent:e("maxExtent"),range:{signal:`abs(span(range("${t.scale}")))`},translate:e("translate"),format:t.format,formatType:t.formatType}),n}function JF(e,t,n){const r=Y(e.signals),i=Y(e.scales);return n||r.forEach(a=>FF(a,t)),Y(e.projections).forEach(a=>Uee(a,t)),i.forEach(a=>Fee(a,t)),Y(e.data).forEach(a=>Wte(a,t)),i.forEach(a=>Mee(a,t)),(n||r).forEach(a=>uee(a,t)),Y(e.axes).forEach(a=>une(a,t)),Y(e.marks).forEach(a=>lp(a,t)),Y(e.legends).forEach(a=>Nte(a,t)),e.title&&zte(e.title,t),t.parseLambdas(),t}const lne=e=>hc({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},e);function fne(e,t){const n=t.config,r=te(t.root=t.add(T0())),i=dne(e,n);i.forEach(c=>FF(c,t)),t.description=e.description||n.description,t.eventConfig=n.events,t.legends=t.objectProperty(n.legend&&n.legend.layout),t.locale=n.locale;const a=t.add(Nr()),s=t.add(NF(CF(lne(e.encode),op,S7,e.style,t,{pulse:te(a)}))),o=t.add(RF({layout:t.objectProperty(e.layout),legends:t.legends,autosize:t.signalRef("autosize"),mark:r,pulse:te(s)}));t.operators.pop(),t.pushState(te(s),te(o),null),JF(e,t,i),t.operators.push(o);let u=t.add(TF({mark:r,pulse:te(o)}));return u=t.add(OF({pulse:te(u)})),u=t.add(Co({pulse:te(u)})),t.addData("root",new uo(t,a,a,u)),t}function jc(e,t){return t&&t.signal?{name:e,update:t.signal}:{name:e,value:t}}function dne(e,t){const n=s=>gr(e[s],t[s]),r=[jc("background",n("background")),jc("autosize",xZ(n("autosize"))),jc("padding",wZ(n("padding"))),jc("width",n("width")||0),jc("height",n("height")||0)],i=r.reduce((s,o)=>(s[o.name]=o,s),{}),a={};return Y(e.signals).forEach(s=>{ie(i,s.name)?s=ce(i[s.name],s):r.push(s),a[s.name]=s}),Y(t.signals).forEach(s=>{!ie(a,s.name)&&!ie(i,s.name)&&r.push(s)}),r}function QF(e,t){this.config=e||{},this.options=t||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function ex(e){this.config=e.config,this.options=e.options,this.legends=e.legends,this.field=Object.create(e.field),this.signals=Object.create(e.signals),this.lambdas=Object.create(e.lambdas),this.scales=Object.create(e.scales),this.events=Object.create(e.events),this.data=Object.create(e.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++e._nextsub[0],this._nextsub=e._nextsub,this._parent=e._parent.slice(),this._encode=e._encode.slice(),this._lookup=e._lookup.slice(),this._markpath=e._markpath}QF.prototype=ex.prototype={parse(e){return JF(e,this)},fork(){return new ex(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(e){return this.operators.push(e),e.id=this.id(),e.refs&&(e.refs.forEach(t=>{t.$ref=e.id}),e.refs=null),e},proxy(e){const t=e instanceof fy?te(e):e;return this.add(Eee({value:t}))},addStream(e){return this.streams.push(e),e.id=this.id(),e},addUpdate(e){return this.updates.push(e),e},finish(){let e,t;this.root&&(this.root.root=!0);for(e in this.signals)this.signals[e].signal=e;for(e in this.scales)this.scales[e].scale=e;function n(r,i,a){let s,o;r&&(s=r.data||(r.data={}),o=s[i]||(s[i]=[]),o.push(a))}for(e in this.data){t=this.data[e],n(t.input,e,"input"),n(t.output,e,"output"),n(t.values,e,"values");for(const r in t.index)n(t.index[r],e,"index:"+r)}return this},pushState(e,t,n){this._encode.push(te(this.add(Co({pulse:e})))),this._parent.push(t),this._lookup.push(n?te(this.proxy(n)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return xe(this._parent)},encode(){return xe(this._encode)},lookup(){return xe(this._lookup)},markpath(){const e=this._markpath;return++e[e.length-1]},fieldRef(e,t){if(X(e))return af(e,t);e.signal||R("Unsupported field reference: "+H(e));const n=e.signal;let r=this.field[n];if(!r){const i={name:this.signalRef(n)};t&&(i.as=t),this.field[n]=r=te(this.add(hee(i)))}return r},compareRef(e){let t=!1;const n=a=>ot(a)?(t=!0,this.signalRef(a.signal)):QZ(a)?(t=!0,this.exprRef(a.expr)):a,r=Y(e.field).map(n),i=Y(e.order).map(n);return t?te(this.add(B5({fields:r,orders:i}))):I5(r,i)},keyRef(e,t){let n=!1;const r=a=>ot(a)?(n=!0,te(i[a.signal])):a,i=this.signals;return e=Y(e).map(r),n?te(this.add(gee({fields:e,flat:t}))):XZ(e,t)},sortRef(e){if(!e)return e;const t=ap(e.op,e.field),n=e.order||VZ;return n.signal?te(this.add(B5({fields:t,orders:this.signalRef(n.signal)}))):I5(t,n)},event(e,t){const n=e+":"+t;if(!this.events[n]){const r=this.id();this.streams.push({id:r,source:e,type:t}),this.events[n]=r}return this.events[n]},hasOwnSignal(e){return ie(this.signals,e)},addSignal(e,t){this.hasOwnSignal(e)&&R("Duplicate signal name: "+H(e));const n=t instanceof fy?t:this.add(T0(t));return this.signals[e]=n},getSignal(e){return this.signals[e]||R("Unrecognized signal name: "+H(e)),this.signals[e]},signalRef(e){return this.signals[e]?te(this.signals[e]):(ie(this.lambdas,e)||(this.lambdas[e]=this.add(T0(null))),te(this.lambdas[e]))},parseLambdas(){const e=Object.keys(this.lambdas);for(let t=0,n=e.length;t0?",":"")+(V(i)?i.signal||P7(i):H(i))}return n+"]"}function gne(e){let t="{",n=0,r,i;for(r in e)i=e[r],t+=(++n>1?",":"")+H(r)+":"+(V(i)?i.signal||P7(i):H(i));return t+"}"}function pne(){const e="sans-serif",r="#4c78a8",i="#000",a="#888",s="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:r},area:{fill:r},image:null,line:{stroke:r,strokeWidth:2},path:{stroke:r},rect:{fill:r},rule:{stroke:i},shape:{stroke:r},symbol:{fill:r,size:64},text:{fill:i,font:e,fontSize:11},trail:{fill:r,size:2},style:{"guide-label":{fill:i,font:e,fontSize:10},"guide-title":{fill:i,font:e,fontSize:11,fontWeight:"bold"},"group-title":{fill:i,font:e,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:i,font:e,fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:s},view:{fill:"transparent"}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:a,grid:!1,gridWidth:1,gridColor:s,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:a,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:s,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:a,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}function mne(e,t,n){return V(e)||R("Input Vega specification must be an object."),t=ec(pne(),t,e.config),fne(e,new QF(t,n)).toRuntime()}var bne="5.28.0";ce(Su,wI,qq,_W,sG,eY,kX,sX,FX,ZX,cV,mV);const yne=Object.freeze(Object.defineProperty({__proto__:null,Bounds:nt,CanvasHandler:qa,CanvasRenderer:Xl,DATE:xn,DAY:Lt,DAYOFYEAR:si,Dataflow:uu,Debug:K_,Error:Hy,EventStream:fg,Gradient:W$,GroupItem:Og,HOURS:Pn,Handler:ja,HybridHandler:f9,HybridRenderer:Yh,Info:V_,Item:Dg,MILLISECONDS:kr,MINUTES:In,MONTH:Ut,Marks:zn,MultiPulse:m2,None:X_,Operator:Pe,Parameters:lg,Pulse:Ma,QUARTER:vn,RenderType:wa,Renderer:jn,ResourceLoader:B4,SECONDS:tr,SVGHandler:i9,SVGRenderer:jg,SVGStringRenderer:l9,Scenegraph:n9,TIME_UNITS:s2,Transform:N,View:mF,WEEK:at,Warn:Gy,YEAR:At,accessor:$n,accessorFields:Bt,accessorName:Je,array:Y,ascending:Z0,bandwidthNRD:x2,bin:TE,bootstrapCI:NE,boundClip:UA,boundContext:Tf,boundItem:hb,boundMark:cA,boundStroke:ea,changeset:So,clampRange:ow,codegenExpression:qC,compare:Jy,constant:Ht,cumulativeLogNormal:A2,cumulativeNormal:hg,cumulativeUniform:M2,dayofyear:Iw,debounce:Qy,defaultLocale:f2,definition:CE,densityLogNormal:$2,densityNormal:_2,densityUniform:F2,domChild:it,domClear:Hn,domCreate:xa,domFind:r9,dotbin:DE,error:R,expressionFunction:tt,extend:ce,extent:ri,extentIndex:uw,falsy:la,fastmap:nc,field:Zn,flush:cw,font:zg,fontFamily:Of,fontSize:gi,format:Hd,formatLocale:Sh,formats:g2,hasOwnProperty:ie,id:mf,identity:Wt,inferType:bE,inferTypes:yE,ingest:Me,inherits:W,inrange:nu,interpolate:N4,interpolateColors:Tg,interpolateRange:M$,intersect:PA,intersectBoxLine:ru,intersectPath:U4,intersectPoint:j4,intersectRule:Q$,isArray:P,isBoolean:Za,isDate:Ca,isFunction:le,isIterable:lw,isNumber:we,isObject:V,isRegExp:fw,isString:X,isTuple:ug,key:Zy,lerp:dw,lineHeight:Ba,loader:sg,locale:pE,logger:Yy,lruCache:hw,markup:c9,merge:gw,mergeConfig:ec,multiLineOffset:Z4,one:Zu,pad:pw,panLinear:tw,panLog:nw,panPow:rw,panSymlog:iw,parse:mne,parseExpression:l7,parseSelector:as,path:yg,pathCurves:P4,pathEqual:jA,pathParse:Mu,pathRectangle:Y$,pathRender:Wl,pathSymbols:G$,pathTrail:X$,peek:xe,point:Ug,projection:M9,quantileLogNormal:k2,quantileNormal:gg,quantileUniform:T2,quantiles:y2,quantizeInterpolator:T$,quarter:aw,quartiles:v2,get random(){return nr},randomInteger:AP,randomKDE:E2,randomLCG:$P,randomLogNormal:RE,randomMixture:LE,randomNormal:w2,randomUniform:PE,read:_E,regressionConstant:N2,regressionExp:zE,regressionLinear:D2,regressionLoess:jE,regressionLog:IE,regressionPoly:UE,regressionPow:BE,regressionQuad:O2,renderModule:qg,repeat:Kc,resetDefaultLocale:wL,resetSVGClipId:K$,resetSVGDefIds:oq,responseType:xE,runtimeContext:rF,sampleCurve:mg,sampleLogNormal:S2,sampleNormal:dg,sampleUniform:C2,scale:Ae,sceneEqual:d9,sceneFromJSON:fA,scenePickVisit:Ih,sceneToJSON:lA,sceneVisit:Cr,sceneZOrder:q4,scheme:D4,serializeXML:CA,setHybridRendererOptions:rq,setRandom:EP,span:bf,splitAccessPath:di,stringValue:H,textMetrics:On,timeBin:tE,timeFloor:Hw,timeFormatLocale:Il,timeInterval:sc,timeOffset:Xw,timeSequence:Jw,timeUnitSpecifier:Pw,timeUnits:o2,toBoolean:e2,toDate:t2,toNumber:Pt,toSet:Ar,toString:n2,transform:FE,transforms:Su,truncate:mw,truthy:er,tupleid:ne,typeParsers:Vm,utcFloor:Gw,utcInterval:oc,utcOffset:Vw,utcSequence:Qw,utcdayofyear:Uw,utcquarter:sw,utcweek:jw,version:bne,visitArray:ha,week:zw,writeConfig:tc,zero:ya,zoomLinear:Xy,zoomLog:Vy,zoomPow:yh,zoomSymlog:Ky},Symbol.toStringTag,{value:"Module"}));function vne(e,t,n){let r;t.x2&&(t.x?(n&&e.x>e.x2&&(r=e.x,e.x=e.x2,e.x2=r),e.width=e.x2-e.x):e.x=e.x2-(e.width||0)),t.xc&&(e.x=e.xc-(e.width||0)/2),t.y2&&(t.y?(n&&e.y>e.y2&&(r=e.y,e.y=e.y2,e.y2=r),e.height=e.y2-e.y):e.y=e.y2-(e.height||0)),t.yc&&(e.y=e.yc-(e.height||0)/2)}var xne={NaN:NaN,E:Math.E,LN2:Math.LN2,LN10:Math.LN10,LOG2E:Math.LOG2E,LOG10E:Math.LOG10E,PI:Math.PI,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2,MIN_VALUE:Number.MIN_VALUE,MAX_VALUE:Number.MAX_VALUE},_ne={"*":(e,t)=>e*t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,">":(e,t)=>e>t,"<":(e,t)=>ee<=t,">=":(e,t)=>e>=t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,"&":(e,t)=>e&t,"|":(e,t)=>e|t,"^":(e,t)=>e^t,"<<":(e,t)=>e<>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t},wne={"+":e=>+e,"-":e=>-e,"~":e=>~e,"!":e=>!e};const Ene=Array.prototype.slice,vs=(e,t,n)=>{const r=n?n(t[0]):t[0];return r[e].apply(r,Ene.call(t,1))},Sne=(e,t,n,r,i,a,s)=>new Date(e,t||0,n??1,r||0,i||0,a||0,s||0);var $ne={isNaN:Number.isNaN,isFinite:Number.isFinite,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,cos:Math.cos,exp:Math.exp,floor:Math.floor,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,clamp:(e,t,n)=>Math.max(t,Math.min(n,e)),now:Date.now,utc:Date.UTC,datetime:Sne,date:e=>new Date(e).getDate(),day:e=>new Date(e).getDay(),year:e=>new Date(e).getFullYear(),month:e=>new Date(e).getMonth(),hours:e=>new Date(e).getHours(),minutes:e=>new Date(e).getMinutes(),seconds:e=>new Date(e).getSeconds(),milliseconds:e=>new Date(e).getMilliseconds(),time:e=>new Date(e).getTime(),timezoneoffset:e=>new Date(e).getTimezoneOffset(),utcdate:e=>new Date(e).getUTCDate(),utcday:e=>new Date(e).getUTCDay(),utcyear:e=>new Date(e).getUTCFullYear(),utcmonth:e=>new Date(e).getUTCMonth(),utchours:e=>new Date(e).getUTCHours(),utcminutes:e=>new Date(e).getUTCMinutes(),utcseconds:e=>new Date(e).getUTCSeconds(),utcmilliseconds:e=>new Date(e).getUTCMilliseconds(),length:e=>e.length,join:function(){return vs("join",arguments)},indexof:function(){return vs("indexOf",arguments)},lastindexof:function(){return vs("lastIndexOf",arguments)},slice:function(){return vs("slice",arguments)},reverse:e=>e.slice().reverse(),parseFloat,parseInt,upper:e=>String(e).toUpperCase(),lower:e=>String(e).toLowerCase(),substring:function(){return vs("substring",arguments,String)},split:function(){return vs("split",arguments,String)},replace:function(){return vs("replace",arguments,String)},trim:e=>String(e).trim(),regexp:RegExp,test:(e,t)=>RegExp(e).test(t)};const Ane=["view","item","group","xy","x","y"],yy=new Set([Function,eval,setTimeout,setInterval]);typeof setImmediate=="function"&&yy.add(setImmediate);const kne={Literal:(e,t)=>t.value,Identifier:(e,t)=>{const n=t.name;return e.memberDepth>0?n:n==="datum"?e.datum:n==="event"?e.event:n==="item"?e.item:xne[n]||e.params["$"+n]},MemberExpression:(e,t)=>{const n=!t.computed,r=e(t.object);n&&(e.memberDepth+=1);const i=e(t.property);if(n&&(e.memberDepth-=1),yy.has(r[i])){console.error(`Prevented interpretation of member "${i}" which could lead to insecure code execution`);return}return r[i]},CallExpression:(e,t)=>{const n=t.arguments;let r=t.callee.name;return r.startsWith("_")&&(r=r.slice(1)),r==="if"?e(n[0])?e(n[1]):e(n[2]):(e.fn[r]||$ne[r]).apply(e.fn,n.map(e))},ArrayExpression:(e,t)=>t.elements.map(e),BinaryExpression:(e,t)=>_ne[t.operator](e(t.left),e(t.right)),UnaryExpression:(e,t)=>wne[t.operator](e(t.argument)),ConditionalExpression:(e,t)=>e(t.test)?e(t.consequent):e(t.alternate),LogicalExpression:(e,t)=>t.operator==="&&"?e(t.left)&&e(t.right):e(t.left)||e(t.right),ObjectExpression:(e,t)=>t.properties.reduce((n,r)=>{e.memberDepth+=1;const i=e(r.key);return e.memberDepth-=1,yy.has(e(r.value))?console.error(`Prevented interpretation of property "${i}" which could lead to insecure code execution`):n[i]=e(r.value),n},{})};function qc(e,t,n,r,i,a){const s=o=>kne[o.type](s,o);return s.memberDepth=0,s.fn=Object.create(t),s.params=n,s.datum=r,s.event=i,s.item=a,Ane.forEach(o=>s.fn[o]=function(){return i.vega[o](...arguments)}),s(e)}var Cne={operator(e,t){const n=t.ast,r=e.functions;return i=>qc(n,r,i)},parameter(e,t){const n=t.ast,r=e.functions;return(i,a)=>qc(n,r,a,i)},event(e,t){const n=t.ast,r=e.functions;return i=>qc(n,r,void 0,void 0,i)},handler(e,t){const n=t.ast,r=e.functions;return(i,a)=>{const s=a.item&&a.item.datum;return qc(n,r,i,s,a)}},encode(e,t){const{marktype:n,channels:r}=t,i=e.functions,a=n==="group"||n==="image"||n==="rect";return(s,o)=>{const u=s.datum;let c=0,l;for(const f in r)l=qc(r[f].ast,i,o,u,void 0,s),s[f]!==l&&(s[f]=l,c=1);return n!=="rule"&&vne(s,r,a),c}}};const Fne="vega-lite",Mne='Dominik Moritz, Kanit "Ham" Wongsuphasawat, Arvind Satyanarayan, Jeffrey Heer',Tne="5.17.0",Nne=["Kanit Wongsuphasawat (http://kanitw.yellowpigz.com)","Dominik Moritz (https://www.domoritz.de)","Arvind Satyanarayan (https://arvindsatya.com)","Jeffrey Heer (https://jheer.org)"],Dne="https://vega.github.io/vega-lite/",One="Vega-Lite is a concise high-level language for interactive visualization.",Rne=["vega","chart","visualization"],Lne="build/vega-lite.js",Pne="build/vega-lite.min.js",Ine="build/vega-lite.min.js",zne="build/src/index",Bne="build/src/index.d.ts",Une={vl2pdf:"./bin/vl2pdf",vl2png:"./bin/vl2png",vl2svg:"./bin/vl2svg",vl2vg:"./bin/vl2vg"},jne=["bin","build","src","vega-lite*","tsconfig.json"],qne={changelog:"conventional-changelog -p angular -r 2",prebuild:"yarn clean:build",build:"yarn build:only","build:only":"tsc -p tsconfig.build.json && rollup -c","prebuild:examples":"yarn build:only","build:examples":"yarn data && TZ=America/Los_Angeles scripts/build-examples.sh","prebuild:examples-full":"yarn build:only","build:examples-full":"TZ=America/Los_Angeles scripts/build-examples.sh 1","build:example":"TZ=America/Los_Angeles scripts/build-example.sh","build:toc":"yarn build:jekyll && scripts/generate-toc","build:site":"rollup -c site/rollup.config.mjs","build:jekyll":"pushd site && bundle exec jekyll build -q && popd","build:versions":"scripts/update-version.sh",clean:"yarn clean:build && del-cli 'site/data/*' 'examples/compiled/*.png' && find site/examples ! -name 'index.md' ! -name 'data' -type f -delete","clean:build":"del-cli 'build/*' !build/vega-lite-schema.json",data:"rsync -r node_modules/vega-datasets/data/* site/data",schema:"mkdir -p build && ts-json-schema-generator -f tsconfig.json -p src/index.ts -t TopLevelSpec --no-type-check --no-ref-encode > build/vega-lite-schema.json && yarn renameschema && cp build/vega-lite-schema.json site/_data/",renameschema:"scripts/rename-schema.sh",presite:"yarn data && yarn schema && yarn build:site && yarn build:versions && scripts/create-example-pages.sh",site:"yarn site:only","site:only":"pushd site && bundle exec jekyll serve -I -l && popd",prettierbase:"prettier '**/*.{md,css,yml}'",format:"eslint . --fix && yarn prettierbase --write",lint:"eslint . && yarn prettierbase --check",test:"yarn jest test/ && yarn lint && yarn schema && yarn jest examples/ && yarn test:runtime","test:cover":"yarn jest --collectCoverage test/","test:inspect":"node --inspect-brk ./node_modules/.bin/jest --runInBand test","test:runtime":"TZ=America/Los_Angeles npx jest test-runtime/ --config test-runtime/jest-config.json","test:runtime:generate":"yarn build:only && del-cli test-runtime/resources && VL_GENERATE_TESTS=true yarn test:runtime",watch:"tsc -p tsconfig.build.json -w","watch:site":"yarn build:site -w","watch:test":"yarn jest --watch test/","watch:test:runtime":"TZ=America/Los_Angeles npx jest --watch test-runtime/ --config test-runtime/jest-config.json",release:"release-it"},Wne={type:"git",url:"https://github.com/vega/vega-lite.git"},Hne="BSD-3-Clause",Gne={url:"https://github.com/vega/vega-lite/issues"},Yne={"@babel/core":"^7.23.9","@babel/preset-env":"^7.23.9","@babel/preset-typescript":"^7.23.3","@release-it/conventional-changelog":"^8.0.1","@rollup/plugin-alias":"^5.1.0","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-terser":"^0.4.4","@types/d3":"^7.4.3","@types/jest":"^29.5.11","@types/pako":"^2.0.3","@typescript-eslint/eslint-plugin":"^6.20.0","@typescript-eslint/parser":"^6.20.0",ajv:"^8.12.0","ajv-formats":"^2.1.1",cheerio:"^1.0.0-rc.12","conventional-changelog-cli":"^4.1.0",d3:"^7.8.5","del-cli":"^5.1.0",eslint:"^8.56.0","eslint-config-prettier":"^9.1.0","eslint-plugin-jest":"^27.6.3","eslint-plugin-prettier":"^5.1.3","fast-json-stable-stringify":"~2.1.0","highlight.js":"^11.9.0",jest:"^29.7.0","jest-dev-server":"^9.0.2",mkdirp:"^3.0.1",pako:"^2.1.0",prettier:"^3.2.4",puppeteer:"^15.0.0","release-it":"^17.0.3",rollup:"^4.9.6","rollup-plugin-bundle-size":"^1.0.3",serve:"^14.2.1",terser:"^5.27.0","ts-jest":"^29.1.2","ts-json-schema-generator":"^1.5.0",typescript:"~5.3.3","vega-cli":"^5.27.0","vega-datasets":"^2.8.0","vega-embed":"^6.24.0","vega-tooltip":"^0.34.0","yaml-front-matter":"^4.1.1"},Xne={"json-stringify-pretty-compact":"~3.0.0",tslib:"~2.6.2","vega-event-selector":"~3.0.1","vega-expression":"~5.1.0","vega-util":"~1.17.2",yargs:"~17.7.2"},Vne={vega:"^5.24.0"},Kne={node:">=18"},Jne={name:Fne,author:Mne,version:Tne,collaborators:Nne,homepage:Dne,description:One,keywords:Rne,main:Lne,unpkg:Pne,jsdelivr:Ine,module:zne,types:Bne,bin:Une,files:jne,scripts:qne,repository:Wne,license:Hne,bugs:Gne,devDependencies:Yne,dependencies:Xne,peerDependencies:Vne,engines:Kne};function I7(e){return!!e.or}function z7(e){return!!e.and}function B7(e){return!!e.not}function gh(e,t){if(B7(e))gh(e.not,t);else if(z7(e))for(const n of e.and)gh(n,t);else if(I7(e))for(const n of e.or)gh(n,t);else t(e)}function hu(e,t){return B7(e)?{not:hu(e.not,t)}:z7(e)?{and:e.and.map(n=>hu(n,t))}:I7(e)?{or:e.or.map(n=>hu(n,t))}:t(e)}const oe=structuredClone;function ZF(e){throw new Error(e)}function zu(e,t){const n={};for(const r of t)ie(e,r)&&(n[r]=e[r]);return n}function bn(e,t){const n={...e};for(const r of t)delete n[r];return n}Set.prototype.toJSON=function(){return`Set(${[...this].map(e=>Re(e)).join(",")})`};function be(e){if(we(e))return e;const t=X(e)?e:Re(e);if(t.length<250)return t;let n=0;for(let r=0;ro===0?s:`[${s}]`),a=i.map((s,o)=>i.slice(0,o+1).join(""));for(const s of a)t.add(s)}return t}function q7(e,t){return e===void 0||t===void 0?!0:j7(xy(e),xy(t))}function Oe(e){return B(e).length===0}const B=Object.keys,kt=Object.values,Ga=Object.entries;function uf(e){return e===!0||e===!1}function We(e){const t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function Tl(e,t){return B7(e)?`!(${Tl(e.not,t)})`:z7(e)?`(${e.and.map(n=>Tl(n,t)).join(") && (")})`:I7(e)?`(${e.or.map(n=>Tl(n,t)).join(") || (")})`:t(e)}function N0(e,t){if(t.length===0)return!0;const n=t.shift();return n in e&&N0(e[n],t)&&delete e[n],Oe(e)}function Hf(e){return e.charAt(0).toUpperCase()+e.substr(1)}function W7(e,t="datum"){const n=di(e),r=[];for(let i=1;i<=n.length;i++){const a=`[${n.slice(0,i).map(H).join("][")}]`;r.push(`${t}${a}`)}return r.join(" && ")}function nM(e,t="datum"){return`${t}[${H(di(e).join("."))}]`}function ere(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function ir(e){return`${di(e).map(ere).join("\\.")}`}function lo(e,t,n){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function H7(e){return`${di(e).join(".")}`}function Bu(e){return e?di(e).length:0}function Ze(...e){for(const t of e)if(t!==void 0)return t}let rM=42;function iM(e){const t=++rM;return e?String(e)+t:t}function tre(){rM=42}function aM(e){return sM(e)?e:`__${e}`}function sM(e){return e.startsWith("__")}function cf(e){if(e!==void 0)return(e%360+360)%360}function dp(e){return we(e)?!0:!isNaN(e)&&!isNaN(parseFloat(e))}const tx=Object.getPrototypeOf(structuredClone({}));function Dn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor.name!==t.constructor.name)return!1;let n,r;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Dn(e[r],t[r]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(r of e.entries())if(!t.has(r[0]))return!1;for(r of e.entries())if(!Dn(r[1],t.get(r[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(r of e.entries())if(!t.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf!==tx.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString!==tx.toString)return e.toString()===t.toString();const i=Object.keys(e);if(n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!Dn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Re(e){const t=[];return function n(r){if(r&&r.toJSON&&typeof r.toJSON=="function"&&(r=r.toJSON()),r===void 0)return;if(typeof r=="number")return isFinite(r)?""+r:"null";if(typeof r!="object")return JSON.stringify(r);let i,a;if(Array.isArray(r)){for(a="[",i=0;ixp(e[t])?We(`_${t}_${Ga(e[t])}`):We(`_${t}_${e[t]}`)).join("")}function Be(e){return e===!0||No(e)&&!e.binned}function Et(e){return e==="binned"||No(e)&&e.binned===!0}function No(e){return V(e)}function xp(e){return e==null?void 0:e.param}function nx(e){switch(e){case Hi:case Gi:case ia:case wn:case vi:case xi:case cs:case aa:case os:case us:case En:return 6;case ls:return 4;default:return 10}}function Vf(e){return!!(e!=null&&e.expr)}function gn(e){const t=B(e||{}),n={};for(const r of t)n[r]=Mn(e[r]);return n}function _M(e){const{anchor:t,frame:n,offset:r,orient:i,angle:a,limit:s,color:o,subtitleColor:u,subtitleFont:c,subtitleFontSize:l,subtitleFontStyle:f,subtitleFontWeight:d,subtitleLineHeight:h,subtitlePadding:g,...p}=e,m={...p,...o?{fill:o}:{}},b={...t?{anchor:t}:{},...n?{frame:n}:{},...r?{offset:r}:{},...i?{orient:i}:{},...a!==void 0?{angle:a}:{},...s!==void 0?{limit:s}:{}},y={...u?{subtitleColor:u}:{},...c?{subtitleFont:c}:{},...l?{subtitleFontSize:l}:{},...f?{subtitleFontStyle:f}:{},...d?{subtitleFontWeight:d}:{},...h?{subtitleLineHeight:h}:{},...g?{subtitlePadding:g}:{}},v=zu(e,["align","baseline","dx","dy","limit"]);return{titleMarkConfig:m,subtitleMarkConfig:v,nonMarkTitleProperties:b,subtitle:y}}function ba(e){return X(e)||P(e)&&X(e[0])}function Q(e){return!!(e!=null&&e.signal)}function ds(e){return!!e.step}function $re(e){return P(e)?!1:"fields"in e&&!("data"in e)}function Are(e){return P(e)?!1:"fields"in e&&"data"in e}function Ui(e){return P(e)?!1:"field"in e&&"data"in e}const kre={aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius:1,size:1,shape:1,interpolate:1,tension:1,orient:1,align:1,baseline:1,text:1,dir:1,dx:1,dy:1,ellipsis:1,limit:1,radius:1,theta:1,angle:1,font:1,fontSize:1,fontWeight:1,fontStyle:1,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1,url:1,smooth:1},Cre=B(kre),Fre={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},_y=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];function wM(e){const t=P(e.condition)?e.condition.map(rx):rx(e.condition);return{...Mn(e),condition:t}}function Mn(e){if(Vf(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function rx(e){if(Vf(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function je(e){if(Vf(e)){const{expr:t,...n}=e;return{signal:t,...n}}return Q(e)?e:e!==void 0?{value:e}:void 0}function Mre(e){return Q(e)?e.signal:H(e)}function ix(e){return Q(e)?e.signal:H(e.value)}function _r(e){return Q(e)?e.signal:e==null?null:H(e)}function Tre(e,t,n){for(const r of n){const i=Zi(r,t.markDef,t.config);i!==void 0&&(e[r]=je(i))}return e}function EM(e){return[].concat(e.type,e.style??[])}function Fe(e,t,n,r={}){const{vgChannel:i,ignoreVgConfig:a}=r;return i&&t[i]!==void 0?t[i]:t[e]!==void 0?t[e]:a&&(!i||i===e)?void 0:Zi(e,t,n,r)}function Zi(e,t,n,{vgChannel:r}={}){return Ze(r?D0(e,t,n.style):void 0,D0(e,t,n.style),r?n[t.type][r]:void 0,n[t.type][e],r?n.mark[r]:n.mark[e])}function D0(e,t,n){return SM(e,EM(t),n)}function SM(e,t,n){t=Y(t);let r;for(const i of t){const a=n[i];a&&a[e]!==void 0&&(r=a[e])}return r}function $M(e,t){return Y(e).reduce((n,r)=>(n.field.push(G(r,t)),n.order.push(r.sort??"ascending"),n),{field:[],order:[]})}function AM(e,t){const n=[...e];return t.forEach(r=>{for(const i of n)if(Dn(i,r))return;n.push(r)}),n}function kM(e,t){return Dn(e,t)||!t?e:e?[...Y(e),...Y(t)].join(", "):t}function CM(e,t){const n=e.value,r=t.value;if(n==null||r===null)return{explicit:e.explicit,value:null};if((ba(n)||Q(n))&&(ba(r)||Q(r)))return{explicit:e.explicit,value:kM(n,r)};if(ba(n)||Q(n))return{explicit:e.explicit,value:n};if(ba(r)||Q(r))return{explicit:e.explicit,value:r};if(!ba(n)&&!Q(n)&&!ba(r)&&!Q(r))return{explicit:e.explicit,value:AM(n,r)};throw new Error("It should never reach here")}function e6(e){return`Invalid specification ${Re(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const Nre='Autosize "fit" only works for single views and layered views.';function ax(e){return`${e=="width"?"Width":"Height"} "container" only works for single views and layered views.`}function sx(e){const t=e=="width"?"Width":"Height",n=e=="width"?"x":"y";return`${t} "container" only works well with autosize "fit" or "fit-${n}".`}function ox(e){return e?`Dropping "fit-${e}" because spec has discrete ${Sn(e)}.`:'Dropping "fit" because spec has discrete size.'}function t6(e){return`Unknown field for ${e}. Cannot calculate view size.`}function ux(e){return`Cannot project a selection on encoding channel "${e}", which has no field.`}function Dre(e,t){return`Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`}function Ore(e){return`The "nearest" transform is not supported for ${e} marks.`}function FM(e){return`Selection not supported for ${e} yet.`}function Rre(e){return`Cannot find a selection named "${e}".`}const Lre="Scale bindings are currently only supported for scales with unbinned, continuous domains.",Pre="Sequntial scales are deprecated. The available quantitative scale type values are linear, log, pow, sqrt, symlog, time and utc",Ire="Legend bindings are only supported for selections over an individual field or encoding channel.";function zre(e){return`Lookups can only be performed on selection parameters. "${e}" is a variable parameter.`}function Bre(e){return`Cannot define and lookup the "${e}" selection in the same view. Try moving the lookup into a second, layered view?`}const Ure="The same selection must be used to override scale domains in a layered view.",jre='Interval selections should be initialized using "x", "y", "longitude", or "latitude" keys.';function qre(e){return`Unknown repeated value "${e}".`}function cx(e){return`The "columns" property cannot be used when "${e}" has nested row/column.`}const Wre="Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";function Hre(e){return`Unrecognized parse "${e}".`}function lx(e,t,n){return`An ancestor parsed field "${e}" as ${n} but a child wants to parse the field as ${t}.`}const Gre="Attempt to add the same child twice.";function Yre(e){return`Ignoring an invalid transform: ${Re(e)}.`}const Xre='If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';function fx(e){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`}function Vre(e){const{parentProjection:t,projection:n}=e;return`Layer's shared projection ${Re(t)} is overridden by a child projection ${Re(n)}.`}const Kre="Arc marks uses theta channel rather than angle, replacing angle with theta.";function Jre(e){return`${e}Offset dropped because ${e} is continuous`}function Qre(e,t,n){return`Channel ${e} is a ${t}. Converted to {value: ${Re(n)}}.`}function MM(e){return`Invalid field type "${e}".`}function Zre(e,t){return`Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`}function eie(e){return`Invalid aggregation operator "${e}".`}function TM(e,t){const{fill:n,stroke:r}=t;return`Dropping color ${e} as the plot also has ${n&&r?"fill and stroke":n?"fill":"stroke"}.`}function tie(e){return`Position range does not support relative band size for ${e}.`}function wy(e,t){return`Dropping ${Re(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`}const nie="Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";function _p(e,t,n){return`${e} dropped as it is incompatible with "${t}"${n?` when ${n}`:""}.`}function rie(e){return`${e}-encoding is dropped as ${e} is not a valid encoding channel.`}function iie(e){return`${e} encoding should be discrete (ordinal / nominal / binned).`}function aie(e){return`${e} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function sie(e){return`Facet encoding dropped as ${e.join(" and ")} ${e.length>1?"are":"is"} also specified.`}function fm(e,t){return`Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${t==="ordinal"?"order":"magnitude"}.`}function oie(e){return`The ${e} for range marks cannot be an expression`}function uie(e,t){return`Line mark is for continuous lines and thus cannot be used with ${e&&t?"x2 and y2":e?"x2":"y2"}. We will use the rule mark (line segments) instead.`}function cie(e,t){return`Specified orient "${e}" overridden with "${t}".`}function lie(e){return`Cannot use the scale property "${e}" with non-color channel.`}function fie(e){return`Cannot use the relative band size with ${e} scale.`}function die(e){return`Using unaggregated domain with raw field has no effect (${Re(e)}).`}function hie(e){return`Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`}function gie(e){return`Unaggregated domain is currently unsupported for log scale (${Re(e)}).`}function pie(e){return`Cannot apply size to non-oriented mark "${e}".`}function mie(e,t,n){return`Channel "${e}" does not work with "${t}" scale. We are using "${n}" scale instead.`}function bie(e,t){return`FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`}function NM(e,t,n){return`${n}-scale's "${t}" is dropped as it does not work with ${e} scale.`}function DM(e){return`The step for "${e}" is dropped because the ${e==="width"?"x":"y"} is continuous.`}function yie(e,t,n,r){return`Conflicting ${t.toString()} property "${e.toString()}" (${Re(n)} and ${Re(r)}). Using ${Re(n)}.`}function vie(e,t,n,r){return`Conflicting ${t.toString()} property "${e.toString()}" (${Re(n)} and ${Re(r)}). Using the union of the two domains.`}function xie(e){return`Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`}function _ie(e){return`Dropping sort property ${Re(e)} as unioned domains only support boolean or op "count", "min", and "max".`}const dx="Domains that should be unioned has conflicting sort properties. Sort will be set to true.",wie="Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.",Eie="Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.",Sie="Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.";function $ie(e){return`Cannot stack "${e}" if there is already "${e}2".`}function Aie(e){return`Cannot stack non-linear scale (${e}).`}function kie(e){return`Stacking is applied even though the aggregate function is non-summative ("${e}").`}function O0(e,t){return`Invalid ${e}: ${Re(t)}.`}function Cie(e){return`Dropping day from datetime ${Re(e)} as day cannot be combined with other units.`}function Fie(e,t){return`${t?"extent ":""}${t&&e?"and ":""}${e?"center ":""}${t&&e?"are ":"is "}not needed when data are aggregated.`}function Mie(e,t,n){return`${e} is not usually used with ${t} for ${n}.`}function Tie(e,t){return`Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`}function hx(e){return`1D error band does not support ${e}.`}function OM(e){return`Channel ${e} is required for "binned" bin.`}function Nie(e){return`Channel ${e} should not be used with "binned" bin.`}function Die(e){return`Domain for ${e} is required for threshold scale.`}const RM=Yy(Gy);let ju=RM;function Oie(e){return ju=e,ju}function Rie(){return ju=RM,ju}function U(...e){ju.warn(...e)}function Lie(...e){ju.debug(...e)}function Do(e){if(e&&V(e)){for(const t of r6)if(t in e)return!0}return!1}const LM=["january","february","march","april","may","june","july","august","september","october","november","december"],Pie=LM.map(e=>e.substr(0,3)),PM=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Iie=PM.map(e=>e.substr(0,3));function zie(e){if(dp(e)&&(e=+e),we(e))return e>4&&U(O0("quarter",e)),e-1;throw new Error(O0("quarter",e))}function Bie(e){if(dp(e)&&(e=+e),we(e))return e-1;{const t=e.toLowerCase(),n=LM.indexOf(t);if(n!==-1)return n;const r=t.substr(0,3),i=Pie.indexOf(r);if(i!==-1)return i;throw new Error(O0("month",e))}}function Uie(e){if(dp(e)&&(e=+e),we(e))return e%7;{const t=e.toLowerCase(),n=PM.indexOf(t);if(n!==-1)return n;const r=t.substr(0,3),i=Iie.indexOf(r);if(i!==-1)return i;throw new Error(O0("day",e))}}function n6(e,t){const n=[];if(t&&e.day!==void 0&&B(e).length>1&&(U(Cie(e)),e=oe(e),delete e.day),e.year!==void 0?n.push(e.year):n.push(2012),e.month!==void 0){const r=t?Bie(e.month):e.month;n.push(r)}else if(e.quarter!==void 0){const r=t?zie(e.quarter):e.quarter;n.push(we(r)?r*3:`${r}*3`)}else n.push(0);if(e.date!==void 0)n.push(e.date);else if(e.day!==void 0){const r=t?Uie(e.day):e.day;n.push(we(r)?r+1:`${r}+1`)}else n.push(1);for(const r of["hours","minutes","seconds","milliseconds"]){const i=e[r];n.push(typeof i>"u"?0:i)}return n}function ho(e){const n=n6(e,!0).join(", ");return e.utc?`utc(${n})`:`datetime(${n})`}function jie(e){const n=n6(e,!1).join(", ");return e.utc?`utc(${n})`:`datetime(${n})`}function qie(e){const t=n6(e,!0);return e.utc?+new Date(Date.UTC(...t)):+new Date(...t)}const IM={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},r6=B(IM);function Wie(e){return!!IM[e]}function Oo(e){return V(e)?e.binned:zM(e)}function zM(e){return e&&e.startsWith("binned")}function i6(e){return e.startsWith("utc")}function Hie(e){return e.substring(3)}const Gie={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function wp(e){return r6.filter(t=>UM(e,t))}function BM(e){const t=wp(e);return t[t.length-1]}function UM(e,t){const n=e.indexOf(t);return!(n<0||n>0&&t==="seconds"&&e.charAt(n-1)==="i"||e.length>n+3&&t==="day"&&e.charAt(n+3)==="o"||n>0&&t==="year"&&e.charAt(n-1)==="f")}function Yie(e,t,{end:n}={end:!1}){const r=W7(t),i=i6(e)?"utc":"";function a(u){return u==="quarter"?`(${i}quarter(${r})-1)`:`${i}${u}(${r})`}let s;const o={};for(const u of r6)UM(e,u)&&(o[u]=a(u),s=u);return n&&(o[s]+="+1"),jie(o)}function jM(e){if(!e)return;const t=wp(e);return`timeUnitSpecifier(${Re(t)}, ${Re(Gie)})`}function Xie(e,t,n){if(!e)return;const r=jM(e);return`${n||i6(e)?"utc":"time"}Format(${t}, ${r})`}function yt(e){if(!e)return;let t;return X(e)?zM(e)?t={unit:e.substring(6),binned:!0}:t={unit:e}:V(e)&&(t={...e,...e.unit?{unit:e.unit}:{}}),i6(t.unit)&&(t.utc=!0,t.unit=Hie(t.unit)),t}function Vie(e){const{utc:t,...n}=yt(e);return n.unit?(t?"utc":"")+B(n).map(r=>We(`${r==="unit"?"":`_${r}_`}${n[r]}`)).join(""):(t?"utc":"")+"timeunit"+B(n).map(r=>We(`_${r}_${n[r]}`)).join("")}function qM(e,t=n=>n){const n=yt(e),r=BM(n.unit);if(r&&r!=="day"){const i={year:2001,month:1,date:1,hours:0,minutes:0,seconds:0,milliseconds:0},{step:a,part:s}=WM(r,n.step),o={...i,[s]:+i[s]+a};return`${t(ho(o))} - ${t(ho(i))}`}}const Kie={year:1,month:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1};function Jie(e){return!!Kie[e]}function WM(e,t=1){if(Jie(e))return{part:e,step:t};switch(e){case"day":case"dayofyear":return{part:"date",step:t};case"quarter":return{part:"month",step:t*3};case"week":return{part:"date",step:t*7}}}function Qie(e){return e==null?void 0:e.param}function a6(e){return!!(e!=null&&e.field)&&e.equal!==void 0}function s6(e){return!!(e!=null&&e.field)&&e.lt!==void 0}function o6(e){return!!(e!=null&&e.field)&&e.lte!==void 0}function u6(e){return!!(e!=null&&e.field)&&e.gt!==void 0}function c6(e){return!!(e!=null&&e.field)&&e.gte!==void 0}function l6(e){if(e!=null&&e.field){if(P(e.range)&&e.range.length===2)return!0;if(Q(e.range))return!0}return!1}function f6(e){return!!(e!=null&&e.field)&&(P(e.oneOf)||P(e.in))}function Zie(e){return!!(e!=null&&e.field)&&e.valid!==void 0}function HM(e){return f6(e)||a6(e)||l6(e)||s6(e)||u6(e)||o6(e)||c6(e)}function Ur(e,t){return Np(e,{timeUnit:t,wrapTime:!0})}function eae(e,t){return e.map(n=>Ur(n,t))}function GM(e,t=!0){const{field:n}=e,r=yt(e.timeUnit),{unit:i,binned:a}=r||{},s=G(e,{expr:"datum"}),o=i?`time(${a?s:Yie(i,n)})`:s;if(a6(e))return`${o}===${Ur(e.equal,i)}`;if(s6(e)){const u=e.lt;return`${o}<${Ur(u,i)}`}else if(u6(e)){const u=e.gt;return`${o}>${Ur(u,i)}`}else if(o6(e)){const u=e.lte;return`${o}<=${Ur(u,i)}`}else if(c6(e)){const u=e.gte;return`${o}>=${Ur(u,i)}`}else{if(f6(e))return`indexof([${eae(e.oneOf,i).join(",")}], ${o}) !== -1`;if(Zie(e))return d6(o,e.valid);if(l6(e)){const{range:u}=e,c=Q(u)?{signal:`${u.signal}[0]`}:u[0],l=Q(u)?{signal:`${u.signal}[1]`}:u[1];if(c!==null&&l!==null&&t)return"inrange("+o+", ["+Ur(c,i)+", "+Ur(l,i)+"])";const f=[];return c!==null&&f.push(`${o} >= ${Ur(c,i)}`),l!==null&&f.push(`${o} <= ${Ur(l,i)}`),f.length>0?f.join(" && "):"true"}}throw new Error(`Invalid field predicate: ${Re(e)}`)}function d6(e,t=!0){return t?`isValid(${e}) && isFinite(+${e})`:`!isValid(${e}) || !isFinite(+${e})`}function tae(e){return HM(e)&&e.timeUnit?{...e,timeUnit:yt(e.timeUnit)}:e}const Kf={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function nae(e){return e==="quantitative"||e==="temporal"}function YM(e){return e==="ordinal"||e==="nominal"}const go=Kf.quantitative,h6=Kf.ordinal,qu=Kf.temporal,g6=Kf.nominal,bc=Kf.geojson;function rae(e){if(e)switch(e=e.toLowerCase(),e){case"q":case go:return"quantitative";case"t":case qu:return"temporal";case"o":case h6:return"ordinal";case"n":case g6:return"nominal";case bc:return"geojson"}}const yn={LINEAR:"linear",LOG:"log",POW:"pow",SQRT:"sqrt",SYMLOG:"symlog",IDENTITY:"identity",SEQUENTIAL:"sequential",TIME:"time",UTC:"utc",QUANTILE:"quantile",QUANTIZE:"quantize",THRESHOLD:"threshold",BIN_ORDINAL:"bin-ordinal",ORDINAL:"ordinal",POINT:"point",BAND:"band"},Ey={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"};function iae(e,t){const n=Ey[e],r=Ey[t];return n===r||n==="ordinal-position"&&r==="time"||r==="ordinal-position"&&n==="time"}const aae={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function gx(e){return aae[e]}const XM=new Set(["linear","log","pow","sqrt","symlog"]),VM=new Set([...XM,"time","utc"]);function KM(e){return XM.has(e)}const JM=new Set(["quantile","quantize","threshold"]),sae=new Set([...VM,...JM,"sequential","identity"]),oae=new Set(["ordinal","bin-ordinal","point","band"]);function vt(e){return oae.has(e)}function Un(e){return sae.has(e)}function wr(e){return VM.has(e)}function Wu(e){return JM.has(e)}const uae={pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4,zero:!0};function cae(e){return!X(e)&&!!e.name}function QM(e){return e==null?void 0:e.param}function lae(e){return e==null?void 0:e.unionWith}function fae(e){return V(e)&&"field"in e}const dae={type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,domainRaw:1,align:1,range:1,rangeMax:1,rangeMin:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},{type:N0e,domain:D0e,range:O0e,rangeMax:R0e,rangeMin:L0e,scheme:P0e,...hae}=dae,gae=B(hae);function Sy(e,t){switch(t){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(e);case"bins":return!["point","band","identity","ordinal"].includes(e);case"round":return wr(e)||e==="band"||e==="point";case"padding":case"rangeMin":case"rangeMax":return wr(e)||["point","band"].includes(e);case"paddingOuter":case"align":return["point","band"].includes(e);case"paddingInner":return e==="band";case"domainMax":case"domainMid":case"domainMin":case"domainRaw":case"clamp":return wr(e);case"nice":return wr(e)||e==="quantize"||e==="threshold";case"exponent":return e==="pow";case"base":return e==="log";case"constant":return e==="symlog";case"zero":return Un(e)&&!ye(["log","time","utc","threshold","quantile"],e)}}function ZM(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return gu(e)?void 0:lie(t);case"align":case"type":case"bins":case"domain":case"domainMax":case"domainMin":case"domainRaw":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"rangeMax":case"rangeMin":case"reverse":case"round":case"clamp":case"zero":return}}function pae(e,t){return ye([h6,g6],t)?e===void 0||vt(e):t===qu?ye([yn.TIME,yn.UTC,void 0],e):t===go?KM(e)||Wu(e)||e===void 0:!0}function mae(e,t,n=!1){if(!sa(e))return!1;switch(e){case He:case _t:case ss:case mc:case or:case Rr:return wr(t)||t==="band"?!0:t==="point"?!n:!1;case ia:case cs:case aa:case os:case us:case Mo:return wr(t)||Wu(t)||ye(["band","point","ordinal"],t);case wn:case vi:case xi:return t!=="band";case ls:case En:return t==="ordinal"||Wu(t)}}const ln={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"},eT=ln.arc,Ep=ln.area,Sp=ln.bar,bae=ln.image,$p=ln.line,Ap=ln.point,yae=ln.rect,R0=ln.rule,tT=ln.text,p6=ln.tick,vae=ln.trail,m6=ln.circle,b6=ln.square,nT=ln.geoshape;function hs(e){return["line","area","trail"].includes(e)}function lf(e){return["rect","bar","image","arc"].includes(e)}const xae=new Set(B(ln));function ci(e){return e.type}const _ae=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit"],wae=["fill","fillOpacity"],Eae=[..._ae,...wae],Sae={color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1},px=B(Sae),$ae={area:["line","point"],bar:["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],rect:["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],line:["point"],tick:["bandSize","thickness"]},Aae={color:"#4c78a8",invalid:"filter",timeUnitBandSize:1},kae={mark:1,arc:1,area:1,bar:1,circle:1,image:1,line:1,point:1,rect:1,rule:1,square:1,text:1,tick:1,trail:1,geoshape:1},rT=B(kae);function po(e){return e&&e.band!=null}const Cae={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},iT=5,Fae={binSpacing:1,continuousBandSize:iT,minBandSize:.25,timeUnitBandPosition:.5},Mae={binSpacing:0,continuousBandSize:iT,minBandSize:.25,timeUnitBandPosition:.5},Tae={thickness:1};function Nae(e){return ci(e)?e.type:e}function y6(e){const{channel:t,channelDef:n,markDef:r,scale:i,config:a}=e,s=x6(e);return j(n)&&!vM(n.aggregate)&&i&&wr(i.get("type"))?Dae({fieldDef:n,channel:t,markDef:r,ref:s,config:a}):s}function Dae({fieldDef:e,channel:t,markDef:n,ref:r,config:i}){return hs(n.type)?r:Fe("invalid",n,i)===null?[Oae(e,t),r]:r}function Oae(e,t){const n=v6(e,!0),i=To(t)==="y"?{field:{group:"height"}}:{value:0};return{test:n,...i}}function v6(e,t=!0){return d6(X(e)?e:G(e,{expr:"datum"}),!t)}function Rae(e){const{datum:t}=e;return Do(t)?ho(t):`${Re(t)}`}function Ys(e,t,n,r){const i={};if(t&&(i.scale=t),Ei(e)){const{datum:a}=e;Do(a)?i.signal=ho(a):Q(a)?i.signal=a.signal:Vf(a)?i.signal=a.expr:i.value=a}else i.field=G(e,n);if(r){const{offset:a,band:s}=r;a&&(i.offset=a),s&&(i.band=s)}return i}function L0({scaleName:e,fieldOrDatumDef:t,fieldOrDatumDef2:n,offset:r,startSuffix:i,endSuffix:a="end",bandPosition:s=.5}){const o=!Q(s)&&0{switch(t.fieldTitle){case"plain":return e.field;case"functional":return Vae(e);default:return Xae(e,t)}};let yT=bT;function vT(e){yT=e}function Kae(){vT(bT)}function pu(e,t,{allowDisabling:n,includeDefault:r=!0}){var o;const i=(o=S6(e))==null?void 0:o.title;if(!j(e))return i??e.title;const a=e,s=r?$6(a,t):void 0;return n?Ze(i,a.title,s):i??a.title??s}function S6(e){if(Gu(e)&&e.axis)return e.axis;if(pT(e)&&e.legend)return e.legend;if(w6(e)&&e.header)return e.header}function $6(e,t){return yT(e,t)}function z0(e){if(mT(e)){const{format:t,formatType:n}=e;return{format:t,formatType:n}}else{const t=S6(e)??{},{format:n,formatType:r}=t;return{format:n,formatType:r}}}function Jae(e,t){var a;switch(t){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(E6(e)&&P(e.sort))return"ordinal";const{aggregate:n,bin:r,timeUnit:i}=e;if(i)return"temporal";if(r||n&&!fs(n)&&!Qi(n))return"quantitative";if(Ro(e)&&((a=e.scale)!=null&&a.type))switch(Ey[e.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}function li(e){if(j(e))return e;if(Mp(e))return e.condition}function st(e){if(ue(e))return e;if(Zf(e))return e.condition}function xT(e,t,n,r={}){if(X(e)||we(e)||Za(e)){const i=X(e)?"string":we(e)?"number":"boolean";return U(Qre(t,i,e)),{value:e}}return ue(e)?B0(e,t,n,r):Zf(e)?{...e,condition:B0(e.condition,t,n,r)}:e}function B0(e,t,n,r){if(mT(e)){const{format:i,formatType:a,...s}=e;if(mo(a)&&!n.customFormatTypes)return U(fx(t)),B0(s,t,n,r)}else{const i=Gu(e)?"axis":pT(e)?"legend":w6(e)?"header":null;if(i&&e[i]){const{format:a,formatType:s,...o}=e[i];if(mo(s)&&!n.customFormatTypes)return U(fx(t)),B0({...e,[i]:o},t,n,r)}}return j(e)?A6(e,t,r):Qae(e)}function Qae(e){let t=e.type;if(t)return e;const{datum:n}=e;return t=we(n)?"quantitative":X(n)?"nominal":Do(n)?"temporal":void 0,{...e,type:t}}function A6(e,t,{compositeMark:n=!1}={}){const{aggregate:r,timeUnit:i,bin:a,field:s}=e,o={...e};if(!n&&r&&!Z7(r)&&!fs(r)&&!Qi(r)&&(U(eie(r)),delete o.aggregate),i&&(o.timeUnit=yt(i)),s&&(o.field=`${s}`),Be(a)&&(o.bin=Tp(a,t)),Et(a)&&!et(t)&&U(Nie(t)),un(o)){const{type:u}=o,c=rae(u);u!==c&&(o.type=c),u!=="quantitative"&&vM(r)&&(U(Zre(u,r)),o.type="quantitative")}else if(!hM(t)){const u=Jae(o,t);o.type=u}if(un(o)){const{compatible:u,warning:c}=Zae(o,t)||{};u===!1&&U(c)}if(E6(o)&&X(o.sort)){const{sort:u}=o;if(bx(u))return{...o,sort:{encoding:u}};const c=u.substr(1);if(u.charAt(0)==="-"&&bx(c))return{...o,sort:{encoding:c,order:"descending"}}}if(w6(o)){const{header:u}=o;if(u){const{orient:c,...l}=u;if(c)return{...o,header:{...l,labelOrient:u.labelOrient||c,titleOrient:u.titleOrient||c}}}}return o}function Tp(e,t){return Za(e)?{maxbins:nx(t)}:e==="binned"?{binned:!0}:!e.maxbins&&!e.step?{...e,maxbins:nx(t)}:e}const Xo={compatible:!0};function Zae(e,t){const n=e.type;if(n==="geojson"&&t!=="shape")return{compatible:!1,warning:`Channel ${t} should not be used with a geojson data.`};switch(t){case Hi:case Gi:case hp:return I0(e)?Xo:{compatible:!1,warning:iie(t)};case He:case _t:case ss:case mc:case wn:case vi:case xi:case Gf:case Yf:case gp:case fo:case pp:case mp:case Mo:case or:case Rr:case bp:return Xo;case Pr:case ar:case Lr:case Ir:return n!==go?{compatible:!1,warning:`Channel ${t} should be used with a quantitative field only, not ${e.type} field.`}:Xo;case aa:case os:case us:case cs:case ia:case ra:case na:case Or:case yi:return n==="nominal"&&!e.sort?{compatible:!1,warning:`Channel ${t} should not be used with an unsorted discrete field.`}:Xo;case En:case ls:return!I0(e)&&!Gae(e)?{compatible:!1,warning:aie(t)}:Xo;case Uu:return e.type==="nominal"&&!("sort"in e)?{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}:Xo}}function Yu(e){const{formatType:t}=z0(e);return t==="time"||!t&&ese(e)}function ese(e){return e&&(e.type==="temporal"||j(e)&&!!e.timeUnit)}function Np(e,{timeUnit:t,type:n,wrapTime:r,undefinedIfExprNotRequired:i}){var u;const a=t&&((u=yt(t))==null?void 0:u.unit);let s=a||n==="temporal",o;return Vf(e)?o=e.expr:Q(e)?o=e.signal:Do(e)?(s=!0,o=ho(e)):(X(e)||we(e))&&s&&(o=`datetime(${Re(e)})`,Wie(a)&&(we(e)&&e<1e4||X(e)&&isNaN(Date.parse(e)))&&(o=ho({[a]:e}))),o?r&&s?`time(${o})`:o:i?void 0:Re(e)}function _T(e,t){const{type:n}=e;return t.map(r=>{const i=j(e)&&!Oo(e.timeUnit)?e.timeUnit:void 0,a=Np(r,{timeUnit:i,type:n,undefinedIfExprNotRequired:!0});return a!==void 0?{signal:a}:r})}function ed(e,t){return Be(e.bin)?sa(t)&&["ordinal","nominal"].includes(e.type):(console.warn("Only call this method for binned field defs."),!1)}const xx={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function td(e){return e==null?void 0:e.condition}const wT=["domain","grid","labels","ticks","title"],tse={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},ET={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},nse={...ET,style:1,labelExpr:1,encoding:1};function _x(e){return!!nse[e]}const rse={axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1},ST=B(rse);function oa(e){return"mark"in e}class Dp{constructor(t,n){this.name=t,this.run=n}hasMatchingType(t){return oa(t)?Nae(t.mark)===this.name:!1}}function Xs(e,t){const n=e&&e[t];return n?P(n)?co(n,r=>!!r.field):j(n)||Mp(n):!1}function $T(e,t){const n=e&&e[t];return n?P(n)?co(n,r=>!!r.field):j(n)||Ei(n)||Zf(n):!1}function AT(e,t){if(et(t)){const n=e[t];if((j(n)||Ei(n))&&(YM(n.type)||j(n)&&n.timeUnit)){const r=V7(t);return $T(e,r)}}return!1}function k6(e){return co(ire,t=>{if(Xs(e,t)){const n=e[t];if(P(n))return co(n,r=>!!r.aggregate);{const r=li(n);return r&&!!r.aggregate}}return!1})}function kT(e,t){const n=[],r=[],i=[],a=[],s={};return C6(e,(o,u)=>{if(j(o)){const{field:c,aggregate:l,bin:f,timeUnit:d,...h}=o;if(l||d||f){const g=S6(o),p=g==null?void 0:g.title;let m=G(o,{forAs:!0});const b={...p?[]:{title:pu(o,t,{allowDisabling:!0})},...h,field:m};if(l){let y;if(fs(l)?(y="argmax",m=G({op:"argmax",field:l.argmax},{forAs:!0}),b.field=`${m}.${c}`):Qi(l)?(y="argmin",m=G({op:"argmin",field:l.argmin},{forAs:!0}),b.field=`${m}.${c}`):l!=="boxplot"&&l!=="errorbar"&&l!=="errorband"&&(y=l),y){const v={op:y,as:m};c&&(v.field=c),a.push(v)}}else if(n.push(m),un(o)&&Be(f)){if(r.push({bin:f,field:c,as:m}),n.push(G(o,{binSuffix:"end"})),ed(o,u)&&n.push(G(o,{binSuffix:"range"})),et(u)){const y={field:`${m}_end`};s[`${u}2`]=y}b.bin="binned",hM(u)||(b.type=go)}else if(d&&!Oo(d)){i.push({timeUnit:d,field:c,as:m});const y=un(o)&&o.type!==qu&&"time";y&&(u===Gf||u===fo?b.formatType=y:gre(u)?b.legend={formatType:y,...b.legend}:et(u)&&(b.axis={formatType:y,...b.axis}))}s[u]=b}else n.push(c),s[u]=e[u]}else s[u]=e[u]}),{bins:r,timeUnits:i,aggregate:a,groupby:n,encoding:s}}function ise(e,t,n){const r=mre(t,n);if(r){if(r==="binned"){const i=e[t===Or?He:_t];return!!(j(i)&&j(e[t])&&Et(i.bin))}}else return!1;return!0}function ase(e,t,n,r){const i={};for(const a of B(e))dM(a)||U(rie(a));for(let a of lre){if(!e[a])continue;const s=e[a];if(Xf(a)){const o=cre(a),u=i[o];if(j(u)&&nae(u.type)&&j(s)&&!u.timeUnit){U(Jre(o));continue}}if(a==="angle"&&t==="arc"&&!e.theta&&(U(Kre),a=or),!ise(e,a,t)){U(_p(a,t));continue}if(a===ia&&t==="line"){const o=li(e[a]);if(o!=null&&o.aggregate){U(nie);continue}}if(a===wn&&(n?"fill"in e:"stroke"in e)){U(TM("encoding",{fill:"fill"in e,stroke:"stroke"in e}));continue}if(a===Yf||a===Uu&&!P(s)&&!Fr(s)||a===fo&&P(s)){if(s){if(a===Uu){const o=e[a];if(gT(o)){i[a]=o;continue}}i[a]=Y(s).reduce((o,u)=>(j(u)?o.push(A6(u,a)):U(wy(u,a)),o),[])}}else{if(a===fo&&s===null)i[a]=null;else if(!j(s)&&!Ei(s)&&!Fr(s)&&!Fp(s)&&!Q(s)){U(wy(s,a));continue}i[a]=xT(s,a,r)}}return i}function Op(e,t){const n={};for(const r of B(e)){const i=xT(e[r],r,t,{compositeMark:!0});n[r]=i}return n}function sse(e){const t=[];for(const n of B(e))if(Xs(e,n)){const r=e[n],i=Y(r);for(const a of i)j(a)?t.push(a):Mp(a)&&t.push(a.condition)}return t}function C6(e,t,n){if(e)for(const r of B(e)){const i=e[r];if(P(i))for(const a of i)t.call(n,a,r);else t.call(n,i,r)}}function ose(e,t,n,r){return e?B(e).reduce((i,a)=>{const s=e[a];return P(s)?s.reduce((o,u)=>t.call(r,o,u,a),i):t.call(r,i,s,a)},n):n}function CT(e,t){return B(t).reduce((n,r)=>{switch(r){case He:case _t:case pp:case bp:case mp:case Or:case yi:case ss:case mc:case or:case ra:case Rr:case na:case Lr:case Pr:case Ir:case ar:case Gf:case En:case Mo:case fo:return n;case Uu:if(e==="line"||e==="trail")return n;case Yf:case gp:{const i=t[r];if(P(i)||j(i))for(const a of Y(i))a.aggregate||n.push(G(a,{}));return n}case ia:if(e==="trail")return n;case wn:case vi:case xi:case aa:case os:case us:case ls:case cs:{const i=li(t[r]);return i&&!i.aggregate&&n.push(G(i,{})),n}}},[])}function use(e){const{tooltip:t,...n}=e;if(!t)return{filteredEncoding:n};let r,i;if(P(t)){for(const a of t)a.aggregate?(r||(r=[]),r.push(a)):(i||(i=[]),i.push(a));r&&(n.tooltip=r)}else t.aggregate?n.tooltip=t:i=t;return P(i)&&i.length===1&&(i=i[0]),{customTooltipWithoutAggregatedField:i,filteredEncoding:n}}function Ay(e,t,n,r=!0){if("tooltip"in n)return{tooltip:n.tooltip};const i=e.map(({fieldPrefix:s,titlePrefix:o})=>{const u=r?` of ${F6(t)}`:"";return{field:s+t.field,type:t.type,title:Q(o)?{signal:`${o}"${escape(u)}"`}:o+u}}),a=sse(n).map(Wae);return{tooltip:[...i,...Kr(a,be)]}}function F6(e){const{title:t,field:n}=e;return Ze(t,n)}function M6(e,t,n,r,i){const{scale:a,axis:s}=n;return({partName:o,mark:u,positionPrefix:c,endPositionPrefix:l=void 0,extraEncoding:f={}})=>{const d=F6(n);return FT(e,o,i,{mark:u,encoding:{[t]:{field:`${c}_${n.field}`,type:n.type,...d!==void 0?{title:d}:{},...a!==void 0?{scale:a}:{},...s!==void 0?{axis:s}:{}},...X(l)?{[`${t}2`]:{field:`${l}_${n.field}`}}:{},...r,...f}})}}function FT(e,t,n,r){const{clip:i,color:a,opacity:s}=e,o=e.type;return e[t]||e[t]===void 0&&n[t]?[{...r,mark:{...n[t],...i?{clip:i}:{},...a?{color:a}:{},...s?{opacity:s}:{},...ci(r.mark)?r.mark:{type:r.mark},style:`${o}-${String(t)}`,...Za(e[t])?{}:e[t]}}]:[]}function MT(e,t,n){const{encoding:r}=e,i=t==="vertical"?"y":"x",a=r[i],s=r[`${i}2`],o=r[`${i}Error`],u=r[`${i}Error2`];return{continuousAxisChannelDef:Od(a,n),continuousAxisChannelDef2:Od(s,n),continuousAxisChannelDefError:Od(o,n),continuousAxisChannelDefError2:Od(u,n),continuousAxis:i}}function Od(e,t){if(e!=null&&e.aggregate){const{aggregate:n,...r}=e;return n!==t&&U(Tie(n,t)),r}else return e}function TT(e,t){const{mark:n,encoding:r}=e,{x:i,y:a}=r;if(ci(n)&&n.orient)return n.orient;if(ka(i)){if(ka(a)){const s=j(i)&&i.aggregate,o=j(a)&&a.aggregate;if(!s&&o===t)return"vertical";if(!o&&s===t)return"horizontal";if(s===t&&o===t)throw new Error("Both x and y cannot have aggregate");return Yu(a)&&!Yu(i)?"horizontal":"vertical"}return"horizontal"}else{if(ka(a))return"vertical";throw new Error(`Need a valid continuous axis for ${t}s`)}}const U0="boxplot",cse=["box","median","outliers","rule","ticks"],lse=new Dp(U0,DT);function NT(e){return we(e)?"tukey":e}function DT(e,{config:t}){e={...e,encoding:Op(e.encoding,t)};const{mark:n,encoding:r,params:i,projection:a,...s}=e,o=ci(n)?n:{type:n};i&&U(FM("boxplot"));const u=o.extent??t.boxplot.extent,c=Fe("size",o,t),l=o.invalid,f=NT(u),{bins:d,timeUnits:h,transform:g,continuousAxisChannelDef:p,continuousAxis:m,groupby:b,aggregate:y,encodingWithoutContinuousAxis:v,ticksOrient:x,boxOrient:_,customTooltipWithoutAggregatedField:E}=fse(e,u,t),{color:w,size:S,...$}=v,F=Gt=>M6(o,m,p,Gt,t.boxplot),k=F($),D=F(v),A=F({...$,...S?{size:S}:{}}),M=Ay([{fieldPrefix:f==="min-max"?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:f==="min-max"?"lower_whisker_":"min_",titlePrefix:"Min"}],p,v),C={type:"tick",color:"black",opacity:1,orient:x,invalid:l,aria:!1},T=f==="min-max"?M:Ay([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],p,v),L=[...k({partName:"rule",mark:{type:"rule",invalid:l,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:T}),...k({partName:"rule",mark:{type:"rule",invalid:l,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:T}),...k({partName:"ticks",mark:C,positionPrefix:"lower_whisker",extraEncoding:T}),...k({partName:"ticks",mark:C,positionPrefix:"upper_whisker",extraEncoding:T})],I=[...f!=="tukey"?L:[],...D({partName:"box",mark:{type:"bar",...c?{size:c}:{},orient:_,invalid:l,ariaRoleDescription:"box"},positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:M}),...A({partName:"median",mark:{type:"tick",invalid:l,...V(t.boxplot.median)&&t.boxplot.median.color?{color:t.boxplot.median.color}:{},...c?{size:c}:{},orient:x,aria:!1},positionPrefix:"mid_box",extraEncoding:M})];if(f==="min-max")return{...s,transform:(s.transform??[]).concat(g),layer:I};const z=`datum["lower_box_${p.field}"]`,Z=`datum["upper_box_${p.field}"]`,ee=`(${Z} - ${z})`,fe=`${z} - ${u} * ${ee}`,Ee=`${Z} + ${u} * ${ee}`,me=`datum["${p.field}"]`,Ie={joinaggregate:OT(p.field),groupby:b},Si={transform:[{filter:`(${fe} <= ${me}) && (${me} <= ${Ee})`},{aggregate:[{op:"min",field:p.field,as:`lower_whisker_${p.field}`},{op:"max",field:p.field,as:`upper_whisker_${p.field}`},{op:"min",field:`lower_box_${p.field}`,as:`lower_box_${p.field}`},{op:"max",field:`upper_box_${p.field}`,as:`upper_box_${p.field}`},...y],groupby:b}],layer:L},{tooltip:Io,...gs}=$,{scale:K,axis:de}=p,ge=F6(p),q=bn(de,["title"]),wt=FT(o,"outliers",t.boxplot,{transform:[{filter:`(${me} < ${fe}) || (${me} > ${Ee})`}],mark:"point",encoding:{[m]:{field:p.field,type:p.type,...ge!==void 0?{title:ge}:{},...K!==void 0?{scale:K}:{},...Oe(q)?{}:{axis:q}},...gs,...w?{color:w}:{},...E?{tooltip:E}:{}}})[0];let Ce;const Mt=[...d,...h,Ie];return wt?Ce={transform:Mt,layer:[wt,Si]}:(Ce=Si,Ce.transform.unshift(...Mt)),{...s,layer:[Ce,{transform:g,layer:I}]}}function OT(e){return[{op:"q1",field:e,as:`lower_box_${e}`},{op:"q3",field:e,as:`upper_box_${e}`}]}function fse(e,t,n){const r=TT(e,U0),{continuousAxisChannelDef:i,continuousAxis:a}=MT(e,r,U0),s=i.field,o=NT(t),u=[...OT(s),{op:"median",field:s,as:`mid_box_${s}`},{op:"min",field:s,as:(o==="min-max"?"lower_whisker_":"min_")+s},{op:"max",field:s,as:(o==="min-max"?"upper_whisker_":"max_")+s}],c=o==="min-max"||o==="tukey"?[]:[{calculate:`datum["upper_box_${s}"] - datum["lower_box_${s}"]`,as:`iqr_${s}`},{calculate:`min(datum["upper_box_${s}"] + datum["iqr_${s}"] * ${t}, datum["max_${s}"])`,as:`upper_whisker_${s}`},{calculate:`max(datum["lower_box_${s}"] - datum["iqr_${s}"] * ${t}, datum["min_${s}"])`,as:`lower_whisker_${s}`}],{[a]:l,...f}=e.encoding,{customTooltipWithoutAggregatedField:d,filteredEncoding:h}=use(f),{bins:g,timeUnits:p,aggregate:m,groupby:b,encoding:y}=kT(h,n),v=r==="vertical"?"horizontal":"vertical",x=r,_=[...g,...p,{aggregate:[...m,...u],groupby:b},...c];return{bins:g,timeUnits:p,transform:_,groupby:b,aggregate:m,continuousAxisChannelDef:i,continuousAxis:a,encodingWithoutContinuousAxis:y,ticksOrient:v,boxOrient:x,customTooltipWithoutAggregatedField:d}}const T6="errorbar",dse=["ticks","rule"],hse=new Dp(T6,RT);function RT(e,{config:t}){e={...e,encoding:Op(e.encoding,t)};const{transform:n,continuousAxisChannelDef:r,continuousAxis:i,encodingWithoutContinuousAxis:a,ticksOrient:s,markDef:o,outerSpec:u,tooltipEncoding:c}=LT(e,T6,t);delete a.size;const l=M6(o,i,r,a,t.errorbar),f=o.thickness,d=o.size,h={type:"tick",orient:s,aria:!1,...f!==void 0?{thickness:f}:{},...d!==void 0?{size:d}:{}},g=[...l({partName:"ticks",mark:h,positionPrefix:"lower",extraEncoding:c}),...l({partName:"ticks",mark:h,positionPrefix:"upper",extraEncoding:c}),...l({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar",...f!==void 0?{size:f}:{}},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:c})];return{...u,transform:n,...g.length>1?{layer:g}:{...g[0]}}}function gse(e,t){const{encoding:n}=e;if(pse(n))return{orient:TT(e,t),inputType:"raw"};const r=mse(n),i=bse(n),a=n.x,s=n.y;if(r){if(i)throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);const o=n.x2,u=n.y2;if(ue(o)&&ue(u))throw new Error(`${t} cannot have both x2 and y2`);if(ue(o)){if(ka(a))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${t}`)}else if(ue(u)){if(ka(s))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${t}`)}throw new Error("No ranged axis")}else{const o=n.xError,u=n.xError2,c=n.yError,l=n.yError2;if(ue(u)&&!ue(o))throw new Error(`${t} cannot have xError2 without xError`);if(ue(l)&&!ue(c))throw new Error(`${t} cannot have yError2 without yError`);if(ue(o)&&ue(c))throw new Error(`${t} cannot have both xError and yError with both are quantiative`);if(ue(o)){if(ka(a))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}else if(ue(c)){if(ka(s))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}function pse(e){return(ue(e.x)||ue(e.y))&&!ue(e.x2)&&!ue(e.y2)&&!ue(e.xError)&&!ue(e.xError2)&&!ue(e.yError)&&!ue(e.yError2)}function mse(e){return ue(e.x2)||ue(e.y2)}function bse(e){return ue(e.xError)||ue(e.xError2)||ue(e.yError)||ue(e.yError2)}function LT(e,t,n){const{mark:r,encoding:i,params:a,projection:s,...o}=e,u=ci(r)?r:{type:r};a&&U(FM(t));const{orient:c,inputType:l}=gse(e,t),{continuousAxisChannelDef:f,continuousAxisChannelDef2:d,continuousAxisChannelDefError:h,continuousAxisChannelDefError2:g,continuousAxis:p}=MT(e,c,t),{errorBarSpecificAggregate:m,postAggregateCalculates:b,tooltipSummary:y,tooltipTitleWithFieldName:v}=yse(u,f,d,h,g,l,t,n),{[p]:x,[p==="x"?"x2":"y2"]:_,[p==="x"?"xError":"yError"]:E,[p==="x"?"xError2":"yError2"]:w,...S}=i,{bins:$,timeUnits:F,aggregate:k,groupby:D,encoding:A}=kT(S,n),M=[...k,...m],C=l!=="raw"?[]:D,T=Ay(y,f,A,v);return{transform:[...o.transform??[],...$,...F,...M.length===0?[]:[{aggregate:M,groupby:C}],...b],groupby:C,continuousAxisChannelDef:f,continuousAxis:p,encodingWithoutContinuousAxis:A,ticksOrient:c==="vertical"?"horizontal":"vertical",markDef:u,outerSpec:o,tooltipEncoding:T}}function yse(e,t,n,r,i,a,s,o){let u=[],c=[];const l=t.field;let f,d=!1;if(a==="raw"){const h=e.center?e.center:e.extent?e.extent==="iqr"?"median":"mean":o.errorbar.center,g=e.extent?e.extent:h==="mean"?"stderr":"iqr";if(h==="median"!=(g==="iqr")&&U(Mie(h,g,s)),g==="stderr"||g==="stdev")u=[{op:g,field:l,as:`extent_${l}`},{op:h,field:l,as:`center_${l}`}],c=[{calculate:`datum["center_${l}"] + datum["extent_${l}"]`,as:`upper_${l}`},{calculate:`datum["center_${l}"] - datum["extent_${l}"]`,as:`lower_${l}`}],f=[{fieldPrefix:"center_",titlePrefix:Hf(h)},{fieldPrefix:"upper_",titlePrefix:wx(h,g,"+")},{fieldPrefix:"lower_",titlePrefix:wx(h,g,"-")}],d=!0;else{let p,m,b;g==="ci"?(p="mean",m="ci0",b="ci1"):(p="median",m="q1",b="q3"),u=[{op:m,field:l,as:`lower_${l}`},{op:b,field:l,as:`upper_${l}`},{op:p,field:l,as:`center_${l}`}],f=[{fieldPrefix:"upper_",titlePrefix:pu({field:l,aggregate:b,type:"quantitative"},o,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:pu({field:l,aggregate:m,type:"quantitative"},o,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:pu({field:l,aggregate:p,type:"quantitative"},o,{allowDisabling:!1})}]}}else{(e.center||e.extent)&&U(Fie(e.center,e.extent)),a==="aggregated-upper-lower"?(f=[],c=[{calculate:`datum["${n.field}"]`,as:`upper_${l}`},{calculate:`datum["${l}"]`,as:`lower_${l}`}]):a==="aggregated-error"&&(f=[{fieldPrefix:"",titlePrefix:l}],c=[{calculate:`datum["${l}"] + datum["${r.field}"]`,as:`upper_${l}`}],i?c.push({calculate:`datum["${l}"] + datum["${i.field}"]`,as:`lower_${l}`}):c.push({calculate:`datum["${l}"] - datum["${r.field}"]`,as:`lower_${l}`}));for(const h of c)f.push({fieldPrefix:h.as.substring(0,6),titlePrefix:lo(lo(h.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:c,errorBarSpecificAggregate:u,tooltipSummary:f,tooltipTitleWithFieldName:d}}function wx(e,t,n){return`${Hf(e)} ${n} ${t}`}const N6="errorband",vse=["band","borders"],xse=new Dp(N6,PT);function PT(e,{config:t}){e={...e,encoding:Op(e.encoding,t)};const{transform:n,continuousAxisChannelDef:r,continuousAxis:i,encodingWithoutContinuousAxis:a,markDef:s,outerSpec:o,tooltipEncoding:u}=LT(e,N6,t),c=s,l=M6(c,i,r,a,t.errorband),f=e.encoding.x!==void 0&&e.encoding.y!==void 0;let d={type:f?"area":"rect"},h={type:f?"line":"rule"};const g={...c.interpolate?{interpolate:c.interpolate}:{},...c.tension&&c.interpolate?{tension:c.tension}:{}};return f?(d={...d,...g,ariaRoleDescription:"errorband"},h={...h,...g,aria:!1}):c.interpolate?U(hx("interpolate")):c.tension&&U(hx("tension")),{...o,transform:n,layer:[...l({partName:"band",mark:d,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:u}),...l({partName:"borders",mark:h,positionPrefix:"lower",extraEncoding:u}),...l({partName:"borders",mark:h,positionPrefix:"upper",extraEncoding:u})]}}const IT={};function D6(e,t,n){const r=new Dp(e,t);IT[e]={normalizer:r,parts:n}}function _se(){return B(IT)}D6(U0,DT,cse);D6(T6,RT,dse);D6(N6,PT,vse);const wse=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],zT={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},BT={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},Ese=B(zT),Sse=B(BT),$se={header:1,headerRow:1,headerColumn:1,headerFacet:1},UT=B($se),jT=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],Ase={gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},kse={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},Mr="_vgsid_",Cse={point:{on:"click",fields:[Mr],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[pointerdown, window:pointerup] > window:pointermove!",encodings:["x","y"],translate:"[pointerdown, window:pointerup] > window:pointermove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function O6(e){return e==="legend"||!!(e!=null&&e.legend)}function dm(e){return O6(e)&&V(e)}function R6(e){return!!(e!=null&&e.select)}function qT(e){const t=[];for(const n of e||[]){if(R6(n))continue;const{expr:r,bind:i,...a}=n;if(i&&r){const s={...a,bind:i,init:r};t.push(s)}else{const s={...a,...r?{update:r}:{},...i?{bind:i}:{}};t.push(s)}}return t}function Fse(e){return Rp(e)||P6(e)||L6(e)}function L6(e){return"concat"in e}function Rp(e){return"vconcat"in e}function P6(e){return"hconcat"in e}function WT({step:e,offsetIsDiscrete:t}){return t?e.for??"offset":"position"}function fi(e){return V(e)&&e.step!==void 0}function Ex(e){return e.view||e.width||e.height}const Sx=20,Mse={align:1,bounds:1,center:1,columns:1,spacing:1},Tse=B(Mse);function Nse(e,t,n){const r=n[t],i={},{spacing:a,columns:s}=r;a!==void 0&&(i.spacing=a),s!==void 0&&(Cp(e)&&!Qf(e.facet)||L6(e))&&(i.columns=s),Rp(e)&&(i.columns=1);for(const o of Tse)if(e[o]!==void 0)if(o==="spacing"){const u=e[o];i[o]=we(u)?u:{row:u.row??a,column:u.column??a}}else i[o]=e[o];return i}function ky(e,t){return e[t]??e[t==="width"?"continuousWidth":"continuousHeight"]}function j0(e,t){const n=q0(e,t);return fi(n)?n.step:HT}function q0(e,t){const n=e[t]??e[t==="width"?"discreteWidth":"discreteHeight"];return Ze(n,{step:e.step})}const HT=20,Dse={continuousWidth:200,continuousHeight:200,step:HT},Ose={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:Dse,mark:Aae,arc:{},area:{},bar:Fae,circle:{},geoshape:{},image:{},line:{},point:{},rect:Mae,rule:{color:"black"},square:{},text:{color:"black"},tick:Tae,trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:uae,projection:{},legend:Ase,header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:Cse,style:{},title:{},facet:{spacing:Sx},concat:{spacing:Sx},normalizedNumberFormat:".0%"},Ci=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],$x={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},Ax={blue:Ci[0],orange:Ci[1],red:Ci[2],teal:Ci[3],green:Ci[4],yellow:Ci[5],purple:Ci[6],pink:Ci[7],brown:Ci[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function Rse(e={}){return{signals:[{name:"color",value:V(e)?{...Ax,...e}:Ax}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}function Lse(e){return{signals:[{name:"fontSize",value:V(e)?{...$x,...e}:$x}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}function Pse(e){return{text:{font:e},style:{"guide-label":{font:e},"guide-title":{font:e},"group-title":{font:e},"group-subtitle":{font:e}}}}function GT(e){const t=B(e||{}),n={};for(const r of t){const i=e[r];n[r]=td(i)?wM(i):Mn(i)}return n}function Ise(e){const t=B(e),n={};for(const r of t)n[r]=GT(e[r]);return n}const zse=[...rT,...ST,...UT,"background","padding","legend","lineBreak","scale","style","title","view"];function YT(e={}){const{color:t,font:n,fontSize:r,selection:i,...a}=e,s=ec({},oe(Ose),n?Pse(n):{},t?Rse(t):{},r?Lse(r):{},a||{});i&&tc(s,"selection",i,!0);const o=bn(s,zse);for(const u of["background","lineBreak","padding"])s[u]&&(o[u]=Mn(s[u]));for(const u of rT)s[u]&&(o[u]=gn(s[u]));for(const u of ST)s[u]&&(o[u]=GT(s[u]));for(const u of UT)s[u]&&(o[u]=gn(s[u]));return s.legend&&(o.legend=gn(s.legend)),s.scale&&(o.scale=gn(s.scale)),s.style&&(o.style=Ise(s.style)),s.title&&(o.title=gn(s.title)),s.view&&(o.view=gn(s.view)),o}const Bse=new Set(["view",...xae]),Use=["color","fontSize","background","padding","facet","concat","numberFormat","numberFormatType","normalizedNumberFormat","normalizedNumberFormatType","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],jse={view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"],...$ae};function qse(e){e=oe(e);for(const t of Use)delete e[t];if(e.axis)for(const t in e.axis)td(e.axis[t])&&delete e.axis[t];if(e.legend)for(const t of wse)delete e.legend[t];if(e.mark){for(const t of px)delete e.mark[t];e.mark.tooltip&&V(e.mark.tooltip)&&delete e.mark.tooltip}e.params&&(e.signals=(e.signals||[]).concat(qT(e.params)),delete e.params);for(const t of Bse){for(const r of px)delete e[t][r];const n=jse[t];if(n)for(const r of n)delete e[t][r];Hse(e,t)}for(const t of _se())delete e[t];Wse(e);for(const t in e)V(e[t])&&Oe(e[t])&&delete e[t];return Oe(e)?void 0:e}function Wse(e){const{titleMarkConfig:t,subtitleMarkConfig:n,subtitle:r}=_M(e.title);Oe(t)||(e.style["group-title"]={...e.style["group-title"],...t}),Oe(n)||(e.style["group-subtitle"]={...e.style["group-subtitle"],...n}),Oe(r)?delete e.title:e.title=r}function Hse(e,t,n,r){const i=r?e[t][r]:e[t];t==="view"&&(n="cell");const a={...i,...e.style[n??t]};Oe(a)||(e.style[n??t]=a),r||delete e[t]}function Lp(e){return"layer"in e}function Gse(e){return"repeat"in e}function Yse(e){return!P(e.repeat)&&e.repeat.layer}class I6{map(t,n){return Cp(t)?this.mapFacet(t,n):Gse(t)?this.mapRepeat(t,n):P6(t)?this.mapHConcat(t,n):Rp(t)?this.mapVConcat(t,n):L6(t)?this.mapConcat(t,n):this.mapLayerOrUnit(t,n)}mapLayerOrUnit(t,n){if(Lp(t))return this.mapLayer(t,n);if(oa(t))return this.mapUnit(t,n);throw new Error(e6(t))}mapLayer(t,n){return{...t,layer:t.layer.map(r=>this.mapLayerOrUnit(r,n))}}mapHConcat(t,n){return{...t,hconcat:t.hconcat.map(r=>this.map(r,n))}}mapVConcat(t,n){return{...t,vconcat:t.vconcat.map(r=>this.map(r,n))}}mapConcat(t,n){const{concat:r,...i}=t;return{...i,concat:r.map(a=>this.map(a,n))}}mapFacet(t,n){return{...t,spec:this.map(t.spec,n)}}mapRepeat(t,n){return{...t,spec:this.map(t.spec,n)}}}const Xse={zero:1,center:1,normalize:1};function Vse(e){return e in Xse}const Kse=new Set([eT,Sp,Ep,R0,Ap,m6,b6,$p,tT,p6]),Jse=new Set([Sp,Ep,eT]);function Vo(e){return j(e)&&Hu(e)==="quantitative"&&!e.bin}function kx(e,t,{orient:n,type:r}){const i=t==="x"?"y":"radius",a=t==="x"&&["bar","area"].includes(r),s=e[t],o=e[i];if(j(s)&&j(o))if(Vo(s)&&Vo(o)){if(s.stack)return t;if(o.stack)return i;const u=j(s)&&!!s.aggregate,c=j(o)&&!!o.aggregate;if(u!==c)return u?t:i;if(a){if(n==="vertical")return i;if(n==="horizontal")return t}}else{if(Vo(s))return t;if(Vo(o))return i}else{if(Vo(s))return a&&n==="vertical"?void 0:t;if(Vo(o))return a&&n==="horizontal"?void 0:i}}function Qse(e){switch(e){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}function XT(e,t){var p,m;const n=ci(e)?e:{type:e},r=n.type;if(!Kse.has(r))return null;const i=kx(t,"x",n)||kx(t,"theta",n);if(!i)return null;const a=t[i],s=j(a)?G(a,{}):void 0,o=Qse(i),u=[],c=new Set;if(t[o]){const b=t[o],y=j(b)?G(b,{}):void 0;y&&y!==s&&(u.push(o),c.add(y))}const l=o==="x"?"xOffset":"yOffset",f=t[l],d=j(f)?G(f,{}):void 0;d&&d!==s&&(u.push(l),c.add(d));const h=fre.reduce((b,y)=>{if(y!=="tooltip"&&Xs(t,y)){const v=t[y];for(const x of Y(v)){const _=li(x);if(_.aggregate)continue;const E=G(_,{});(!E||!c.has(E))&&b.push({channel:y,fieldDef:_})}}return b},[]);let g;return a.stack!==void 0?Za(a.stack)?g=a.stack?"zero":null:g=a.stack:Jse.has(r)&&(g="zero"),!g||!Vse(g)||k6(t)&&h.length===0?null:(p=a==null?void 0:a.scale)!=null&&p.type&&((m=a==null?void 0:a.scale)==null?void 0:m.type)!==yn.LINEAR?(a!=null&&a.stack&&U(Aie(a.scale.type)),null):ue(t[_i(i)])?(a.stack!==void 0&&U($ie(i)),null):(j(a)&&a.aggregate&&!Ere.has(a.aggregate)&&U(kie(a.aggregate)),{groupbyChannels:u,groupbyFields:c,fieldChannel:i,impute:a.impute===null?!1:hs(r),stackBy:h,offset:g})}function VT(e,t,n){const r=gn(e),i=Fe("orient",r,n);if(r.orient=noe(r.type,t,i),i!==void 0&&i!==r.orient&&U(cie(r.orient,i)),r.type==="bar"&&r.orient){const u=Fe("cornerRadiusEnd",r,n);if(u!==void 0){const c=r.orient==="horizontal"&&t.x2||r.orient==="vertical"&&t.y2?["cornerRadius"]:Cae[r.orient];for(const l of c)r[l]=u;r.cornerRadiusEnd!==void 0&&delete r.cornerRadiusEnd}}const a=Fe("opacity",r,n),s=Fe("fillOpacity",r,n);return a===void 0&&s===void 0&&(r.opacity=eoe(r.type,t)),Fe("cursor",r,n)===void 0&&(r.cursor=Zse(r,t,n)),r}function Zse(e,t,n){return t.href||e.href||Fe("href",e,n)?"pointer":e.cursor}function eoe(e,t){if(ye([Ap,p6,m6,b6],e)&&!k6(t))return .7}function toe(e,t,{graticule:n}){if(n)return!1;const r=Zi("filled",e,t),i=e.type;return Ze(r,i!==Ap&&i!==$p&&i!==R0)}function noe(e,t,n){switch(e){case Ap:case m6:case b6:case tT:case yae:case bae:return}const{x:r,y:i,x2:a,y2:s}=t;switch(e){case Sp:if(j(r)&&(Et(r.bin)||j(i)&&i.aggregate&&!r.aggregate))return"vertical";if(j(i)&&(Et(i.bin)||j(r)&&r.aggregate&&!i.aggregate))return"horizontal";if(s||a){if(n)return n;if(!a)return(j(r)&&r.type===go&&!Be(r.bin)||P0(r))&&j(i)&&Et(i.bin)?"horizontal":"vertical";if(!s)return(j(i)&&i.type===go&&!Be(i.bin)||P0(i))&&j(r)&&Et(r.bin)?"vertical":"horizontal"}case R0:if(a&&!(j(r)&&Et(r.bin))&&s&&!(j(i)&&Et(i.bin)))return;case Ep:if(s)return j(i)&&Et(i.bin)?"horizontal":"vertical";if(a)return j(r)&&Et(r.bin)?"vertical":"horizontal";if(e===R0){if(r&&!i)return"vertical";if(i&&!r)return"horizontal"}case $p:case p6:{const o=vx(r),u=vx(i);if(n)return n;if(o&&!u)return e!=="tick"?"horizontal":"vertical";if(!o&&u)return e!=="tick"?"vertical":"horizontal";if(o&&u)return"vertical";{const c=un(r)&&r.type===qu,l=un(i)&&i.type===qu;if(c&&!l)return"vertical";if(!c&&l)return"horizontal"}return}}return"vertical"}function roe(e){const{point:t,line:n,...r}=e;return B(r).length>1?r:r.type}function ioe(e){for(const t of["line","area","rule","trail"])e[t]&&(e={...e,[t]:bn(e[t],["point","line"])});return e}function hm(e,t={},n){return e.point==="transparent"?{opacity:0}:e.point?V(e.point)?e.point:{}:e.point!==void 0?null:t.point||n.shape?V(t.point)?t.point:{}:void 0}function Cx(e,t={}){return e.line?e.line===!0?{}:e.line:e.line!==void 0?null:t.line?t.line===!0?{}:t.line:void 0}class aoe{constructor(){this.name="path-overlay"}hasMatchingType(t,n){if(oa(t)){const{mark:r,encoding:i}=t,a=ci(r)?r:{type:r};switch(a.type){case"line":case"rule":case"trail":return!!hm(a,n[a.type],i);case"area":return!!hm(a,n[a.type],i)||!!Cx(a,n[a.type])}}return!1}run(t,n,r){const{config:i}=n,{params:a,projection:s,mark:o,name:u,encoding:c,...l}=t,f=Op(c,i),d=ci(o)?o:{type:o},h=hm(d,i[d.type],f),g=d.type==="area"&&Cx(d,i[d.type]),p=[{name:u,...a?{params:a}:{},mark:roe({...d.type==="area"&&d.opacity===void 0&&d.fillOpacity===void 0?{opacity:.7}:{},...d}),encoding:bn(f,["shape"])}],m=XT(VT(d,f,i),f);let b=f;if(m){const{fieldChannel:y,offset:v}=m;b={...f,[y]:{...f[y],...v?{stack:v}:{}}}}return b=bn(b,["y2","x2"]),g&&p.push({...s?{projection:s}:{},mark:{type:"line",...zu(d,["clip","interpolate","tension","tooltip"]),...g},encoding:b}),h&&p.push({...s?{projection:s}:{},mark:{type:"point",opacity:1,filled:!0,...zu(d,["clip","tooltip"]),...h},encoding:b}),r({...l,layer:p},{...n,config:ioe(i)})}}function soe(e,t){return t?Qf(e)?JT(e,t):KT(e,t):e}function gm(e,t){return t?JT(e,t):e}function Cy(e,t,n){const r=t[e];if(jae(r)){if(r.repeat in n)return{...t,[e]:n[r.repeat]};U(qre(r.repeat));return}return t}function KT(e,t){if(e=Cy("field",e,t),e!==void 0){if(e===null)return null;if(E6(e)&&ei(e.sort)){const n=Cy("field",e.sort,t);e={...e,...n?{sort:n}:{}}}return e}}function Fx(e,t){if(j(e))return KT(e,t);{const n=Cy("datum",e,t);return n!==e&&!n.type&&(n.type="nominal"),n}}function Mx(e,t){if(ue(e)){const n=Fx(e,t);if(n)return n;if(Fp(e))return{condition:e.condition}}else{if(Zf(e)){const n=Fx(e.condition,t);if(n)return{...e,condition:n};{const{condition:r,...i}=e;return i}}return e}}function JT(e,t){const n={};for(const r in e)if(ie(e,r)){const i=e[r];if(P(i))n[r]=i.map(a=>Mx(a,t)).filter(a=>a);else{const a=Mx(i,t);a!==void 0&&(n[r]=a)}}return n}class ooe{constructor(){this.name="RuleForRangedLine"}hasMatchingType(t){if(oa(t)){const{encoding:n,mark:r}=t;if(r==="line"||ci(r)&&r.type==="line")for(const i of ure){const a=To(i),s=n[a];if(n[i]&&(j(s)&&!Et(s.bin)||Ei(s)))return!0}}return!1}run(t,n,r){const{encoding:i,mark:a}=t;return U(uie(!!i.x2,!!i.y2)),r({...t,mark:V(a)?{...a,type:"rule"}:"rule"},n)}}class uoe extends I6{constructor(){super(...arguments),this.nonFacetUnitNormalizers=[lse,hse,xse,new aoe,new ooe]}map(t,n){if(oa(t)){const r=Xs(t.encoding,Hi),i=Xs(t.encoding,Gi),a=Xs(t.encoding,hp);if(r||i||a)return this.mapFacetedUnit(t,n)}return super.map(t,n)}mapUnit(t,n){const{parentEncoding:r,parentProjection:i}=n,a=gm(t.encoding,n.repeater),s={...t,...t.name?{name:[n.repeaterPrefix,t.name].filter(u=>u).join("_")}:{},...a?{encoding:a}:{}};if(r||i)return this.mapUnitWithParentEncodingOrProjection(s,n);const o=this.mapLayerOrUnit.bind(this);for(const u of this.nonFacetUnitNormalizers)if(u.hasMatchingType(s,n.config))return u.run(s,n,o);return s}mapRepeat(t,n){return Yse(t)?this.mapLayerRepeat(t,n):this.mapNonLayerRepeat(t,n)}mapLayerRepeat(t,n){const{repeat:r,spec:i,...a}=t,{row:s,column:o,layer:u}=r,{repeater:c={},repeaterPrefix:l=""}=n;return s||o?this.mapRepeat({...t,repeat:{...s?{row:s}:{},...o?{column:o}:{}},spec:{repeat:{layer:u},spec:i}},n):{...a,layer:u.map(f=>{const d={...c,layer:f},h=`${(i.name?`${i.name}_`:"")+l}child__layer_${We(f)}`,g=this.mapLayerOrUnit(i,{...n,repeater:d,repeaterPrefix:h});return g.name=h,g})}}mapNonLayerRepeat(t,n){const{repeat:r,spec:i,data:a,...s}=t;!P(r)&&t.columns&&(t=bn(t,["columns"]),U(cx("repeat")));const o=[],{repeater:u={},repeaterPrefix:c=""}=n,l=!P(r)&&r.row||[u?u.row:null],f=!P(r)&&r.column||[u?u.column:null],d=P(r)&&r||[u?u.repeat:null];for(const g of d)for(const p of l)for(const m of f){const b={repeat:g,row:p,column:m,layer:u.layer},y=(i.name?`${i.name}_`:"")+c+"child__"+(P(r)?`${We(g)}`:(r.row?`row_${We(p)}`:"")+(r.column?`column_${We(m)}`:"")),v=this.map(i,{...n,repeater:b,repeaterPrefix:y});v.name=y,o.push(bn(v,["data"]))}const h=P(r)?t.columns:r.column?r.column.length:1;return{data:i.data??a,align:"all",...s,columns:h,concat:o}}mapFacet(t,n){const{facet:r}=t;return Qf(r)&&t.columns&&(t=bn(t,["columns"]),U(cx("facet"))),super.mapFacet(t,n)}mapUnitWithParentEncodingOrProjection(t,n){const{encoding:r,projection:i}=t,{parentEncoding:a,parentProjection:s,config:o}=n,u=Nx({parentProjection:s,projection:i}),c=Tx({parentEncoding:a,encoding:gm(r,n.repeater)});return this.mapUnit({...t,...u?{projection:u}:{},...c?{encoding:c}:{}},{config:o})}mapFacetedUnit(t,n){const{row:r,column:i,facet:a,...s}=t.encoding,{mark:o,width:u,projection:c,height:l,view:f,params:d,encoding:h,...g}=t,{facetMapping:p,layout:m}=this.getFacetMappingAndLayout({row:r,column:i,facet:a},n),b=gm(s,n.repeater);return this.mapFacet({...g,...m,facet:p,spec:{...u?{width:u}:{},...l?{height:l}:{},...f?{view:f}:{},...c?{projection:c}:{},mark:o,encoding:b,...d?{params:d}:{}}},n)}getFacetMappingAndLayout(t,n){const{row:r,column:i,facet:a}=t;if(r||i){a&&U(sie([...r?[Hi]:[],...i?[Gi]:[]]));const s={},o={};for(const u of[Hi,Gi]){const c=t[u];if(c){const{align:l,center:f,spacing:d,columns:h,...g}=c;s[u]=g;for(const p of["align","center","spacing"])c[p]!==void 0&&(o[p]??(o[p]={}),o[p][u]=c[p])}}return{facetMapping:s,layout:o}}else{const{align:s,center:o,spacing:u,columns:c,...l}=a;return{facetMapping:soe(l,n.repeater),layout:{...s?{align:s}:{},...o?{center:o}:{},...u?{spacing:u}:{},...c?{columns:c}:{}}}}}mapLayer(t,{parentEncoding:n,parentProjection:r,...i}){const{encoding:a,projection:s,...o}=t,u={...i,parentEncoding:Tx({parentEncoding:n,encoding:a,layer:!0}),parentProjection:Nx({parentProjection:r,projection:s})};return super.mapLayer({...o,...t.name?{name:[u.repeaterPrefix,t.name].filter(c=>c).join("_")}:{}},u)}}function Tx({parentEncoding:e,encoding:t={},layer:n}){let r={};if(e){const i=new Set([...B(e),...B(t)]);for(const a of i){const s=t[a],o=e[a];if(ue(s)){const u={...o,...s};r[a]=u}else Zf(s)?r[a]={...s,condition:{...o,...s.condition}}:s||s===null?r[a]=s:(n||Fr(o)||Q(o)||ue(o)||P(o))&&(r[a]=o)}}else r=t;return!r||Oe(r)?void 0:r}function Nx(e){const{parentProjection:t,projection:n}=e;return t&&n&&U(Vre({parentProjection:t,projection:n})),n??t}function z6(e){return"filter"in e}function coe(e){return(e==null?void 0:e.stop)!==void 0}function QT(e){return"lookup"in e}function loe(e){return"data"in e}function foe(e){return"param"in e}function doe(e){return"pivot"in e}function hoe(e){return"density"in e}function goe(e){return"quantile"in e}function poe(e){return"regression"in e}function moe(e){return"loess"in e}function boe(e){return"sample"in e}function yoe(e){return"window"in e}function voe(e){return"joinaggregate"in e}function xoe(e){return"flatten"in e}function _oe(e){return"calculate"in e}function ZT(e){return"bin"in e}function woe(e){return"impute"in e}function Eoe(e){return"timeUnit"in e}function Soe(e){return"aggregate"in e}function $oe(e){return"stack"in e}function Aoe(e){return"fold"in e}function koe(e){return"extent"in e&&!("density"in e)}function Coe(e){return e.map(t=>z6(t)?{filter:hu(t.filter,tae)}:t)}class Foe extends I6{map(t,n){return n.emptySelections??(n.emptySelections={}),n.selectionPredicates??(n.selectionPredicates={}),t=Dx(t,n),super.map(t,n)}mapLayerOrUnit(t,n){if(t=Dx(t,n),t.encoding){const r={};for(const[i,a]of Ga(t.encoding))r[i]=eN(a,n);t={...t,encoding:r}}return super.mapLayerOrUnit(t,n)}mapUnit(t,n){const{selection:r,...i}=t;return r?{...i,params:Ga(r).map(([a,s])=>{const{init:o,bind:u,empty:c,...l}=s;l.type==="single"?(l.type="point",l.toggle=!1):l.type==="multi"&&(l.type="point"),n.emptySelections[a]=c!=="none";for(const f of kt(n.selectionPredicates[a]??{}))f.empty=c!=="none";return{name:a,value:o,select:l,bind:u}})}:t}}function Dx(e,t){const{transform:n,...r}=e;if(n){const i=n.map(a=>{if(z6(a))return{filter:Fy(a,t)};if(ZT(a)&&No(a.bin))return{...a,bin:tN(a.bin)};if(QT(a)){const{selection:s,...o}=a.from;return s?{...a,from:{param:s,...o}}:a}return a});return{...r,transform:i}}return e}function eN(e,t){var r,i;const n=oe(e);if(j(n)&&No(n.bin)&&(n.bin=tN(n.bin)),Ro(n)&&((i=(r=n.scale)==null?void 0:r.domain)!=null&&i.selection)){const{selection:a,...s}=n.scale.domain;n.scale.domain={...s,...a?{param:a}:{}}}if(Fp(n))if(P(n.condition))n.condition=n.condition.map(a=>{const{selection:s,param:o,test:u,...c}=a;return o?a:{...c,test:Fy(a,t)}});else{const{selection:a,param:s,test:o,...u}=eN(n.condition,t);n.condition=s?n.condition:{...u,test:Fy(n.condition,t)}}return n}function tN(e){const t=e.extent;if(t!=null&&t.selection){const{selection:n,...r}=t;return{...e,extent:{...r,param:n}}}return e}function Fy(e,t){const n=r=>hu(r,i=>{var a;const s=t.emptySelections[i]??!0,o={param:i,empty:s};return(a=t.selectionPredicates)[i]??(a[i]=[]),t.selectionPredicates[i].push(o),o});return e.selection?n(e.selection):hu(e.test||e.filter,r=>r.selection?n(r.selection):r)}class My extends I6{map(t,n){const r=n.selections??[];if(t.params&&!oa(t)){const i=[];for(const a of t.params)R6(a)?r.push(a):i.push(a);t.params=i}return n.selections=r,super.map(t,n)}mapUnit(t,n){const r=n.selections;if(!r||!r.length)return t;const i=(n.path??[]).concat(t.name),a=[];for(const s of r)if(!s.views||!s.views.length)a.push(s);else for(const o of s.views)(X(o)&&(o===t.name||i.includes(o))||P(o)&&o.map(u=>i.indexOf(u)).every((u,c,l)=>u!==-1&&(c===0||u>l[c-1])))&&a.push(s);return a.length&&(t.params=a),t}}for(const e of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const t=My.prototype[e];My.prototype[e]=function(n,r){return t.call(this,n,Moe(n,r))}}function Moe(e,t){return e.name?{...t,path:(t.path??[]).concat(e.name)}:t}function nN(e,t){t===void 0&&(t=YT(e.config));const n=Ooe(e,t),{width:r,height:i}=e,a=Roe(n,{width:r,height:i,autosize:e.autosize},t);return{...n,...a?{autosize:a}:{}}}const Toe=new uoe,Noe=new Foe,Doe=new My;function Ooe(e,t={}){const n={config:t};return Doe.map(Toe.map(Noe.map(e,n),n),n)}function Ox(e){return X(e)?{type:e}:e??{}}function Roe(e,t,n){let{width:r,height:i}=t;const a=oa(e)||Lp(e),s={};a?r=="container"&&i=="container"?(s.type="fit",s.contains="padding"):r=="container"?(s.type="fit-x",s.contains="padding"):i=="container"&&(s.type="fit-y",s.contains="padding"):(r=="container"&&(U(ax("width")),r=void 0),i=="container"&&(U(ax("height")),i=void 0));const o={type:"pad",...s,...n?Ox(n.autosize):{},...Ox(e.autosize)};if(o.type==="fit"&&!a&&(U(Nre),o.type="pad"),r=="container"&&!(o.type=="fit"||o.type=="fit-x")&&U(sx("width")),i=="container"&&!(o.type=="fit"||o.type=="fit-y")&&U(sx("height")),!Dn(o,{type:"pad"}))return o}function Loe(e){return e==="fit"||e==="fit-x"||e==="fit-y"}function Poe(e){return e?`fit-${yp(e)}`:"fit"}const Ioe=["background","padding"];function Rx(e,t){const n={};for(const r of Ioe)e&&e[r]!==void 0&&(n[r]=Mn(e[r]));return t&&(n.params=e.params),n}class ua{constructor(t={},n={}){this.explicit=t,this.implicit=n}clone(){return new ua(oe(this.explicit),oe(this.implicit))}combine(){return{...this.explicit,...this.implicit}}get(t){return Ze(this.explicit[t],this.implicit[t])}getWithExplicit(t){return this.explicit[t]!==void 0?{explicit:!0,value:this.explicit[t]}:this.implicit[t]!==void 0?{explicit:!1,value:this.implicit[t]}:{explicit:!1,value:void 0}}setWithExplicit(t,{value:n,explicit:r}){n!==void 0&&this.set(t,n,r)}set(t,n,r){return delete this[r?"implicit":"explicit"][t],this[r?"explicit":"implicit"][t]=n,this}copyKeyFromSplit(t,{explicit:n,implicit:r}){n[t]!==void 0?this.set(t,n[t],!0):r[t]!==void 0&&this.set(t,r[t],!1)}copyKeyFromObject(t,n){n[t]!==void 0&&this.set(t,n[t],!0)}copyAll(t){for(const n of B(t.combine())){const r=t.getWithExplicit(n);this.setWithExplicit(n,r)}}}function Hr(e){return{explicit:!0,value:e}}function kn(e){return{explicit:!1,value:e}}function rN(e){return(t,n,r,i)=>{const a=e(t.value,n.value);return a>0?t:a<0?n:Pp(t,n,r,i)}}function Pp(e,t,n,r){return e.explicit&&t.explicit&&U(yie(n,r,e.value,t.value)),e}function Va(e,t,n,r,i=Pp){return e===void 0||e.value===void 0?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:Dn(e.value,t.value)?e:i(e,t,n,r)}class zoe extends ua{constructor(t={},n={},r=!1){super(t,n),this.explicit=t,this.implicit=n,this.parseNothing=r}clone(){const t=super.clone();return t.parseNothing=this.parseNothing,t}}function Xu(e){return"url"in e}function ff(e){return"values"in e}function iN(e){return"name"in e&&!Xu(e)&&!ff(e)&&!Da(e)}function Da(e){return e&&(aN(e)||sN(e)||B6(e))}function aN(e){return"sequence"in e}function sN(e){return"sphere"in e}function B6(e){return"graticule"in e}var ze;(function(e){e[e.Raw=0]="Raw",e[e.Main=1]="Main",e[e.Row=2]="Row",e[e.Column=3]="Column",e[e.Lookup=4]="Lookup"})(ze||(ze={}));function oN(e){const{signals:t,hasLegend:n,index:r,...i}=e;return i.field=ir(i.field),i}function bo(e,t=!0,n=Wt){if(P(e)){const r=e.map(i=>bo(i,t,n));return t?`[${r.join(", ")}]`:r}else if(Do(e))return n(t?ho(e):qie(e));return t?n(Re(e)):e}function Boe(e,t){for(const n of kt(e.component.selection??{})){const r=n.name;let i=`${r}${Ja}, ${n.resolve==="global"?"true":`{unit: ${Vs(e)}}`}`;for(const a of Up)a.defined(n)&&(a.signals&&(t=a.signals(e,n,t)),a.modifyExpr&&(i=a.modifyExpr(e,n,i)));t.push({name:r+yue,on:[{events:{signal:n.name+Ja},update:`modify(${H(n.name+yo)}, ${i})`}]})}return U6(t)}function Uoe(e,t){if(e.component.selection&&B(e.component.selection).length){const n=H(e.getName("cell"));t.unshift({name:"facet",value:{},on:[{events:as("pointermove","scope"),update:`isTuple(facet) ? facet : group(${n}).datum`}]})}return U6(t)}function joe(e,t){let n=!1;for(const r of kt(e.component.selection??{})){const i=r.name,a=H(i+yo);if(t.filter(o=>o.name===i).length===0){const o=r.resolve==="global"?"union":r.resolve,u=r.type==="point"?", true, true)":")";t.push({name:r.name,update:`${$N}(${a}, ${H(o)}${u}`})}n=!0;for(const o of Up)o.defined(r)&&o.topLevelSignals&&(t=o.topLevelSignals(e,r,t))}return n&&t.filter(i=>i.name==="unit").length===0&&t.unshift({name:"unit",value:{},on:[{events:"pointermove",update:"isTuple(group()) ? group() : unit"}]}),U6(t)}function qoe(e,t){const n=[...t],r=Vs(e,{escape:!1});for(const i of kt(e.component.selection??{})){const a={name:i.name+yo};if(i.project.hasSelectionId&&(a.transform=[{type:"collect",sort:{field:Mr}}]),i.init){const o=i.project.items.map(oN);a.values=i.project.hasSelectionId?i.init.map(u=>({unit:r,[Mr]:bo(u,!1)[0]})):i.init.map(u=>({unit:r,fields:o,values:bo(u,!1)}))}n.filter(o=>o.name===i.name+yo).length||n.push(a)}return n}function uN(e,t){for(const n of kt(e.component.selection??{}))for(const r of Up)r.defined(n)&&r.marks&&(t=r.marks(e,n,t));return t}function Woe(e,t){for(const n of e.children)Ve(n)&&(t=uN(n,t));return t}function Hoe(e,t,n,r){const i=MN(e,t.param,t);return{signal:Un(n.get("type"))&&P(r)&&r[0]>r[1]?`isValid(${i}) && reverse(${i})`:i}}function U6(e){return e.map(t=>(t.on&&!t.on.length&&delete t.on,t))}class De{constructor(t,n){this.debugName=n,this._children=[],this._parent=null,t&&(this.parent=t)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(t){this._parent=t,t&&t.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(t,n){if(this._children.includes(t)){U(Gre);return}n!==void 0?this._children.splice(n,0,t):this._children.push(t)}removeChild(t){const n=this._children.indexOf(t);return this._children.splice(n,1),n}remove(){let t=this._parent.removeChild(this);for(const n of this._children)n._parent=this._parent,this._parent.addChild(n,t++)}insertAsParentOf(t){const n=t.parent;n.removeChild(this),this.parent=n,t.parent=this}swapWithParent(){const t=this._parent,n=t.parent;for(const i of this._children)i.parent=t;this._children=[],t.removeChild(this);const r=t.parent.removeChild(t);this._parent=n,n.addChild(this,r),t.parent=this}}class an extends De{clone(){const t=new this.constructor;return t.debugName=`clone_${this.debugName}`,t._source=this._source,t._name=`clone_${this._name}`,t.type=this.type,t.refCounts=this.refCounts,t.refCounts[t._name]=0,t}constructor(t,n,r,i){super(t,n),this.type=r,this.refCounts=i,this._source=this._name=n,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}dependentFields(){return new Set}producedFields(){return new Set}hash(){return this._hash===void 0&&(this._hash=`Output ${iM()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(t){this._source=t}}function pm(e){return e.as!==void 0}function Lx(e){return`${e}_end`}class ti extends De{clone(){return new ti(null,oe(this.timeUnits))}constructor(t,n){super(t),this.timeUnits=n}static makeFromEncoding(t,n){const r=n.reduceFieldDef((i,a,s)=>{const{field:o,timeUnit:u}=a;if(u){let c;if(Oo(u)){if(Ve(n)){const{mark:l,markDef:f,config:d}=n,h=Xa({fieldDef:a,markDef:f,config:d});(lf(l)||h)&&(c={timeUnit:yt(u),field:o})}}else c={as:G(a,{forAs:!0}),field:o,timeUnit:u};if(Ve(n)){const{mark:l,markDef:f,config:d}=n,h=Xa({fieldDef:a,markDef:f,config:d});lf(l)&&et(s)&&h!==.5&&(c.rectBandPosition=h)}c&&(i[be(c)]=c)}return i},{});return Oe(r)?null:new ti(t,r)}static makeFromTransform(t,n){const{timeUnit:r,...i}={...n},a=yt(r),s={...i,timeUnit:a};return new ti(t,{[be(s)]:s})}merge(t){this.timeUnits={...this.timeUnits};for(const n in t.timeUnits)this.timeUnits[n]||(this.timeUnits[n]=t.timeUnits[n]);for(const n of t.children)t.removeChild(n),n.parent=this;t.remove()}removeFormulas(t){const n={};for(const[r,i]of Ga(this.timeUnits)){const a=pm(i)?i.as:`${i.field}_end`;t.has(a)||(n[r]=i)}this.timeUnits=n}producedFields(){return new Set(kt(this.timeUnits).map(t=>pm(t)?t.as:Lx(t.field)))}dependentFields(){return new Set(kt(this.timeUnits).map(t=>t.field))}hash(){return`TimeUnit ${be(this.timeUnits)}`}assemble(){const t=[];for(const n of kt(this.timeUnits)){const{rectBandPosition:r}=n,i=yt(n.timeUnit);if(pm(n)){const{field:a,as:s}=n,{unit:o,utc:u,...c}=i,l=[s,`${s}_end`];t.push({field:ir(a),type:"timeunit",...o?{units:wp(o)}:{},...u?{timezone:"utc"}:{},...c,as:l}),t.push(...Px(l,r,i))}else if(n){const{field:a}=n,s=a.replaceAll("\\.","."),o=cN({timeUnit:i,field:s}),u=Lx(s);t.push({type:"formula",expr:o,as:u}),t.push(...Px([s,u],r,i))}}return t}}const Ip="offsetted_rect_start",zp="offsetted_rect_end";function cN({timeUnit:e,field:t,reverse:n}){const{unit:r,utc:i}=e,a=BM(r),{part:s,step:o}=WM(a,e.step);return`${i?"utcOffset":"timeOffset"}('${s}', datum['${t}'], ${n?-o:o})`}function Px([e,t],n,r){if(n!==void 0&&n!==.5){const i=`datum['${e}']`,a=`datum['${t}']`;return[{type:"formula",expr:Ix([cN({timeUnit:r,field:e,reverse:!0}),i],n+.5),as:`${e}_${Ip}`},{type:"formula",expr:Ix([i,a],n+.5),as:`${e}_${zp}`}]}return[]}function Ix([e,t],n){return`${1-n} * ${e} + ${n} * ${t}`}const nd="_tuple_fields";class Goe{constructor(...t){this.items=t,this.hasChannel={},this.hasField={},this.hasSelectionId=!1}}const Yoe={defined:()=>!0,parse:(e,t,n)=>{const r=t.name,i=t.project??(t.project=new Goe),a={},s={},o=new Set,u=(g,p)=>{const m=p==="visual"?g.channel:g.field;let b=We(`${r}_${m}`);for(let y=1;o.has(b);y++)b=We(`${r}_${m}_${y}`);return o.add(b),{[p]:b}},c=t.type,l=e.config.selection[c],f=n.value!==void 0?Y(n.value):null;let{fields:d,encodings:h}=V(n.select)?n.select:{};if(!d&&!h&&f){for(const g of f)if(V(g))for(const p of B(g))ore(p)?(h||(h=[])).push(p):c==="interval"?(U(jre),h=l.encodings):(d??(d=[])).push(p)}!d&&!h&&(h=l.encodings,"fields"in l&&(d=l.fields));for(const g of h??[]){const p=e.fieldDef(g);if(p){let m=p.field;if(p.aggregate){U(Dre(g,p.aggregate));continue}else if(!m){U(ux(g));continue}if(p.timeUnit&&!Oo(p.timeUnit)){m=e.vgField(g);const b={timeUnit:p.timeUnit,as:m,field:p.field};s[be(b)]=b}if(!a[m]){const b=c==="interval"&&sa(g)&&Un(e.getScaleComponent(g).get("type"))?"R":p.bin?"R-RE":"E",y={field:m,channel:g,type:b,index:i.items.length};y.signals={...u(y,"data"),...u(y,"visual")},i.items.push(a[m]=y),i.hasField[m]=a[m],i.hasSelectionId=i.hasSelectionId||m===Mr,lM(g)?(y.geoChannel=g,y.channel=cM(g),i.hasChannel[y.channel]=a[m]):i.hasChannel[g]=a[m]}}else U(ux(g))}for(const g of d??[]){if(i.hasField[g])continue;const p={type:"E",field:g,index:i.items.length};p.signals={...u(p,"data")},i.items.push(p),i.hasField[g]=p,i.hasSelectionId=i.hasSelectionId||g===Mr}f&&(t.init=f.map(g=>i.items.map(p=>V(g)?g[p.geoChannel||p.channel]!==void 0?g[p.geoChannel||p.channel]:g[p.field]:g))),Oe(s)||(i.timeUnit=new ti(null,s))},signals:(e,t,n)=>{const r=t.name+nd;return n.filter(a=>a.name===r).length>0||t.project.hasSelectionId?n:n.concat({name:r,value:t.project.items.map(oN)})}},Yi={defined:e=>e.type==="interval"&&e.resolve==="global"&&e.bind&&e.bind==="scales",parse:(e,t)=>{const n=t.scales=[];for(const r of t.project.items){const i=r.channel;if(!sa(i))continue;const a=e.getScaleComponent(i),s=a?a.get("type"):void 0;if(s=="sequential"&&U(Pre),!a||!Un(s)){U(Lre);continue}a.set("selectionExtent",{param:t.name,field:r.field},!0),n.push(r)}},topLevelSignals:(e,t,n)=>{const r=t.scales.filter(s=>n.filter(o=>o.name===s.signals.data).length===0);if(!e.parent||zx(e)||r.length===0)return n;const i=n.filter(s=>s.name===t.name)[0];let a=i.update;if(a.indexOf($N)>=0)i.update=`{${r.map(s=>`${H(ir(s.field))}: ${s.signals.data}`).join(", ")}}`;else{for(const s of r){const o=`${H(ir(s.field))}: ${s.signals.data}`;a.includes(o)||(a=`${a.substring(0,a.length-1)}, ${o}}`)}i.update=a}return n.concat(r.map(s=>({name:s.signals.data})))},signals:(e,t,n)=>{if(e.parent&&!zx(e))for(const r of t.scales){const i=n.find(a=>a.name===r.signals.data);i.push="outer",delete i.value,delete i.update}return n}};function Ty(e,t){return`domain(${H(e.scaleName(t))})`}function zx(e){return e.parent&&wc(e.parent)&&!e.parent.parent}const mu="_brush",lN="_scale_trigger",Wc="geo_interval_init_tick",fN="_init",Xoe="_center",Voe={defined:e=>e.type==="interval",parse:(e,t,n)=>{var r;if(e.hasProjection){const i={...V(n.select)?n.select:{}};i.fields=[Mr],i.encodings||(i.encodings=n.value?B(n.value):[Pr,Lr]),n.select={type:"interval",...i}}if(t.translate&&!Yi.defined(t)){const i=`!event.item || event.item.mark.name !== ${H(t.name+mu)}`;for(const a of t.events){if(!a.between){U(`${a} is not an ordered event stream for interval selections.`);continue}const s=Y((r=a.between[0]).filter??(r.filter=[]));s.indexOf(i)<0&&s.push(i)}}},signals:(e,t,n)=>{const r=t.name,i=r+Ja,a=kt(t.project.hasChannel).filter(o=>o.channel===He||o.channel===_t),s=t.init?t.init[0]:null;if(n.push(...a.reduce((o,u)=>o.concat(Koe(e,t,u,s&&s[u.index])),[])),e.hasProjection){const o=H(e.projectionName()),u=e.projectionName()+Xoe,{x:c,y:l}=t.project.hasChannel,f=c&&c.signals.visual,d=l&&l.signals.visual,h=c?s&&s[c.index]:`${u}[0]`,g=l?s&&s[l.index]:`${u}[1]`,p=_=>e.getSizeSignalRef(_).signal,m=`[[${f?f+"[0]":"0"}, ${d?d+"[0]":"0"}],[${f?f+"[1]":p("width")}, ${d?d+"[1]":p("height")}]]`;s&&(n.unshift({name:r+fN,init:`[scale(${o}, [${c?h[0]:h}, ${l?g[0]:g}]), scale(${o}, [${c?h[1]:h}, ${l?g[1]:g}])]`}),(!c||!l)&&(n.find(E=>E.name===u)||n.unshift({name:u,update:`invert(${o}, [${p("width")}/2, ${p("height")}/2])`})));const b=`intersect(${m}, {markname: ${H(e.getName("marks"))}}, unit.mark)`,y=`{unit: ${Vs(e)}}`,v=`vlSelectionTuples(${b}, ${y})`,x=a.map(_=>_.signals.visual);return n.concat({name:i,on:[{events:[...x.length?[{signal:x.join(" || ")}]:[],...s?[{signal:Wc}]:[]],update:v}]})}else{if(!Yi.defined(t)){const c=r+lN,l=a.map(f=>{const d=f.channel,{data:h,visual:g}=f.signals,p=H(e.scaleName(d)),m=e.getScaleComponent(d).get("type"),b=Un(m)?"+":"";return`(!isArray(${h}) || (${b}invert(${p}, ${g})[0] === ${b}${h}[0] && ${b}invert(${p}, ${g})[1] === ${b}${h}[1]))`});l.length&&n.push({name:c,value:{},on:[{events:a.map(f=>({scale:e.scaleName(f.channel)})),update:l.join(" && ")+` ? ${c} : {}`}]})}const o=a.map(c=>c.signals.data),u=`unit: ${Vs(e)}, fields: ${r+nd}, values`;return n.concat({name:i,...s?{init:`{${u}: ${bo(s)}}`}:{},...o.length?{on:[{events:[{signal:o.join(" || ")}],update:`${o.join(" && ")} ? {${u}: [${o}]} : null`}]}:{}})}},topLevelSignals:(e,t,n)=>(Ve(e)&&e.hasProjection&&t.init&&(n.filter(i=>i.name===Wc).length||n.unshift({name:Wc,value:null,on:[{events:"timer{1}",update:`${Wc} === null ? {} : ${Wc}`}]})),n),marks:(e,t,n)=>{const r=t.name,{x:i,y:a}=t.project.hasChannel,s=i==null?void 0:i.signals.visual,o=a==null?void 0:a.signals.visual,u=`data(${H(t.name+yo)})`;if(Yi.defined(t)||!i&&!a)return n;const c={x:i!==void 0?{signal:`${s}[0]`}:{value:0},y:a!==void 0?{signal:`${o}[0]`}:{value:0},x2:i!==void 0?{signal:`${s}[1]`}:{field:{group:"width"}},y2:a!==void 0?{signal:`${o}[1]`}:{field:{group:"height"}}};if(t.resolve==="global")for(const m of B(c))c[m]=[{test:`${u}.length && ${u}[0].unit === ${Vs(e)}`,...c[m]},{value:0}];const{fill:l,fillOpacity:f,cursor:d,...h}=t.mark,g=B(h).reduce((m,b)=>(m[b]=[{test:[i!==void 0&&`${s}[0] !== ${s}[1]`,a!==void 0&&`${o}[0] !== ${o}[1]`].filter(y=>y).join(" && "),value:h[b]},{value:null}],m),{}),p=d??(t.translate?"move":null);return[{name:`${r+mu}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:l},fillOpacity:{value:f}},update:c}},...n,{name:r+mu,type:"rect",clip:!0,encode:{enter:{...p?{cursor:{value:p}}:{},fill:{value:"transparent"}},update:{...c,...g}}}]}};function Koe(e,t,n,r){const i=!e.hasProjection,a=n.channel,s=n.signals.visual,o=H(i?e.scaleName(a):e.projectionName()),u=d=>`scale(${o}, ${d})`,c=e.getSizeSignalRef(a===He?"width":"height").signal,l=`${a}(unit)`,f=t.events.reduce((d,h)=>[...d,{events:h.between[0],update:`[${l}, ${l}]`},{events:h,update:`[${s}[0], clamp(${l}, 0, ${c})]`}],[]);if(i){const d=n.signals.data,h=Yi.defined(t),g=e.getScaleComponent(a),p=g?g.get("type"):void 0,m=r?{init:bo(r,!0,u)}:{value:[]};return f.push({events:{signal:t.name+lN},update:Un(p)?`[${u(`${d}[0]`)}, ${u(`${d}[1]`)}]`:"[0, 0]"}),h?[{name:d,on:[]}]:[{name:s,...m,on:f},{name:d,...r?{init:bo(r)}:{},on:[{events:{signal:s},update:`${s}[0] === ${s}[1] ? null : invert(${o}, ${s})`}]}]}else{const d=a===He?0:1,h=t.name+fN,g=r?{init:`[${h}[0][${d}], ${h}[1][${d}]]`}:{value:[]};return[{name:s,...g,on:f}]}}const Joe={defined:e=>e.type==="point",signals:(e,t,n)=>{const r=t.name,i=r+nd,a=t.project,s="(item().isVoronoi ? datum.datum : datum)",o=kt(e.component.selection??{}).reduce((f,d)=>d.type==="interval"?f.concat(d.name+mu):f,[]).map(f=>`indexof(item().mark.name, '${f}') < 0`).join(" && "),u=`datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0${o?` && ${o}`:""}`;let c=`unit: ${Vs(e)}, `;if(t.project.hasSelectionId)c+=`${Mr}: ${s}[${H(Mr)}]`;else{const f=a.items.map(d=>{const h=e.fieldDef(d.channel);return h!=null&&h.bin?`[${s}[${H(e.vgField(d.channel,{}))}], ${s}[${H(e.vgField(d.channel,{binSuffix:"end"}))}]]`:`${s}[${H(d.field)}]`}).join(", ");c+=`fields: ${i}, values: [${f}]`}const l=t.events;return n.concat([{name:r+Ja,on:l?[{events:l,update:`${u} ? {${c}} : null`,force:!0}]:[]}])}};function yc(e,t,n,r){const i=Fp(t)&&t.condition,a=r(t);if(i){const o=Y(i).map(u=>{const c=r(u);if(Uae(u)){const{param:l,empty:f}=u;return{test:FN(e,{param:l,empty:f}),...c}}else return{test:G0(e,u.test),...c}});return{[n]:[...o,...a!==void 0?[a]:[]]}}else return a!==void 0?{[n]:a}:{}}function j6(e,t="text"){const n=e.encoding[t];return yc(e,n,t,r=>Bp(r,e.config))}function Bp(e,t,n="datum"){if(e){if(Fr(e))return je(e.value);if(ue(e)){const{format:r,formatType:i}=z0(e);return _6({fieldOrDatumDef:e,format:r,formatType:i,expr:n,config:t})}}}function dN(e,t={}){const{encoding:n,markDef:r,config:i,stack:a}=e,s=n.tooltip;if(P(s))return{tooltip:Bx({tooltip:s},a,i,t)};{const o=t.reactiveGeom?"datum.datum":"datum";return yc(e,s,"tooltip",u=>{const c=Bp(u,i,o);if(c)return c;if(u===null)return;let l=Fe("tooltip",r,i);if(l===!0&&(l={content:"encoding"}),X(l))return{value:l};if(V(l))return Q(l)?l:l.content==="encoding"?Bx(n,a,i,t):{signal:o}})}}function hN(e,t,n,{reactiveGeom:r}={}){const i={...n,...n.tooltipFormat},a={},s=r?"datum.datum":"datum",o=[];function u(l,f){const d=To(f),h=un(l)?l:{...l,type:e[d].type},g=h.title||$6(h,i),p=Y(g).join(", ").replaceAll(/"/g,'\\"');let m;if(et(f)){const b=f==="x"?"x2":"y2",y=li(e[b]);if(Et(h.bin)&&y){const v=G(h,{expr:s}),x=G(y,{expr:s}),{format:_,formatType:E}=z0(h);m=Jf(v,x,_,E,i),a[b]=!0}}if((et(f)||f===or||f===Rr)&&t&&t.fieldChannel===f&&t.offset==="normalize"){const{format:b,formatType:y}=z0(h);m=_6({fieldOrDatumDef:h,format:b,formatType:y,expr:s,config:i,normalizeStack:!0}).signal}m??(m=Bp(h,i,s).signal),o.push({channel:f,key:p,value:m})}C6(e,(l,f)=>{j(l)?u(l,f):Mp(l)&&u(l.condition,f)});const c={};for(const{channel:l,key:f,value:d}of o)!a[l]&&!c[f]&&(c[f]=d);return c}function Bx(e,t,n,{reactiveGeom:r}={}){const i=hN(e,t,n,{reactiveGeom:r}),a=Ga(i).map(([s,o])=>`"${s}": ${o}`);return a.length>0?{signal:`{${a.join(", ")}}`}:void 0}function Qoe(e){const{markDef:t,config:n}=e,r=Fe("aria",t,n);return r===!1?{}:{...r?{aria:r}:{},...Zoe(e),...eue(e)}}function Zoe(e){const{mark:t,markDef:n,config:r}=e;if(r.aria===!1)return{};const i=Fe("ariaRoleDescription",n,r);return i!=null?{ariaRoleDescription:{value:i}}:t in Fre?{}:{ariaRoleDescription:{value:t}}}function eue(e){const{encoding:t,markDef:n,config:r,stack:i}=e,a=t.description;if(a)return yc(e,a,"description",u=>Bp(u,e.config));const s=Fe("description",n,r);if(s!=null)return{description:je(s)};if(r.aria===!1)return{};const o=hN(t,i,r);if(!Oe(o))return{description:{signal:Ga(o).map(([u,c],l)=>`"${l>0?"; ":""}${u}: " + (${c})`).join(" + ")}}}function dt(e,t,n={}){const{markDef:r,encoding:i,config:a}=t,{vgChannel:s}=n;let{defaultRef:o,defaultValue:u}=n;o===void 0&&(u??(u=Fe(e,r,a,{vgChannel:s,ignoreVgConfig:!0})),u!==void 0&&(o=je(u)));const c=i[e];return yc(t,c,s??e,l=>x6({channel:e,channelDef:l,markDef:r,config:a,scaleName:t.scaleName(e),scale:t.getScaleComponent(e),stack:null,defaultRef:o}))}function gN(e,t={filled:void 0}){const{markDef:n,encoding:r,config:i}=e,{type:a}=n,s=t.filled??Fe("filled",n,i),o=ye(["bar","point","circle","square","geoshape"],a)?"transparent":void 0,u=Fe(s===!0?"color":void 0,n,i,{vgChannel:"fill"})??i.mark[s===!0&&"color"]??o,c=Fe(s===!1?"color":void 0,n,i,{vgChannel:"stroke"})??i.mark[s===!1&&"color"],l=s?"fill":"stroke",f={...u?{fill:je(u)}:{},...c?{stroke:je(c)}:{}};return n.color&&(s?n.fill:n.stroke)&&U(TM("property",{fill:"fill"in n,stroke:"stroke"in n})),{...f,...dt("color",e,{vgChannel:l,defaultValue:s?u:c}),...dt("fill",e,{defaultValue:r.fill?u:void 0}),...dt("stroke",e,{defaultValue:r.stroke?c:void 0})}}function tue(e){const{encoding:t,mark:n}=e,r=t.order;return!hs(n)&&Fr(r)?yc(e,r,"zindex",i=>je(i.value)):{}}function Vu({channel:e,markDef:t,encoding:n={},model:r,bandPosition:i}){const a=`${e}Offset`,s=t[a],o=n[a];if((a==="xOffset"||a==="yOffset")&&o)return{offsetType:"encoding",offset:x6({channel:a,channelDef:o,markDef:t,config:r==null?void 0:r.config,scaleName:r.scaleName(a),scale:r.getScaleComponent(a),stack:null,defaultRef:je(s),bandPosition:i})};const u=t[a];return u?{offsetType:"visual",offset:u}:{}}function It(e,t,{defaultPos:n,vgChannel:r}){const{encoding:i,markDef:a,config:s,stack:o}=t,u=i[e],c=i[_i(e)],l=t.scaleName(e),f=t.getScaleComponent(e),{offset:d,offsetType:h}=Vu({channel:e,markDef:a,encoding:i,model:t,bandPosition:.5}),g=q6({model:t,defaultPos:n,channel:e,scaleName:l,scale:f}),p=!u&&et(e)&&(i.latitude||i.longitude)?{field:t.getName(e)}:nue({channel:e,channelDef:u,channel2Def:c,markDef:a,config:s,scaleName:l,scale:f,stack:o,offset:d,defaultRef:g,bandPosition:h==="encoding"?0:void 0});return p?{[r||e]:p}:void 0}function nue(e){const{channel:t,channelDef:n,scaleName:r,stack:i,offset:a,markDef:s}=e;if(ue(n)&&i&&t===i.fieldChannel){if(j(n)){let o=n.bandPosition;if(o===void 0&&s.type==="text"&&(t==="radius"||t==="theta")&&(o=.5),o!==void 0)return L0({scaleName:r,fieldOrDatumDef:n,startSuffix:"start",bandPosition:o,offset:a})}return Ys(n,r,{suffix:"end"},{offset:a})}return y6(e)}function q6({model:e,defaultPos:t,channel:n,scaleName:r,scale:i}){const{markDef:a,config:s}=e;return()=>{const o=To(n),u=Ya(n),c=Fe(n,a,s,{vgChannel:u});if(c!==void 0)return Nl(n,c);switch(t){case"zeroOrMin":case"zeroOrMax":if(r){const l=i.get("type");if(!ye([yn.LOG,yn.TIME,yn.UTC],l)){if(i.domainDefinitelyIncludesZero())return{scale:r,value:0}}}if(t==="zeroOrMin")return o==="y"?{field:{group:"height"}}:{value:0};switch(o){case"radius":return{signal:`min(${e.width.signal},${e.height.signal})/2`};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":return{...e[Sn(n)],mult:.5}}}}const rue={left:"x",center:"xc",right:"x2"},iue={top:"y",middle:"yc",bottom:"y2"};function pN(e,t,n,r="middle"){if(e==="radius"||e==="theta")return Ya(e);const i=e==="x"?"align":"baseline",a=Fe(i,t,n);let s;return Q(a)?(U(oie(i)),s=void 0):s=a,e==="x"?rue[s||(r==="top"?"left":"center")]:iue[s||r]}function W0(e,t,{defaultPos:n,defaultPos2:r,range:i}){return i?mN(e,t,{defaultPos:n,defaultPos2:r}):It(e,t,{defaultPos:n})}function mN(e,t,{defaultPos:n,defaultPos2:r}){const{markDef:i,config:a}=t,s=_i(e),o=Sn(e),u=aue(t,r,s),c=u[o]?pN(e,i,a):Ya(e);return{...It(e,t,{defaultPos:n,vgChannel:c}),...u}}function aue(e,t,n){const{encoding:r,mark:i,markDef:a,stack:s,config:o}=e,u=To(n),c=Sn(n),l=Ya(n),f=r[u],d=e.scaleName(u),h=e.getScaleComponent(u),{offset:g}=n in r||n in a?Vu({channel:n,markDef:a,encoding:r,model:e}):Vu({channel:u,markDef:a,encoding:r,model:e});if(!f&&(n==="x2"||n==="y2")&&(r.latitude||r.longitude)){const m=Sn(n),b=e.markDef[m];return b!=null?{[m]:{value:b}}:{[l]:{field:e.getName(n)}}}const p=sue({channel:n,channelDef:f,channel2Def:r[n],markDef:a,config:o,scaleName:d,scale:h,stack:s,offset:g,defaultRef:void 0});return p!==void 0?{[l]:p}:Rd(n,a)||Rd(n,{[n]:D0(n,a,o.style),[c]:D0(c,a,o.style)})||Rd(n,o[i])||Rd(n,o.mark)||{[l]:q6({model:e,defaultPos:t,channel:n,scaleName:d,scale:h})()}}function sue({channel:e,channelDef:t,channel2Def:n,markDef:r,config:i,scaleName:a,scale:s,stack:o,offset:u,defaultRef:c}){return ue(t)&&o&&e.charAt(0)===o.fieldChannel.charAt(0)?Ys(t,a,{suffix:"start"},{offset:u}):y6({channel:e,channelDef:n,scaleName:a,scale:s,stack:o,markDef:r,config:i,offset:u,defaultRef:c})}function Rd(e,t){const n=Sn(e),r=Ya(e);if(t[r]!==void 0)return{[r]:Nl(e,t[r])};if(t[e]!==void 0)return{[r]:Nl(e,t[e])};if(t[n]){const i=t[n];if(po(i))U(tie(n));else return{[n]:Nl(e,i)}}}function Ka(e,t){const{config:n,encoding:r,markDef:i}=e,a=i.type,s=_i(t),o=Sn(t),u=r[t],c=r[s],l=e.getScaleComponent(t),f=l?l.get("type"):void 0,d=i.orient,h=r[o]??r.size??Fe("size",i,n,{vgChannel:o}),g=gM(t),p=a==="bar"&&(t==="x"?d==="vertical":d==="horizontal");return j(u)&&(Be(u.bin)||Et(u.bin)||u.timeUnit&&!c)&&!(h&&!po(h))&&!r[g]&&!vt(f)?cue({fieldDef:u,fieldDef2:c,channel:t,model:e}):(ue(u)&&vt(f)||p)&&!c?uue(u,t,e):mN(t,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"})}function oue(e,t,n,r,i,a,s){if(po(i))if(n){const u=n.get("type");if(u==="band"){let c=`bandwidth('${t}')`;i.band!==1&&(c=`${i.band} * ${c}`);const l=Zi("minBandSize",{type:s},r);return{signal:l?`max(${_r(l)}, ${c})`:c}}else i.band!==1&&(U(fie(u)),i=void 0)}else return{mult:i.band,field:{group:e}};else{if(Q(i))return i;if(i)return{value:i}}if(n){const u=n.get("range");if(ds(u)&&we(u.step))return{value:u.step-2}}if(!a){const{bandPaddingInner:u,barBandPaddingInner:c,rectBandPaddingInner:l}=r.scale,f=Ze(u,s==="bar"?c:l);if(Q(f))return{signal:`(1 - (${f.signal})) * ${e}`};if(we(f))return{signal:`${1-f} * ${e}`}}return{value:j0(r.view,e)-2}}function uue(e,t,n){var $,F;const{markDef:r,encoding:i,config:a,stack:s}=n,o=r.orient,u=n.scaleName(t),c=n.getScaleComponent(t),l=Sn(t),f=_i(t),d=gM(t),h=n.scaleName(d),g=n.getScaleComponent(V7(t)),p=o==="horizontal"&&t==="y"||o==="vertical"&&t==="x";let m;(i.size||r.size)&&(p?m=dt("size",n,{vgChannel:l,defaultRef:je(r.size)}):U(pie(r.type)));const b=!!m,y=dT({channel:t,fieldDef:e,markDef:r,config:a,scaleType:($=c||g)==null?void 0:$.get("type"),useVlSizeChannel:p});m=m||{[l]:oue(l,h||u,g||c,a,y,!!e,r.type)};const v=((F=c||g)==null?void 0:F.get("type"))==="band"&&po(y)&&!b?"top":"middle",x=pN(t,r,a,v),_=x==="xc"||x==="yc",{offset:E,offsetType:w}=Vu({channel:t,markDef:r,encoding:i,model:n,bandPosition:_?.5:0}),S=y6({channel:t,channelDef:e,markDef:r,config:a,scaleName:u,scale:c,stack:s,offset:E,defaultRef:q6({model:n,defaultPos:"mid",channel:t,scaleName:u,scale:c}),bandPosition:_?w==="encoding"?0:.5:Q(y)?{signal:`(1-${y})/2`}:po(y)?(1-y.band)/2:0});if(l)return{[x]:S,...m};{const k=Ya(f),D=m[l],A=E?{...D,offset:E}:D;return{[x]:S,[k]:P(S)?[S[0],{...S[1],offset:A}]:{...S,offset:A}}}}function Ux(e,t,n,r,i,a,s){if(uM(e))return 0;const o=e==="x"||e==="y2",u=o?-t/2:t/2;if(Q(n)||Q(i)||Q(r)||a){const c=_r(n),l=_r(i),f=_r(r),d=_r(a),g=a?`(${s} < ${d} ? ${o?"":"-"}0.5 * (${d} - (${s})) : ${u})`:u,p=f?`${f} + `:"",m=c?`(${c} ? -1 : 1) * `:"",b=l?`(${l} + ${g})`:g;return{signal:p+m+b}}else return i=i||0,r+(n?-i-u:+i+u)}function cue({fieldDef:e,fieldDef2:t,channel:n,model:r}){var F;const{config:i,markDef:a,encoding:s}=r,o=r.getScaleComponent(n),u=r.scaleName(n),c=o?o.get("type"):void 0,l=o.get("reverse"),f=dT({channel:n,fieldDef:e,markDef:a,config:i,scaleType:c}),d=(F=r.component.axes[n])==null?void 0:F[0],h=(d==null?void 0:d.get("translate"))??.5,g=et(n)?Fe("binSpacing",a,i)??0:0,p=_i(n),m=Ya(n),b=Ya(p),y=Zi("minBandSize",a,i),{offset:v}=Vu({channel:n,markDef:a,encoding:s,model:r,bandPosition:0}),{offset:x}=Vu({channel:p,markDef:a,encoding:s,model:r,bandPosition:0}),_=Lae({fieldDef:e,scaleName:u}),E=Ux(n,g,l,h,v,y,_),w=Ux(p,g,l,h,x??v,y,_),S=Q(f)?{signal:`(1-${f.signal})/2`}:po(f)?(1-f.band)/2:.5,$=Xa({fieldDef:e,fieldDef2:t,markDef:a,config:i});if(Be(e.bin)||e.timeUnit){const k=e.timeUnit&&$!==.5;return{[b]:jx({fieldDef:e,scaleName:u,bandPosition:S,offset:w,useRectOffsetField:k}),[m]:jx({fieldDef:e,scaleName:u,bandPosition:Q(S)?{signal:`1-${S.signal}`}:1-S,offset:E,useRectOffsetField:k})}}else if(Et(e.bin)){const k=Ys(e,u,{},{offset:w});if(j(t))return{[b]:k,[m]:Ys(t,u,{},{offset:E})};if(No(e.bin)&&e.bin.step)return{[b]:k,[m]:{signal:`scale("${u}", ${G(e,{expr:"datum"})} + ${e.bin.step})`,offset:E}}}U(OM(p))}function jx({fieldDef:e,scaleName:t,bandPosition:n,offset:r,useRectOffsetField:i}){return L0({scaleName:t,fieldOrDatumDef:e,bandPosition:n,offset:r,...i?{startSuffix:Ip,endSuffix:zp}:{}})}const lue=new Set(["aria","width","height"]);function ur(e,t){const{fill:n=void 0,stroke:r=void 0}=t.color==="include"?gN(e):{};return{...fue(e.markDef,t),...qx(e,"fill",n),...qx(e,"stroke",r),...dt("opacity",e),...dt("fillOpacity",e),...dt("strokeOpacity",e),...dt("strokeWidth",e),...dt("strokeDash",e),...tue(e),...dN(e),...j6(e,"href"),...Qoe(e)}}function qx(e,t,n){const{config:r,mark:i,markDef:a}=e;if(Fe("invalid",a,r)==="hide"&&n&&!hs(i)){const o=due(e,{invalid:!0,channels:vp});if(o)return{[t]:[{test:o,value:null},...Y(n)]}}return n?{[t]:n}:{}}function fue(e,t){return Cre.reduce((n,r)=>(!lue.has(r)&&e[r]!==void 0&&t[r]!=="ignore"&&(n[r]=je(e[r])),n),{})}function due(e,{invalid:t=!1,channels:n}){const r=n.reduce((a,s)=>{const o=e.getScaleComponent(s);if(o){const u=o.get("type"),c=e.vgField(s,{expr:"datum"});c&&Un(u)&&(a[c]=!0)}return a},{}),i=B(r);if(i.length>0){const a=t?"||":"&&";return i.map(s=>v6(s,t)).join(` ${a} `)}}function W6(e){const{config:t,markDef:n}=e;if(Fe("invalid",n,t)){const i=hue(e,{channels:wi});if(i)return{defined:{signal:i}}}return{}}function hue(e,{invalid:t=!1,channels:n}){const r=n.reduce((a,s)=>{var u;const o=e.getScaleComponent(s);if(o){const c=o.get("type"),l=e.vgField(s,{expr:"datum",binSuffix:(u=e.stack)!=null&&u.impute?"mid":void 0});l&&Un(c)&&(a[l]=!0)}return a},{}),i=B(r);if(i.length>0){const a=t?"||":"&&";return i.map(s=>v6(s,t)).join(` ${a} `)}}function Wx(e,t){if(t!==void 0)return{[e]:je(t)}}const mm="voronoi",bN={defined:e=>e.type==="point"&&e.nearest,parse:(e,t)=>{if(t.events)for(const n of t.events)n.markname=e.getName(mm)},marks:(e,t,n)=>{const{x:r,y:i}=t.project.hasChannel,a=e.mark;if(hs(a))return U(Ore(a)),n;const s={name:e.getName(mm),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:{fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0},...dN(e,{reactiveGeom:!0})}},transform:[{type:"voronoi",x:{expr:r||!i?"datum.datum.x || 0":"0"},y:{expr:i||!r?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]};let o=0,u=!1;return n.forEach((c,l)=>{const f=c.name??"";f===e.component.mark[0].name?o=l:f.indexOf(mm)>=0&&(u=!0)}),u||n.splice(o+1,0,s),n}},yN={defined:e=>e.type==="point"&&e.resolve==="global"&&e.bind&&e.bind!=="scales"&&!O6(e.bind),parse:(e,t,n)=>AN(t,n),topLevelSignals:(e,t,n)=>{const r=t.name,i=t.project,a=t.bind,s=t.init&&t.init[0],o=bN.defined(t)?"(item().isVoronoi ? datum.datum : datum)":"datum";return i.items.forEach((u,c)=>{const l=We(`${r}_${u.field}`);n.filter(d=>d.name===l).length||n.unshift({name:l,...s?{init:bo(s[c])}:{value:null},on:t.events?[{events:t.events,update:`datum && item().mark.marktype !== 'group' ? ${o}[${H(u.field)}] : null`}]:[],bind:a[u.field]??a[u.channel]??a})}),n},signals:(e,t,n)=>{const r=t.name,i=t.project,a=n.filter(c=>c.name===r+Ja)[0],s=r+nd,o=i.items.map(c=>We(`${r}_${c.field}`)),u=o.map(c=>`${c} !== null`).join(" && ");return o.length&&(a.update=`${u} ? {fields: ${s}, values: [${o.join(", ")}]} : null`),delete a.value,delete a.on,n}},H0="_toggle",vN={defined:e=>e.type==="point"&&!!e.toggle,signals:(e,t,n)=>n.concat({name:t.name+H0,value:!1,on:[{events:t.events,update:t.toggle}]}),modifyExpr:(e,t)=>{const n=t.name+Ja,r=t.name+H0;return`${r} ? null : ${n}, `+(t.resolve==="global"?`${r} ? null : true, `:`${r} ? null : {unit: ${Vs(e)}}, `)+`${r} ? ${n} : null`}},gue={defined:e=>e.clear!==void 0&&e.clear!==!1,parse:(e,t)=>{t.clear&&(t.clear=X(t.clear)?as(t.clear,"view"):t.clear)},topLevelSignals:(e,t,n)=>{if(yN.defined(t))for(const r of t.project.items){const i=n.findIndex(a=>a.name===We(`${t.name}_${r.field}`));i!==-1&&n[i].on.push({events:t.clear,update:"null"})}return n},signals:(e,t,n)=>{function r(i,a){i!==-1&&n[i].on&&n[i].on.push({events:t.clear,update:a})}if(t.type==="interval")for(const i of t.project.items){const a=n.findIndex(s=>s.name===i.signals.visual);if(r(a,"[0, 0]"),a===-1){const s=n.findIndex(o=>o.name===i.signals.data);r(s,"null")}}else{let i=n.findIndex(a=>a.name===t.name+Ja);r(i,"null"),vN.defined(t)&&(i=n.findIndex(a=>a.name===t.name+H0),r(i,"false"))}return n}},xN={defined:e=>{const t=e.resolve==="global"&&e.bind&&O6(e.bind),n=e.project.items.length===1&&e.project.items[0].field!==Mr;return t&&!n&&U(Ire),t&&n},parse:(e,t,n)=>{const r=oe(n);if(r.select=X(r.select)?{type:r.select,toggle:t.toggle}:{...r.select,toggle:t.toggle},AN(t,r),V(n.select)&&(n.select.on||n.select.clear)){const s='event.item && indexof(event.item.mark.role, "legend") < 0';for(const o of t.events)o.filter=Y(o.filter??[]),o.filter.includes(s)||o.filter.push(s)}const i=dm(t.bind)?t.bind.legend:"click",a=X(i)?as(i,"view"):Y(i);t.bind={legend:{merge:a}}},topLevelSignals:(e,t,n)=>{const r=t.name,i=dm(t.bind)&&t.bind.legend,a=s=>o=>{const u=oe(o);return u.markname=s,u};for(const s of t.project.items){if(!s.hasLegend)continue;const o=`${We(s.field)}_legend`,u=`${r}_${o}`;if(n.filter(l=>l.name===u).length===0){const l=i.merge.map(a(`${o}_symbols`)).concat(i.merge.map(a(`${o}_labels`))).concat(i.merge.map(a(`${o}_entries`)));n.unshift({name:u,...t.init?{}:{value:null},on:[{events:l,update:"isDefined(datum.value) ? datum.value : item().items[0].items[0].datum.value",force:!0},{events:i.merge,update:`!event.item || !datum ? null : ${u}`,force:!0}]})}}return n},signals:(e,t,n)=>{const r=t.name,i=t.project,a=n.find(d=>d.name===r+Ja),s=r+nd,o=i.items.filter(d=>d.hasLegend).map(d=>We(`${r}_${We(d.field)}_legend`)),c=`${o.map(d=>`${d} !== null`).join(" && ")} ? {fields: ${s}, values: [${o.join(", ")}]} : null`;t.events&&o.length>0?a.on.push({events:o.map(d=>({signal:d})),update:c}):o.length>0&&(a.update=c,delete a.value,delete a.on);const l=n.find(d=>d.name===r+H0),f=dm(t.bind)&&t.bind.legend;return l&&(t.events?l.on.push({...l.on[0],events:f}):l.on[0].events=f),n}};function pue(e,t,n){var i;const r=(i=e.fieldDef(t))==null?void 0:i.field;for(const a of kt(e.component.selection??{})){const s=a.project.hasField[r]??a.project.hasChannel[t];if(s&&xN.defined(a)){const o=n.get("selections")??[];o.push(a.name),n.set("selections",o,!1),s.hasLegend=!0}}}const _N="_translate_anchor",wN="_translate_delta",mue={defined:e=>e.type==="interval"&&e.translate,signals:(e,t,n)=>{const r=t.name,i=Yi.defined(t),a=r+_N,{x:s,y:o}=t.project.hasChannel;let u=as(t.translate,"scope");return i||(u=u.map(c=>(c.between[0].markname=r+mu,c))),n.push({name:a,value:{},on:[{events:u.map(c=>c.between[0]),update:"{x: x(unit), y: y(unit)"+(s!==void 0?`, extent_x: ${i?Ty(e,He):`slice(${s.signals.visual})`}`:"")+(o!==void 0?`, extent_y: ${i?Ty(e,_t):`slice(${o.signals.visual})`}`:"")+"}"}]},{name:r+wN,value:{},on:[{events:u,update:`{x: ${a}.x - x(unit), y: ${a}.y - y(unit)}`}]}),s!==void 0&&Hx(e,t,s,"width",n),o!==void 0&&Hx(e,t,o,"height",n),n}};function Hx(e,t,n,r,i){const a=t.name,s=a+_N,o=a+wN,u=n.channel,c=Yi.defined(t),l=i.filter(_=>_.name===n.signals[c?"data":"visual"])[0],f=e.getSizeSignalRef(r).signal,d=e.getScaleComponent(u),h=d&&d.get("type"),g=d&&d.get("reverse"),p=c?u===He?g?"":"-":g?"-":"":"",m=`${s}.extent_${u}`,b=`${p}${o}.${u} / ${c?`${f}`:`span(${m})`}`,y=!c||!d?"panLinear":h==="log"?"panLog":h==="symlog"?"panSymlog":h==="pow"?"panPow":"panLinear",v=c?h==="pow"?`, ${d.get("exponent")??1}`:h==="symlog"?`, ${d.get("constant")??1}`:"":"",x=`${y}(${m}, ${b}${v})`;l.on.push({events:{signal:o},update:c?x:`clampRange(${x}, 0, ${f})`})}const EN="_zoom_anchor",SN="_zoom_delta",bue={defined:e=>e.type==="interval"&&e.zoom,signals:(e,t,n)=>{const r=t.name,i=Yi.defined(t),a=r+SN,{x:s,y:o}=t.project.hasChannel,u=H(e.scaleName(He)),c=H(e.scaleName(_t));let l=as(t.zoom,"scope");return i||(l=l.map(f=>(f.markname=r+mu,f))),n.push({name:r+EN,on:[{events:l,update:i?"{"+[u?`x: invert(${u}, x(unit))`:"",c?`y: invert(${c}, y(unit))`:""].filter(f=>f).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:a,on:[{events:l,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),s!==void 0&&Gx(e,t,s,"width",n),o!==void 0&&Gx(e,t,o,"height",n),n}};function Gx(e,t,n,r,i){const a=t.name,s=n.channel,o=Yi.defined(t),u=i.filter(y=>y.name===n.signals[o?"data":"visual"])[0],c=e.getSizeSignalRef(r).signal,l=e.getScaleComponent(s),f=l&&l.get("type"),d=o?Ty(e,s):u.name,h=a+SN,g=`${a}${EN}.${s}`,p=!o||!l?"zoomLinear":f==="log"?"zoomLog":f==="symlog"?"zoomSymlog":f==="pow"?"zoomPow":"zoomLinear",m=o?f==="pow"?`, ${l.get("exponent")??1}`:f==="symlog"?`, ${l.get("constant")??1}`:"":"",b=`${p}(${d}, ${g}, ${h}${m})`;u.on.push({events:{signal:h},update:o?b:`clampRange(${b}, 0, ${c})`})}const yo="_store",Ja="_tuple",yue="_modify",$N="vlSelectionResolve",Up=[Joe,Voe,Yoe,vN,yN,Yi,xN,gue,mue,bue,bN];function vue(e){let t=e.parent;for(;t&&!Ln(t);)t=t.parent;return t}function Vs(e,{escape:t}={escape:!0}){let n=t?H(e.name):e.name;const r=vue(e);if(r){const{facet:i}=r;for(const a of Kn)i[a]&&(n+=` + '__facet_${a}_' + (facet[${H(r.vgField(a))}])`)}return n}function H6(e){return kt(e.component.selection??{}).reduce((t,n)=>t||n.project.hasSelectionId,!1)}function AN(e,t){(X(t.select)||!t.select.on)&&delete e.events,(X(t.select)||!t.select.clear)&&delete e.clear,(X(t.select)||!t.select.toggle)&&delete e.toggle}function Ny(e){const t=[];return e.type==="Identifier"?[e.name]:e.type==="Literal"?[e.value]:(e.type==="MemberExpression"&&(t.push(...Ny(e.object)),t.push(...Ny(e.property))),t)}function kN(e){return e.object.type==="MemberExpression"?kN(e.object):e.object.name==="datum"}function CN(e){const t=l7(e),n=new Set;return t.visit(r=>{r.type==="MemberExpression"&&kN(r)&&n.add(Ny(r).slice(1).join("."))}),n}class vc extends De{clone(){return new vc(null,this.model,oe(this.filter))}constructor(t,n,r){super(t),this.model=n,this.filter=r,this.expr=G0(this.model,this.filter,this),this._dependentFields=CN(this.expr)}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function xue(e,t){const n={},r=e.config.selection;if(!t||!t.length)return n;for(const i of t){const a=We(i.name),s=i.select,o=X(s)?s:s.type,u=V(s)?oe(s):{type:o},c=r[o];for(const d in c)d==="fields"||d==="encodings"||(d==="mark"&&(u[d]={...c[d],...u[d]}),(u[d]===void 0||u[d]===!0)&&(u[d]=oe(c[d]??u[d])));const l=n[a]={...u,name:a,type:o,init:i.value,bind:i.bind,events:X(u.on)?as(u.on,"scope"):Y(oe(u.on))},f=oe(i);for(const d of Up)d.defined(l)&&d.parse&&d.parse(e,l,f)}return n}function FN(e,t,n,r="datum"){const i=X(t)?t:t.param,a=We(i),s=H(a+yo);let o;try{o=e.getSelectionComponent(a,i)}catch{return`!!${a}`}if(o.project.timeUnit){const d=n??e.component.data.raw,h=o.project.timeUnit.clone();d.parent?h.insertAsParentOf(d):d.parent=h}const u=o.project.hasSelectionId?"vlSelectionIdTest(":"vlSelectionTest(",c=o.resolve==="global"?")":`, ${H(o.resolve)})`,l=`${u}${s}, ${r}${c}`,f=`length(data(${s}))`;return t.empty===!1?`${f} && ${l}`:`!${f} || ${l}`}function MN(e,t,n){const r=We(t),i=n.encoding;let a=n.field,s;try{s=e.getSelectionComponent(r,t)}catch{return r}if(!i&&!a)a=s.project.items[0].field,s.project.items.length>1&&U(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${H(a)}.`);else if(i&&!a){const o=s.project.items.filter(u=>u.channel===i);!o.length||o.length>1?(a=s.project.items[0].field,U((o.length?"Multiple ":"No ")+`matching ${H(i)} encoding found for selection ${H(n.param)}. Using "field": ${H(a)}.`)):a=o[0].field}return`${s.name}[${H(ir(a))}]`}function _ue(e,t){for(const[n,r]of Ga(e.component.selection??{})){const i=e.getName(`lookup_${n}`);e.component.data.outputNodes[i]=r.materialized=new an(new vc(t,e,{param:n}),i,ze.Lookup,e.component.data.outputNodeRefCounts)}}function G0(e,t,n){return Tl(t,r=>X(r)?r:Qie(r)?FN(e,r,n):GM(r))}function wue(e,t){if(e)return P(e)&&!ba(e)?e.map(n=>$6(n,t)).join(", "):e}function bm(e,t,n,r){var i,a;e.encode??(e.encode={}),(i=e.encode)[t]??(i[t]={}),(a=e.encode[t]).update??(a.update={}),e.encode[t].update[n]=r}function bl(e,t,n,r={header:!1}){var f,d;const{disable:i,orient:a,scale:s,labelExpr:o,title:u,zindex:c,...l}=e.combine();if(!i){for(const h in l){const g=tse[h],p=l[h];if(g&&g!==t&&g!=="both")delete l[h];else if(td(p)){const{condition:m,...b}=p,y=Y(m),v=xx[h];if(v){const{vgProp:x,part:_}=v,E=[...y.map(w=>{const{test:S,...$}=w;return{test:G0(null,S),...$}}),b];bm(l,_,x,E),delete l[h]}else if(v===null){const x={signal:y.map(_=>{const{test:E,...w}=_;return`${G0(null,E)} ? ${ix(w)} : `}).join("")+ix(b)};l[h]=x}}else if(Q(p)){const m=xx[h];if(m){const{vgProp:b,part:y}=m;bm(l,y,b,p),delete l[h]}}ye(["labelAlign","labelBaseline"],h)&&l[h]===null&&delete l[h]}if(t==="grid"){if(!l.grid)return;if(l.encode){const{grid:h}=l.encode;l.encode={...h?{grid:h}:{}},Oe(l.encode)&&delete l.encode}return{scale:s,orient:a,...l,domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:Ze(c,0)}}else{if(!r.header&&e.mainExtracted)return;if(o!==void 0){let g=o;(d=(f=l.encode)==null?void 0:f.labels)!=null&&d.update&&Q(l.encode.labels.update.text)&&(g=lo(o,"datum.label",l.encode.labels.update.text.signal)),bm(l,"labels","text",{signal:g})}if(l.labelAlign===null&&delete l.labelAlign,l.encode){for(const g of wT)e.hasAxisPart(g)||delete l.encode[g];Oe(l.encode)&&delete l.encode}const h=wue(u,n);return{scale:s,orient:a,grid:!1,...h?{title:h}:{},...l,...n.aria===!1?{aria:!1}:{},zindex:Ze(c,0)}}}}function TN(e){const{axes:t}=e.component,n=[];for(const r of wi)if(t[r]){for(const i of t[r])if(!i.get("disable")&&!i.get("gridScale")){const a=r==="x"?"height":"width",s=e.getSizeSignalRef(a).signal;a!==s&&n.push({name:a,update:s})}}return n}function Eue(e,t){const{x:n=[],y:r=[]}=e;return[...n.map(i=>bl(i,"grid",t)),...r.map(i=>bl(i,"grid",t)),...n.map(i=>bl(i,"main",t)),...r.map(i=>bl(i,"main",t))].filter(i=>i)}function Yx(e,t,n,r){return Object.assign.apply(null,[{},...e.map(i=>{if(i==="axisOrient"){const a=n==="x"?"bottom":"left",s=t[n==="x"?"axisBottom":"axisLeft"]||{},o=t[n==="x"?"axisTop":"axisRight"]||{},u=new Set([...B(s),...B(o)]),c={};for(const l of u.values())c[l]={signal:`${r.signal} === "${a}" ? ${_r(s[l])} : ${_r(o[l])}`};return c}return t[i]})])}function Sue(e,t,n,r){const i=t==="band"?["axisDiscrete","axisBand"]:t==="point"?["axisDiscrete","axisPoint"]:KM(t)?["axisQuantitative"]:t==="time"||t==="utc"?["axisTemporal"]:[],a=e==="x"?"axisX":"axisY",s=Q(n)?"axisOrient":`axis${Hf(n)}`,o=[...i,...i.map(c=>a+c.substr(4))],u=["axis",s,a];return{vlOnlyAxisConfig:Yx(o,r,e,n),vgAxisConfig:Yx(u,r,e,n),axisConfigStyle:$ue([...u,...o],r)}}function $ue(e,t){var r;const n=[{}];for(const i of e){let a=(r=t[i])==null?void 0:r.style;if(a){a=Y(a);for(const s of a)n.push(t.style[s])}}return Object.assign.apply(null,n)}function Dy(e,t,n,r={}){var a;const i=SM(e,n,t);if(i!==void 0)return{configFrom:"style",configValue:i};for(const s of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(((a=r[s])==null?void 0:a[e])!==void 0)return{configFrom:s,configValue:r[s][e]};return{}}const Xx={scale:({model:e,channel:t})=>e.scaleName(t),format:({format:e})=>e,formatType:({formatType:e})=>e,grid:({fieldOrDatumDef:e,axis:t,scaleType:n})=>t.grid??Aue(n,e),gridScale:({model:e,channel:t})=>kue(e,t),labelAlign:({axis:e,labelAngle:t,orient:n,channel:r})=>e.labelAlign||DN(t,n,r),labelAngle:({labelAngle:e})=>e,labelBaseline:({axis:e,labelAngle:t,orient:n,channel:r})=>e.labelBaseline||NN(t,n,r),labelFlush:({axis:e,fieldOrDatumDef:t,channel:n})=>e.labelFlush??Fue(t.type,n),labelOverlap:({axis:e,fieldOrDatumDef:t,scaleType:n})=>e.labelOverlap??Mue(t.type,n,j(t)&&!!t.timeUnit,j(t)?t.sort:void 0),orient:({orient:e})=>e,tickCount:({channel:e,model:t,axis:n,fieldOrDatumDef:r,scaleType:i})=>{const a=e==="x"?"width":e==="y"?"height":void 0,s=a?t.getSizeSignalRef(a):void 0;return n.tickCount??Nue({fieldOrDatumDef:r,scaleType:i,size:s,values:n.values})},tickMinStep:Due,title:({axis:e,model:t,channel:n})=>{if(e.title!==void 0)return e.title;const r=ON(t,n);if(r!==void 0)return r;const i=t.typedFieldDef(n),a=n==="x"?"x2":"y2",s=t.fieldDef(a);return AM(i?[yx(i)]:[],j(s)?[yx(s)]:[])},values:({axis:e,fieldOrDatumDef:t})=>Oue(e,t),zindex:({axis:e,fieldOrDatumDef:t,mark:n})=>e.zindex??Rue(n,t)};function Aue(e,t){return!vt(e)&&j(t)&&!Be(t==null?void 0:t.bin)&&!Et(t==null?void 0:t.bin)}function kue(e,t){const n=t==="x"?"y":"x";if(e.getScaleComponent(n))return e.scaleName(n)}function Cue(e,t,n,r,i){const a=t==null?void 0:t.labelAngle;if(a!==void 0)return Q(a)?a:cf(a);{const{configValue:s}=Dy("labelAngle",r,t==null?void 0:t.style,i);return s!==void 0?cf(s):n===He&&ye([g6,h6],e.type)&&!(j(e)&&e.timeUnit)?270:void 0}}function Oy(e){return`(((${e.signal} % 360) + 360) % 360)`}function NN(e,t,n,r){if(e!==void 0)if(n==="x"){if(Q(e)){const i=Oy(e),a=Q(t)?`(${t.signal} === "top")`:t==="top";return{signal:`(45 < ${i} && ${i} < 135) || (225 < ${i} && ${i} < 315) ? "middle" :(${i} <= 45 || 315 <= ${i}) === ${a} ? "bottom" : "top"`}}if(45{if(Ro(r)&&fT(r.sort)){const{field:a,timeUnit:s}=r,o=r.sort,u=o.map((c,l)=>`${GM({field:a,timeUnit:s,equal:c})} ? ${l} : `).join("")+o.length;t=new Ku(t,{calculate:u,as:Ju(r,i,{forAs:!0})})}}),t}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${be(this.transform)}`}}function Ju(e,t,n){return G(e,{prefix:t,suffix:"sort_index",...n})}function jp(e,t){return ye(["top","bottom"],t)?"column":ye(["left","right"],t)||e==="row"?"row":"column"}function Qu(e,t,n,r){const i=r==="row"?n.headerRow:r==="column"?n.headerColumn:n.headerFacet;return Ze((t||{})[e],i[e],n.header[e])}function qp(e,t,n,r){const i={};for(const a of e){const s=Qu(a,t||{},n,r);s!==void 0&&(i[a]=s)}return i}const G6=["row","column"],Y6=["header","footer"];function Lue(e,t){const n=e.component.layoutHeaders[t].title,r=e.config?e.config:void 0,i=e.component.layoutHeaders[t].facetFieldDef?e.component.layoutHeaders[t].facetFieldDef:void 0,{titleAnchor:a,titleAngle:s,titleOrient:o}=qp(["titleAnchor","titleAngle","titleOrient"],i.header,r,t),u=jp(t,o),c=cf(s);return{name:`${t}-title`,type:"group",role:`${u}-title`,title:{text:n,...t==="row"?{orient:"left"}:{},style:"guide-title",...LN(c,u),...RN(u,c,a),...PN(r,i,t,Ese,zT)}}}function RN(e,t,n="middle"){switch(n){case"start":return{align:"left"};case"end":return{align:"right"}}const r=DN(t,e==="row"?"left":"top",e==="row"?"y":"x");return r?{align:r}:{}}function LN(e,t){const n=NN(e,t==="row"?"left":"top",t==="row"?"y":"x",!0);return n?{baseline:n}:{}}function Pue(e,t){const n=e.component.layoutHeaders[t],r=[];for(const i of Y6)if(n[i])for(const a of n[i]){const s=zue(e,t,i,n,a);s!=null&&r.push(s)}return r}function Iue(e,t){const{sort:n}=e;return ei(n)?{field:G(n,{expr:"datum"}),order:n.order??"ascending"}:P(n)?{field:Ju(e,t,{expr:"datum"}),order:"ascending"}:{field:G(e,{expr:"datum"}),order:n??"ascending"}}function Ry(e,t,n){const{format:r,formatType:i,labelAngle:a,labelAnchor:s,labelOrient:o,labelExpr:u}=qp(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e.header,n,t),c=_6({fieldOrDatumDef:e,format:r,formatType:i,expr:"parent",config:n}).signal,l=jp(t,o);return{text:{signal:u?lo(lo(u,"datum.label",c),"datum.value",G(e,{expr:"parent"})):c},...t==="row"?{orient:"left"}:{},style:"guide-label",frame:"group",...LN(a,l),...RN(l,a,s),...PN(n,e,t,Sse,BT)}}function zue(e,t,n,r,i){if(i){let a=null;const{facetFieldDef:s}=r,o=e.config?e.config:void 0;if(s&&i.labels){const{labelOrient:f}=qp(["labelOrient"],s.header,o,t);(t==="row"&&!ye(["top","bottom"],f)||t==="column"&&!ye(["left","right"],f))&&(a=Ry(s,t,o))}const u=Ln(e)&&!Qf(e.facet),c=i.axes,l=(c==null?void 0:c.length)>0;if(a||l){const f=t==="row"?"height":"width";return{name:e.getName(`${t}_${n}`),type:"group",role:`${t}-${n}`,...r.facetFieldDef?{from:{data:e.getName(`${t}_domain`)},sort:Iue(s,t)}:{},...l&&u?{from:{data:e.getName(`facet_domain_${t}`)}}:{},...a?{title:a}:{},...i.sizeSignal?{encode:{update:{[f]:i.sizeSignal}}}:{},...l?{axes:c}:{}}}}return null}const Bue={column:{start:0,end:1},row:{start:1,end:0}};function Uue(e,t){return Bue[t][e]}function jue(e,t){const n={};for(const r of Kn){const i=e[r];if(i!=null&&i.facetFieldDef){const{titleAnchor:a,titleOrient:s}=qp(["titleAnchor","titleOrient"],i.facetFieldDef.header,t,r),o=jp(r,s),u=Uue(a,o);u!==void 0&&(n[o]=u)}}return Oe(n)?void 0:n}function PN(e,t,n,r,i){const a={};for(const s of r){if(!i[s])continue;const o=Qu(s,t==null?void 0:t.header,e,n);o!==void 0&&(a[i[s]]=o)}return a}function X6(e){return[...Ld(e,"width"),...Ld(e,"height"),...Ld(e,"childWidth"),...Ld(e,"childHeight")]}function Ld(e,t){const n=t==="width"?"x":"y",r=e.component.layoutSize.get(t);if(!r||r==="merged")return[];const i=e.getSizeSignalRef(t).signal;if(r==="step"){const a=e.getScaleComponent(n);if(a){const s=a.get("type"),o=a.get("range");if(vt(s)&&ds(o)){const u=e.scaleName(n);return Ln(e.parent)&&e.parent.component.resolve.scale[n]==="independent"?[Vx(u,o)]:[Vx(u,o),{name:i,update:IN(u,a,`domain('${u}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}else if(r=="container"){const a=i.endsWith("width"),s=a?"containerSize()[0]":"containerSize()[1]",o=ky(e.config.view,a?"width":"height"),u=`isFinite(${s}) ? ${s} : ${o}`;return[{name:i,init:u,on:[{update:u,events:"window:resize"}]}]}else return[{name:i,value:r}]}function Vx(e,t){const n=`${e}_step`;return Q(t.step)?{name:n,update:t.step.signal}:{name:n,value:t.step}}function IN(e,t,n){const r=t.get("type"),i=t.get("padding"),a=Ze(t.get("paddingOuter"),i);let s=t.get("paddingInner");return s=r==="band"?s!==void 0?s:i:1,`bandspace(${n}, ${_r(s)}, ${_r(a)}) * ${e}_step`}function zN(e){return e==="childWidth"?"width":e==="childHeight"?"height":e}function BN(e,t){return B(e).reduce((n,r)=>{const i=e[r];return{...n,...yc(t,i,r,a=>je(a.value))}},{})}function UN(e,t){if(Ln(t))return e==="theta"?"independent":"shared";if(wc(t))return"shared";if(t8(t))return et(e)||e==="theta"||e==="radius"?"independent":"shared";throw new Error("invalid model type for resolve")}function V6(e,t){const n=e.scale[t],r=et(t)?"axis":"legend";return n==="independent"?(e[r][t]==="shared"&&U(xie(t)),"independent"):e[r][t]||"shared"}const que={...kse,disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1},jN=B(que);class Wue extends ua{}const Kx={symbols:Hue,gradient:Gue,labels:Yue,entries:Xue};function Hue(e,{fieldOrDatumDef:t,model:n,channel:r,legendCmpt:i,legendType:a}){if(a!=="symbol")return;const{markDef:s,encoding:o,config:u,mark:c}=n,l=s.filled&&c!=="trail";let f={...Tre({},n,Eae),...gN(n,{filled:l})};const d=i.get("symbolOpacity")??u.legend.symbolOpacity,h=i.get("symbolFillColor")??u.legend.symbolFillColor,g=i.get("symbolStrokeColor")??u.legend.symbolStrokeColor,p=d===void 0?qN(o.opacity)??s.opacity:void 0;if(f.fill){if(r==="fill"||l&&r===wn)delete f.fill;else if(f.fill.field)h?delete f.fill:(f.fill=je(u.legend.symbolBaseFillColor??"black"),f.fillOpacity=je(p??1));else if(P(f.fill)){const m=Ly(o.fill??o.color)??s.fill??(l&&s.color);m&&(f.fill=je(m))}}if(f.stroke){if(r==="stroke"||!l&&r===wn)delete f.stroke;else if(f.stroke.field||g)delete f.stroke;else if(P(f.stroke)){const m=Ze(Ly(o.stroke||o.color),s.stroke,l?s.color:void 0);m&&(f.stroke={value:m})}}if(r!==aa){const m=j(t)&&HN(n,i,t);m?f.opacity=[{test:m,...je(p??1)},je(u.legend.unselectedOpacity)]:p&&(f.opacity=je(p))}return f={...f,...e},Oe(f)?void 0:f}function Gue(e,{model:t,legendType:n,legendCmpt:r}){if(n!=="gradient")return;const{config:i,markDef:a,encoding:s}=t;let o={};const c=(r.get("gradientOpacity")??i.legend.gradientOpacity)===void 0?qN(s.opacity)||a.opacity:void 0;return c&&(o.opacity=je(c)),o={...o,...e},Oe(o)?void 0:o}function Yue(e,{fieldOrDatumDef:t,model:n,channel:r,legendCmpt:i}){const a=n.legend(r)||{},s=n.config,o=j(t)?HN(n,i,t):void 0,u=o?[{test:o,value:1},{value:s.legend.unselectedOpacity}]:void 0,{format:c,formatType:l}=a;let f;mo(l)?f=Er({fieldOrDatumDef:t,field:"datum.value",format:c,formatType:l,config:s}):c===void 0&&l===void 0&&s.customFormatTypes&&(t.type==="quantitative"&&s.numberFormatType?f=Er({fieldOrDatumDef:t,field:"datum.value",format:s.numberFormat,formatType:s.numberFormatType,config:s}):t.type==="temporal"&&s.timeFormatType&&j(t)&&t.timeUnit===void 0&&(f=Er({fieldOrDatumDef:t,field:"datum.value",format:s.timeFormat,formatType:s.timeFormatType,config:s})));const d={...u?{opacity:u}:{},...f?{text:f}:{},...e};return Oe(d)?void 0:d}function Xue(e,{legendCmpt:t}){const n=t.get("selections");return n!=null&&n.length?{...e,fill:{value:"transparent"}}:e}function qN(e){return WN(e,(t,n)=>Math.max(t,n.value))}function Ly(e){return WN(e,(t,n)=>Ze(t,n.value))}function WN(e,t){if(qae(e))return Y(e.condition).reduce(t,e.value);if(Fr(e))return e.value}function HN(e,t,n){const r=t.get("selections");if(!(r!=null&&r.length))return;const i=H(n.field);return r.map(a=>`(!length(data(${H(We(a)+yo)})) || (${a}[${i}] && indexof(${a}[${i}], datum.value) >= 0))`).join(" || ")}const Jx={direction:({direction:e})=>e,format:({fieldOrDatumDef:e,legend:t,config:n})=>{const{format:r,formatType:i}=t;return oT(e,e.type,r,i,n,!1)},formatType:({legend:e,fieldOrDatumDef:t,scaleType:n})=>{const{formatType:r}=e;return uT(r,t,n)},gradientLength:e=>{const{legend:t,legendConfig:n}=e;return t.gradientLength??n.gradientLength??tce(e)},labelOverlap:({legend:e,legendConfig:t,scaleType:n})=>e.labelOverlap??t.labelOverlap??nce(n),symbolType:({legend:e,markDef:t,channel:n,encoding:r})=>e.symbolType??Kue(t.type,n,r.shape,t.shape),title:({fieldOrDatumDef:e,config:t})=>pu(e,t,{allowDisabling:!0}),type:({legendType:e,scaleType:t,channel:n})=>{if(gu(n)&&wr(t)){if(e==="gradient")return}else if(e==="symbol")return;return e},values:({fieldOrDatumDef:e,legend:t})=>Vue(t,e)};function Vue(e,t){const n=e.values;if(P(n))return _T(t,n);if(Q(n))return n}function Kue(e,t,n,r){if(t!=="shape"){const i=Ly(n)??r;if(i)return i}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}function Jue(e){const{legend:t}=e;return Ze(t.type,Que(e))}function Que({channel:e,timeUnit:t,scaleType:n}){if(gu(e)){if(ye(["quarter","month","day"],t))return"symbol";if(wr(n))return"gradient"}return"symbol"}function Zue({legendConfig:e,legendType:t,orient:n,legend:r}){return r.direction??e[t?"gradientDirection":"symbolDirection"]??ece(n,t)}function ece(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return t==="gradient"?"horizontal":void 0}}function tce({legendConfig:e,model:t,direction:n,orient:r,scaleType:i}){const{gradientHorizontalMaxLength:a,gradientHorizontalMinLength:s,gradientVerticalMaxLength:o,gradientVerticalMinLength:u}=e;if(wr(i))return n==="horizontal"?r==="top"||r==="bottom"?Qx(t,"width",s,a):s:Qx(t,"height",u,o)}function Qx(e,t,n,r){return{signal:`clamp(${e.getSizeSignalRef(t).signal}, ${n}, ${r})`}}function nce(e){if(ye(["quantile","threshold","log","symlog"],e))return"greedy"}function GN(e){const t=Ve(e)?rce(e):oce(e);return e.component.legends=t,t}function rce(e){const{encoding:t}=e,n={};for(const r of[wn,...jT]){const i=st(t[r]);!i||!e.getScaleComponent(r)||r===En&&j(i)&&i.type===bc||(n[r]=sce(e,r))}return n}function ice(e,t){const n=e.scaleName(t);if(e.mark==="trail"){if(t==="color")return{stroke:n};if(t==="size")return{strokeWidth:n}}return t==="color"?e.markDef.filled?{fill:n}:{stroke:n}:{[t]:n}}function ace(e,t,n,r){switch(t){case"disable":return n!==void 0;case"values":return!!(n!=null&&n.values);case"title":if(t==="title"&&e===(r==null?void 0:r.title))return!0}return e===(n||{})[t]}function sce(e,t){var x;let n=e.legend(t);const{markDef:r,encoding:i,config:a}=e,s=a.legend,o=new Wue({},ice(e,t));pue(e,t,o);const u=n!==void 0?!n:s.disable;if(o.set("disable",u,n!==void 0),u)return o;n=n||{};const c=e.getScaleComponent(t).get("type"),l=st(i[t]),f=j(l)?(x=yt(l.timeUnit))==null?void 0:x.unit:void 0,d=n.orient||a.legend.orient||"right",h=Jue({legend:n,channel:t,timeUnit:f,scaleType:c}),g=Zue({legend:n,legendType:h,orient:d,legendConfig:s}),p={legend:n,channel:t,model:e,markDef:r,encoding:i,fieldOrDatumDef:l,legendConfig:s,config:a,scaleType:c,orient:d,legendType:h,direction:g};for(const _ of jN){if(h==="gradient"&&_.startsWith("symbol")||h==="symbol"&&_.startsWith("gradient"))continue;const E=_ in Jx?Jx[_](p):n[_];if(E!==void 0){const w=ace(E,_,n,e.fieldDef(t));(w||a.legend[_]===void 0)&&o.set(_,E,w)}}const m=(n==null?void 0:n.encoding)??{},b=o.get("selections"),y={},v={fieldOrDatumDef:l,model:e,channel:t,legendCmpt:o,legendType:h};for(const _ of["labels","legend","title","symbols","gradient","entries"]){const E=BN(m[_]??{},e),w=_ in Kx?Kx[_](E,v):E;w!==void 0&&!Oe(w)&&(y[_]={...b!=null&&b.length&&j(l)?{name:`${We(l.field)}_legend_${_}`}:{},...b!=null&&b.length?{interactive:!!b}:{},update:w})}return Oe(y)||o.set("encode",y,!!(n!=null&&n.encoding)),o}function oce(e){const{legends:t,resolve:n}=e.component;for(const r of e.children){GN(r);for(const i of B(r.component.legends))n.legend[i]=V6(e.component.resolve,i),n.legend[i]==="shared"&&(t[i]=YN(t[i],r.component.legends[i]),t[i]||(n.legend[i]="independent",delete t[i]))}for(const r of B(t))for(const i of e.children)i.component.legends[r]&&n.legend[r]==="shared"&&delete i.component.legends[r];return t}function YN(e,t){var a,s,o,u;if(!e)return t.clone();const n=e.getWithExplicit("orient"),r=t.getWithExplicit("orient");if(n.explicit&&r.explicit&&n.value!==r.value)return;let i=!1;for(const c of jN){const l=Va(e.getWithExplicit(c),t.getWithExplicit(c),c,"legend",(f,d)=>{switch(c){case"symbolType":return uce(f,d);case"title":return CM(f,d);case"type":return i=!0,kn("symbol")}return Pp(f,d,c,"legend")});e.setWithExplicit(c,l)}return i&&((s=(a=e.implicit)==null?void 0:a.encode)!=null&&s.gradient&&N0(e.implicit,["encode","gradient"]),(u=(o=e.explicit)==null?void 0:o.encode)!=null&&u.gradient&&N0(e.explicit,["encode","gradient"])),e}function uce(e,t){return t.value==="circle"?t:e}function cce(e,t,n,r){var i,a;e.encode??(e.encode={}),(i=e.encode)[t]??(i[t]={}),(a=e.encode[t]).update??(a.update={}),e.encode[t].update[n]=r}function XN(e){const t=e.component.legends,n={};for(const i of B(t)){const a=e.getScaleComponent(i),s=Re(a.get("domains"));if(n[s])for(const o of n[s])YN(o,t[i])||n[s].push(t[i]);else n[s]=[t[i].clone()]}return kt(n).flat().map(i=>lce(i,e.config)).filter(i=>i!==void 0)}function lce(e,t){var s,o,u;const{disable:n,labelExpr:r,selections:i,...a}=e.combine();if(!n){if(t.aria===!1&&a.aria==null&&(a.aria=!1),(s=a.encode)!=null&&s.symbols){const c=a.encode.symbols.update;c.fill&&c.fill.value!=="transparent"&&!c.stroke&&!a.stroke&&(c.stroke={value:"transparent"});for(const l of jT)a[l]&&delete c[l]}if(a.title||delete a.title,r!==void 0){let c=r;(u=(o=a.encode)==null?void 0:o.labels)!=null&&u.update&&Q(a.encode.labels.update.text)&&(c=lo(r,"datum.label",a.encode.labels.update.text.signal)),cce(a,"labels","text",{signal:c})}return a}}function fce(e){return wc(e)||t8(e)?dce(e):VN(e)}function dce(e){return e.children.reduce((t,n)=>t.concat(n.assembleProjections()),VN(e))}function VN(e){const t=e.component.projection;if(!t||t.merged)return[];const n=t.combine(),{name:r}=n;if(t.data){const i={signal:`[${t.size.map(s=>s.signal).join(", ")}]`},a=t.data.reduce((s,o)=>{const u=Q(o)?o.signal:`data('${e.lookupDataSource(o)}')`;return ye(s,u)||s.push(u),s},[]);if(a.length<=0)throw new Error("Projection's fit didn't find any data sources");return[{name:r,size:i,fit:{signal:a.length>1?`[${a.join(", ")}]`:a[0]},...n}]}else return[{name:r,translate:{signal:"[width / 2, height / 2]"},...n}]}const hce=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class KN extends ua{constructor(t,n,r,i){super({...n},{name:t}),this.specifiedProjection=n,this.size=r,this.data=i,this.merged=!1}get isFit(){return!!this.data}}function JN(e){e.component.projection=Ve(e)?gce(e):bce(e)}function gce(e){if(e.hasProjection){const t=gn(e.specifiedProjection),n=!(t&&(t.scale!=null||t.translate!=null)),r=n?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,i=n?pce(e):void 0,a=new KN(e.projectionName(!0),{...gn(e.config.projection),...t},r,i);return a.get("type")||a.set("type","equalEarth",!1),a}}function pce(e){const t=[],{encoding:n}=e;for(const r of[[Pr,Lr],[ar,Ir]])(st(n[r[0]])||st(n[r[1]]))&&t.push({signal:e.getName(`geojson_${t.length}`)});return e.channelHasField(En)&&e.typedFieldDef(En).type===bc&&t.push({signal:e.getName(`geojson_${t.length}`)}),t.length===0&&t.push(e.requestDataName(ze.Main)),t}function mce(e,t){const n=U7(hce,i=>!!(!ie(e.explicit,i)&&!ie(t.explicit,i)||ie(e.explicit,i)&&ie(t.explicit,i)&&Dn(e.get(i),t.get(i))));if(Dn(e.size,t.size)){if(n)return e;if(Dn(e.explicit,{}))return t;if(Dn(t.explicit,{}))return e}return null}function bce(e){if(e.children.length===0)return;let t;for(const r of e.children)JN(r);const n=U7(e.children,r=>{const i=r.component.projection;if(i)if(t){const a=mce(t,i);return a&&(t=a),!!a}else return t=i,!0;else return!0});if(t&&n){const r=e.projectionName(!0),i=new KN(r,t.specifiedProjection,t.size,oe(t.data));for(const a of e.children){const s=a.component.projection;s&&(s.isFit&&i.data.push(...a.component.projection.data),a.renameProjection(s.get("name"),r),s.merged=!0)}return i}}function yce(e,t,n,r){if(ed(t,n)){const i=Ve(e)?e.axis(n)??e.legend(n)??{}:{},a=G(t,{expr:"datum"}),s=G(t,{expr:"datum",binSuffix:"end"});return{formulaAs:G(t,{binSuffix:"range",forAs:!0}),formula:Jf(a,s,i.format,i.formatType,r)}}return{}}function QN(e,t){return`${xM(e)}_${t}`}function vce(e,t){return{signal:e.getName(`${t}_bins`),extentSignal:e.getName(`${t}_extent`)}}function K6(e,t,n){const r=Tp(n,void 0)??{},i=QN(r,t);return e.getName(`${i}_bins`)}function xce(e){return"as"in e}function Zx(e,t,n){let r,i;xce(e)?r=X(e.as)?[e.as,`${e.as}_end`]:[e.as[0],e.as[1]]:r=[G(e,{forAs:!0}),G(e,{binSuffix:"end",forAs:!0})];const a={...Tp(t,void 0)},s=QN(a,e.field),{signal:o,extentSignal:u}=vce(n,s);if(xp(a.extent)){const l=a.extent;i=MN(n,l.param,l),delete a.extent}const c={bin:a,field:e.field,as:[r],...o?{signal:o}:{},...u?{extentSignal:u}:{},...i?{span:i}:{}};return{key:s,binComponent:c}}class ni extends De{clone(){return new ni(null,oe(this.bins))}constructor(t,n){super(t),this.bins=n}static makeFromEncoding(t,n){const r=n.reduceFieldDef((i,a,s)=>{if(un(a)&&Be(a.bin)){const{key:o,binComponent:u}=Zx(a,a.bin,n);i[o]={...u,...i[o],...yce(n,a,s,n.config)}}return i},{});return Oe(r)?null:new ni(t,r)}static makeFromTransform(t,n,r){const{key:i,binComponent:a}=Zx(n,n.bin,r);return new ni(t,{[i]:a})}merge(t,n){for(const r of B(t.bins))r in this.bins?(n(t.bins[r].signal,this.bins[r].signal),this.bins[r].as=Kr([...this.bins[r].as,...t.bins[r].as],be)):this.bins[r]=t.bins[r];for(const r of t.children)t.removeChild(r),r.parent=this;t.remove()}producedFields(){return new Set(kt(this.bins).map(t=>t.as).flat(2))}dependentFields(){return new Set(kt(this.bins).map(t=>t.field))}hash(){return`Bin ${be(this.bins)}`}assemble(){return kt(this.bins).flatMap(t=>{const n=[],[r,...i]=t.as,{extent:a,...s}=t.bin,o={type:"bin",field:ir(t.field),as:r,signal:t.signal,...xp(a)?{extent:null}:{extent:a},...t.span?{span:{signal:`span(${t.span})`}}:{},...s};!a&&t.extentSignal&&(n.push({type:"extent",field:ir(t.field),signal:t.extentSignal}),o.extent={signal:t.extentSignal}),n.push(o);for(const u of i)for(let c=0;c<2;c++)n.push({type:"formula",expr:G({field:r[c]},{expr:"datum"}),as:u[c]});return t.formula&&n.push({type:"formula",expr:t.formula,as:t.formulaAs}),n})}}function _ce(e,t,n,r){var a;const i=Ve(r)?r.encoding[_i(t)]:void 0;if(un(n)&&Ve(r)&&hT(n,i,r.markDef,r.config)){e.add(G(n,{})),e.add(G(n,{suffix:"end"}));const{mark:s,markDef:o,config:u}=r,c=Xa({fieldDef:n,markDef:o,config:u});lf(s)&&c!==.5&&et(t)&&(e.add(G(n,{suffix:Ip})),e.add(G(n,{suffix:zp}))),n.bin&&ed(n,t)&&e.add(G(n,{binSuffix:"range"}))}else if(lM(t)){const s=cM(t);e.add(r.getName(s))}else e.add(G(n));return Ro(n)&&fae((a=n.scale)==null?void 0:a.range)&&e.add(n.scale.range.field),e}function wce(e,t){for(const n of B(t)){const r=t[n];for(const i of B(r))n in e?e[n][i]=new Set([...e[n][i]??[],...r[i]]):e[n]={[i]:r[i]}}}class $r extends De{clone(){return new $r(null,new Set(this.dimensions),oe(this.measures))}constructor(t,n,r){super(t),this.dimensions=n,this.measures=r}get groupBy(){return this.dimensions}static makeFromEncoding(t,n){let r=!1;n.forEachFieldDef(s=>{s.aggregate&&(r=!0)});const i={},a=new Set;return!r||(n.forEachFieldDef((s,o)=>{const{aggregate:u,field:c}=s;if(u)if(u==="count")i["*"]??(i["*"]={}),i["*"].count=new Set([G(s,{forAs:!0})]);else{if(Qi(u)||fs(u)){const l=Qi(u)?"argmin":"argmax",f=u[l];i[f]??(i[f]={}),i[f][l]=new Set([G({op:l,field:f},{forAs:!0})])}else i[c]??(i[c]={}),i[c][u]=new Set([G(s,{forAs:!0})]);sa(o)&&n.scaleDomain(o)==="unaggregated"&&(i[c]??(i[c]={}),i[c].min=new Set([G({field:c,aggregate:"min"},{forAs:!0})]),i[c].max=new Set([G({field:c,aggregate:"max"},{forAs:!0})]))}else _ce(a,o,s,n)}),a.size+B(i).length===0)?null:new $r(t,a,i)}static makeFromTransform(t,n){const r=new Set,i={};for(const a of n.aggregate){const{op:s,field:o,as:u}=a;s&&(s==="count"?(i["*"]??(i["*"]={}),i["*"].count=new Set([u||G(a,{forAs:!0})])):(i[o]??(i[o]={}),i[o][s]=new Set([u||G(a,{forAs:!0})])))}for(const a of n.groupby??[])r.add(a);return r.size+B(i).length===0?null:new $r(t,r,i)}merge(t){return tM(this.dimensions,t.dimensions)?(wce(this.measures,t.measures),!0):(Lie("different dimensions, cannot merge"),!1)}addDimensions(t){t.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...B(this.measures)])}producedFields(){const t=new Set;for(const n of B(this.measures))for(const r of B(this.measures[n])){const i=this.measures[n][r];i.size===0?t.add(`${r}_${n}`):i.forEach(t.add,t)}return t}hash(){return`Aggregate ${be({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const t=[],n=[],r=[];for(const a of B(this.measures))for(const s of B(this.measures[a]))for(const o of this.measures[a][s])r.push(o),t.push(s),n.push(a==="*"?null:ir(a));return{type:"aggregate",groupby:[...this.dimensions].map(ir),ops:t,fields:n,as:r}}}class xc extends De{constructor(t,n,r,i){super(t),this.model=n,this.name=r,this.data=i;for(const a of Kn){const s=n.facet[a];if(s){const{bin:o,sort:u}=s;this[a]={name:n.getName(`${a}_domain`),fields:[G(s),...Be(o)?[G(s,{binSuffix:"end"})]:[]],...ei(u)?{sortField:u}:P(u)?{sortIndexField:Ju(s,a)}:{}}}}this.childModel=n.child}hash(){let t="Facet";for(const n of Kn)this[n]&&(t+=` ${n.charAt(0)}:${be(this[n])}`);return t}get fields(){var n;const t=[];for(const r of Kn)(n=this[r])!=null&&n.fields&&t.push(...this[r].fields);return t}dependentFields(){const t=new Set(this.fields);for(const n of Kn)this[n]&&(this[n].sortField&&t.add(this[n].sortField.field),this[n].sortIndexField&&t.add(this[n].sortIndexField));return t}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const t={};for(const n of wi){const r=this.childModel.component.scales[n];if(r&&!r.merged){const i=r.get("type"),a=r.get("range");if(vt(i)&&ds(a)){const s=Wp(this.childModel,n),o=e8(s);o?t[n]=o:U(t6(n))}}}return t}assembleRowColumnHeaderData(t,n,r){const i={row:"y",column:"x",facet:void 0}[t],a=[],s=[],o=[];i&&r&&r[i]&&(n?(a.push(`distinct_${r[i]}`),s.push("max")):(a.push(r[i]),s.push("distinct")),o.push(`distinct_${r[i]}`));const{sortField:u,sortIndexField:c}=this[t];if(u){const{op:l=kp,field:f}=u;a.push(f),s.push(l),o.push(G(u,{forAs:!0}))}else c&&(a.push(c),s.push("max"),o.push(c));return{name:this[t].name,source:n??this.data,transform:[{type:"aggregate",groupby:this[t].fields,...a.length?{fields:a,ops:s,as:o}:{}}]}}assembleFacetHeaderData(t){var u;const{columns:n}=this.model.layout,{layoutHeaders:r}=this.model.component,i=[],a={};for(const c of G6){for(const l of Y6){const f=(r[c]&&r[c][l])??[];for(const d of f)if(((u=d.axes)==null?void 0:u.length)>0){a[c]=!0;break}}if(a[c]){const l=`length(data("${this.facet.name}"))`,f=c==="row"?n?{signal:`ceil(${l} / ${n})`}:1:n?{signal:`min(${l}, ${n})`}:{signal:l};i.push({name:`${this.facet.name}_${c}`,transform:[{type:"sequence",start:0,stop:f}]})}}const{row:s,column:o}=a;return(s||o)&&i.unshift(this.assembleRowColumnHeaderData("facet",null,t)),i}assemble(){const t=[];let n=null;const r=this.getChildIndependentFieldsWithStep(),{column:i,row:a,facet:s}=this;if(i&&a&&(r.x||r.y)){n=`cross_${this.column.name}_${this.row.name}`;const o=[].concat(r.x??[],r.y??[]),u=o.map(()=>"distinct");t.push({name:n,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:o,ops:u}]})}for(const o of[Gi,Hi])this[o]&&t.push(this.assembleRowColumnHeaderData(o,n,r));if(s){const o=this.assembleFacetHeaderData(r);o&&t.push(...o)}return t}}function e_(e){return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function Ece(e,t){const n=W7(e);if(t==="number")return`toNumber(${n})`;if(t==="boolean")return`toBoolean(${n})`;if(t==="string")return`toString(${n})`;if(t==="date")return`toDate(${n})`;if(t==="flatten")return n;if(t.startsWith("date:")){const r=e_(t.slice(5,t.length));return`timeParse(${n},'${r}')`}else if(t.startsWith("utc:")){const r=e_(t.slice(4,t.length));return`utcParse(${n},'${r}')`}else return U(Hre(t)),null}function Sce(e){const t={};return gh(e.filter,n=>{if(HM(n)){let r=null;a6(n)?r=Mn(n.equal):o6(n)?r=Mn(n.lte):s6(n)?r=Mn(n.lt):u6(n)?r=Mn(n.gt):c6(n)?r=Mn(n.gte):l6(n)?r=n.range[0]:f6(n)&&(r=(n.oneOf??n.in)[0]),r&&(Do(r)?t[n.field]="date":we(r)?t[n.field]="number":X(r)&&(t[n.field]="string")),n.timeUnit&&(t[n.field]="date")}}),t}function $ce(e){const t={};function n(r){Yu(r)?t[r.field]="date":r.type==="quantitative"&&wre(r.aggregate)?t[r.field]="number":Bu(r.field)>1?r.field in t||(t[r.field]="flatten"):Ro(r)&&ei(r.sort)&&Bu(r.sort.field)>1&&(r.sort.field in t||(t[r.sort.field]="flatten"))}if((Ve(e)||Ln(e))&&e.forEachFieldDef((r,i)=>{if(un(r))n(r);else{const a=To(i),s=e.fieldDef(a);n({...r,type:s.type})}}),Ve(e)){const{mark:r,markDef:i,encoding:a}=e;if(hs(r)&&!e.encoding.order){const s=i.orient==="horizontal"?"y":"x",o=a[s];j(o)&&o.type==="quantitative"&&!(o.field in t)&&(t[o.field]="number")}}return t}function Ace(e){const t={};if(Ve(e)&&e.component.selection)for(const n of B(e.component.selection)){const r=e.component.selection[n];for(const i of r.project.items)!i.channel&&Bu(i.field)>1&&(t[i.field]="flatten")}return t}class zt extends De{clone(){return new zt(null,oe(this._parse))}constructor(t,n){super(t),this._parse=n}hash(){return`Parse ${be(this._parse)}`}static makeExplicit(t,n,r){var s;let i={};const a=n.data;return!Da(a)&&((s=a==null?void 0:a.format)!=null&&s.parse)&&(i=a.format.parse),this.makeWithAncestors(t,i,{},r)}static makeWithAncestors(t,n,r,i){for(const o of B(r)){const u=i.getWithExplicit(o);u.value!==void 0&&(u.explicit||u.value===r[o]||u.value==="derived"||r[o]==="flatten"?delete r[o]:U(lx(o,r[o],u.value)))}for(const o of B(n)){const u=i.get(o);u!==void 0&&(u===n[o]?delete n[o]:U(lx(o,n[o],u)))}const a=new ua(n,r);i.copyAll(a);const s={};for(const o of B(a.combine())){const u=a.get(o);u!==null&&(s[o]=u)}return B(s).length===0||i.parseNothing?null:new zt(t,s)}get parse(){return this._parse}merge(t){this._parse={...this._parse,...t.parse},t.remove()}assembleFormatParse(){const t={};for(const n of B(this._parse)){const r=this._parse[n];Bu(n)===1&&(t[n]=r)}return t}producedFields(){return new Set(B(this._parse))}dependentFields(){return new Set(B(this._parse))}assembleTransforms(t=!1){return B(this._parse).filter(n=>t?Bu(n)>1:!0).map(n=>{const r=Ece(n,this._parse[n]);return r?{type:"formula",expr:r,as:H7(n)}:null}).filter(n=>n!==null)}}class Qa extends De{clone(){return new Qa(null)}constructor(t){super(t)}dependentFields(){return new Set}producedFields(){return new Set([Mr])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:Mr}}}class rd extends De{clone(){return new rd(null,this.params)}constructor(t,n){super(t),this.params=n}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${be(this.params)}`}assemble(){return{type:"graticule",...this.params===!0?{}:this.params}}}class id extends De{clone(){return new id(null,this.params)}constructor(t,n){super(t),this.params=n}dependentFields(){return new Set}producedFields(){return new Set([this.params.as??"data"])}hash(){return`Hash ${be(this.params)}`}assemble(){return{type:"sequence",...this.params}}}class vo extends De{constructor(t){super(null),t??(t={name:"source"});let n;if(Da(t)||(n=t.format?{...bn(t.format,["parse"])}:{}),ff(t))this._data={values:t.values};else if(Xu(t)){if(this._data={url:t.url},!n.type){let r=/(?:\.([^.]+))?$/.exec(t.url)[1];ye(["json","csv","tsv","dsv","topojson"],r)||(r="json"),n.type=r}}else sN(t)?this._data={values:[{type:"Sphere"}]}:(iN(t)||Da(t))&&(this._data={});this._generator=Da(t),t.name&&(this._name=t.name),n&&!Oe(n)&&(this._data.format=n)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(t){this._name=t}set parent(t){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return{name:this._name,...this._data,transform:[]}}}var t_=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},kce=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},yl;function J6(e){return e instanceof vo||e instanceof rd||e instanceof id}class Q6{constructor(){yl.set(this,void 0),t_(this,yl,!1,"f")}setModified(){t_(this,yl,!0,"f")}get modifiedFlag(){return kce(this,yl,"f")}}yl=new WeakMap;class Lo extends Q6{getNodeDepths(t,n,r){r.set(t,n);for(const i of t.children)this.getNodeDepths(i,n+1,r);return r}optimize(t){const r=[...this.getNodeDepths(t,0,new Map).entries()].sort((i,a)=>a[1]-i[1]);for(const i of r)this.run(i[0]);return this.modifiedFlag}}class Z6 extends Q6{optimize(t){this.run(t);for(const n of t.children)this.optimize(n);return this.modifiedFlag}}class Cce extends Z6{mergeNodes(t,n){const r=n.shift();for(const i of n)t.removeChild(i),i.parent=r,i.remove()}run(t){const n=t.children.map(i=>i.hash()),r={};for(let i=0;i1&&(this.setModified(),this.mergeNodes(t,r[i]))}}class Fce extends Z6{constructor(t){super(),this.requiresSelectionId=t&&H6(t)}run(t){t instanceof Qa&&(this.requiresSelectionId&&(J6(t.parent)||t.parent instanceof $r||t.parent instanceof zt)||(this.setModified(),t.remove()))}}class Mce extends Q6{optimize(t){return this.run(t,new Set),this.modifiedFlag}run(t,n){let r=new Set;t instanceof ti&&(r=t.producedFields(),j7(r,n)&&(this.setModified(),t.removeFormulas(n),t.producedFields.length===0&&t.remove()));for(const i of t.children)this.run(i,new Set([...n,...r]))}}class Tce extends Z6{constructor(){super()}run(t){t instanceof an&&!t.isRequired()&&(this.setModified(),t.remove())}}class Nce extends Lo{run(t){if(!J6(t)&&!(t.numChildren()>1)){for(const n of t.children)if(n instanceof zt)if(t instanceof zt)this.setModified(),t.merge(n);else{if(q7(t.producedFields(),n.dependentFields()))continue;this.setModified(),n.swapWithParent()}}}}class Dce extends Lo{run(t){const n=[...t.children],r=t.children.filter(i=>i instanceof zt);if(t.numChildren()>1&&r.length>=1){const i={},a=new Set;for(const s of r){const o=s.parse;for(const u of B(o))u in i?i[u]!==o[u]&&a.add(u):i[u]=o[u]}for(const s of a)delete i[s];if(!Oe(i)){this.setModified();const s=new zt(t,i);for(const o of n){if(o instanceof zt)for(const u of B(i))delete o.parse[u];t.removeChild(o),o.parent=s,o instanceof zt&&B(o.parse).length===0&&o.remove()}}}}}class Oce extends Lo{run(t){t instanceof an||t.numChildren()>0||t instanceof xc||t instanceof vo||(this.setModified(),t.remove())}}class Rce extends Lo{run(t){const n=t.children.filter(i=>i instanceof ti),r=n.pop();for(const i of n)this.setModified(),r.merge(i)}}class Lce extends Lo{run(t){const n=t.children.filter(i=>i instanceof $r),r={};for(const i of n){const a=be(i.groupBy);a in r||(r[a]=[]),r[a].push(i)}for(const i of B(r)){const a=r[i];if(a.length>1){const s=a.pop();for(const o of a)s.merge(o)&&(t.removeChild(o),o.parent=s,o.remove(),this.setModified())}}}}class Pce extends Lo{constructor(t){super(),this.model=t}run(t){const n=!(J6(t)||t instanceof vc||t instanceof zt||t instanceof Qa),r=[],i=[];for(const a of t.children)a instanceof ni&&(n&&!q7(t.producedFields(),a.dependentFields())?r.push(a):i.push(a));if(r.length>0){const a=r.pop();for(const s of r)a.merge(s,this.model.renameSignal.bind(this.model));this.setModified(),t instanceof ni?t.merge(a,this.model.renameSignal.bind(this.model)):a.swapWithParent()}if(i.length>1){const a=i.pop();for(const s of i)a.merge(s,this.model.renameSignal.bind(this.model));this.setModified()}}}class Ice extends Lo{run(t){const n=[...t.children];if(!co(n,s=>s instanceof an)||t.numChildren()<=1)return;const i=[];let a;for(const s of n)if(s instanceof an){let o=s;for(;o.numChildren()===1;){const[u]=o.children;if(u instanceof an)o=u;else break}i.push(...o.children),a?(t.removeChild(s),s.parent=a.parent,a.parent.removeChild(a),a.parent=o,this.setModified()):a=o}else i.push(s);if(i.length){this.setModified();for(const s of i)s.parent.removeChild(s),s.parent=a}}}class Po extends De{clone(){return new Po(null,oe(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=Kr(this.transform.groupby.concat(t),n=>n)}dependentFields(){const t=new Set;return this.transform.groupby&&this.transform.groupby.forEach(t.add,t),this.transform.joinaggregate.map(n=>n.field).filter(n=>n!==void 0).forEach(t.add,t),t}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(t){return t.as??G(t)}hash(){return`JoinAggregateTransform ${be(this.transform)}`}assemble(){const t=[],n=[],r=[];for(const a of this.transform.joinaggregate)n.push(a.op),r.push(this.getDefaultName(a)),t.push(a.field===void 0?null:a.field);const i=this.transform.groupby;return{type:"joinaggregate",as:r,ops:n,fields:t,...i!==void 0?{groupby:i}:{}}}}function zce(e){return e.stack.stackBy.reduce((t,n)=>{const r=n.fieldDef,i=G(r);return i&&t.push(i),t},[])}function Bce(e){return P(e)&&e.every(t=>X(t))&&e.length>1}class Xi extends De{clone(){return new Xi(null,oe(this._stack))}constructor(t,n){super(t),this._stack=n}static makeFromTransform(t,n){const{stack:r,groupby:i,as:a,offset:s="zero"}=n,o=[],u=[];if(n.sort!==void 0)for(const f of n.sort)o.push(f.field),u.push(Ze(f.order,"ascending"));const c={field:o,order:u};let l;return Bce(a)?l=a:X(a)?l=[a,`${a}_end`]:l=[`${n.stack}_start`,`${n.stack}_end`],new Xi(t,{dimensionFieldDefs:[],stackField:r,groupby:i,offset:s,sort:c,facetby:[],as:l})}static makeFromEncoding(t,n){const r=n.stack,{encoding:i}=n;if(!r)return null;const{groupbyChannels:a,fieldChannel:s,offset:o,impute:u}=r,c=a.map(h=>{const g=i[h];return li(g)}).filter(h=>!!h),l=zce(n),f=n.encoding.order;let d;if(P(f)||j(f))d=$M(f);else{const h=gT(f)?f.sort:s==="y"?"descending":"ascending";d=l.reduce((g,p)=>(g.field.includes(p)||(g.field.push(p),g.order.push(h)),g),{field:[],order:[]})}return new Xi(t,{dimensionFieldDefs:c,stackField:n.vgField(s),facetby:[],stackby:l,sort:d,offset:o,impute:u,as:[n.vgField(s,{suffix:"start",forAs:!0}),n.vgField(s,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(t){this._stack.facetby.push(...t)}dependentFields(){const t=new Set;return t.add(this._stack.stackField),this.getGroupbyFields().forEach(t.add,t),this._stack.facetby.forEach(t.add,t),this._stack.sort.field.forEach(t.add,t),t}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${be(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:t,impute:n,groupby:r}=this._stack;return t.length>0?t.map(i=>i.bin?n?[G(i,{binSuffix:"mid"})]:[G(i,{}),G(i,{binSuffix:"end"})]:[G(i)]).flat():r??[]}assemble(){const t=[],{facetby:n,dimensionFieldDefs:r,stackField:i,stackby:a,sort:s,offset:o,impute:u,as:c}=this._stack;if(u)for(const l of r){const{bandPosition:f=.5,bin:d}=l;if(d){const h=G(l,{expr:"datum"}),g=G(l,{expr:"datum",binSuffix:"end"});t.push({type:"formula",expr:`${f}*${h}+${1-f}*${g}`,as:G(l,{binSuffix:"mid",forAs:!0})})}t.push({type:"impute",field:i,groupby:[...a,...n],key:G(l,{binSuffix:"mid"}),method:"value",value:0})}return t.push({type:"stack",groupby:[...this.getGroupbyFields(),...n],field:i,sort:s,as:c,offset:o}),t}}class _c extends De{clone(){return new _c(null,oe(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=Kr(this.transform.groupby.concat(t),n=>n)}dependentFields(){const t=new Set;return(this.transform.groupby??[]).forEach(t.add,t),(this.transform.sort??[]).forEach(n=>t.add(n.field)),this.transform.window.map(n=>n.field).filter(n=>n!==void 0).forEach(t.add,t),t}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(t){return t.as??G(t)}hash(){return`WindowTransform ${be(this.transform)}`}assemble(){const t=[],n=[],r=[],i=[];for(const f of this.transform.window)n.push(f.op),r.push(this.getDefaultName(f)),i.push(f.param===void 0?null:f.param),t.push(f.field===void 0?null:f.field);const a=this.transform.frame,s=this.transform.groupby;if(a&&a[0]===null&&a[1]===null&&n.every(f=>Z7(f)))return{type:"joinaggregate",as:r,ops:n,fields:t,...s!==void 0?{groupby:s}:{}};const o=[],u=[];if(this.transform.sort!==void 0)for(const f of this.transform.sort)o.push(f.field),u.push(f.order??"ascending");const c={field:o,order:u},l=this.transform.ignorePeers;return{type:"window",params:i,as:r,ops:n,fields:t,sort:c,...l!==void 0?{ignorePeers:l}:{},...s!==void 0?{groupby:s}:{},...a!==void 0?{frame:a}:{}}}}function Uce(e){function t(n){if(!(n instanceof xc)){const r=n.clone();if(r instanceof an){const i=Iy+r.getSource();r.setSource(i),e.model.component.data.outputNodes[i]=r}else(r instanceof $r||r instanceof Xi||r instanceof _c||r instanceof Po)&&r.addDimensions(e.fields);for(const i of n.children.flatMap(t))i.parent=r;return[r]}return n.children.flatMap(t)}return t}function Py(e){if(e instanceof xc)if(e.numChildren()===1&&!(e.children[0]instanceof an)){const t=e.children[0];(t instanceof $r||t instanceof Xi||t instanceof _c||t instanceof Po)&&t.addDimensions(e.fields),t.swapWithParent(),Py(e)}else{const t=e.model.component.data.main;ZN(t);const n=Uce(e),r=e.children.map(n).flat();for(const i of r)i.parent=t}else e.children.map(Py)}function ZN(e){if(e instanceof an&&e.type===ze.Main&&e.numChildren()===1){const t=e.children[0];t instanceof xc||(t.swapWithParent(),ZN(e))}}const Iy="scale_",Pd=5;function zy(e){for(const t of e){for(const n of t.children)if(n.parent!==t)return!1;if(!zy(t.children))return!1}return!0}function cr(e,t){let n=!1;for(const r of t)n=e.optimize(r)||n;return n}function n_(e,t,n){let r=e.sources,i=!1;return i=cr(new Tce,r)||i,i=cr(new Fce(t),r)||i,r=r.filter(a=>a.numChildren()>0),i=cr(new Oce,r)||i,r=r.filter(a=>a.numChildren()>0),n||(i=cr(new Nce,r)||i,i=cr(new Pce(t),r)||i,i=cr(new Mce,r)||i,i=cr(new Dce,r)||i,i=cr(new Lce,r)||i,i=cr(new Rce,r)||i,i=cr(new Cce,r)||i,i=cr(new Ice,r)||i),e.sources=r,i}function jce(e,t){zy(e.sources);let n=0,r=0;for(let i=0;it(n))}}function eD(e){Ve(e)?qce(e):Wce(e)}function qce(e){const t=e.component.scales;for(const n of B(t)){const r=Gce(e,n);if(t[n].setWithExplicit("domains",r),Xce(e,n),e.component.data.isFaceted){let a=e;for(;!Ln(a)&&a.parent;)a=a.parent;if(a.component.resolve.scale[n]==="shared")for(const o of r.value)Ui(o)&&(o.data=Iy+o.data.replace(Iy,""))}}}function Wce(e){for(const n of e.children)eD(n);const t=e.component.scales;for(const n of B(t)){let r,i=null;for(const a of e.children){const s=a.component.scales[n];if(s){r===void 0?r=s.getWithExplicit("domains"):r=Va(r,s.getWithExplicit("domains"),"domains","scale",By);const o=s.get("selectionExtent");i&&o&&i.param!==o.param&&U(Ure),i=o}}t[n].setWithExplicit("domains",r),i&&t[n].set("selectionExtent",i,!0)}}function Hce(e,t,n,r){if(e==="unaggregated"){const{valid:i,reason:a}=r_(t,n);if(!i){U(a);return}}else if(e===void 0&&r.useUnaggregatedDomain){const{valid:i}=r_(t,n);if(i)return"unaggregated"}return e}function Gce(e,t){const n=e.getScaleComponent(t).get("type"),{encoding:r}=e,i=Hce(e.scaleDomain(t),e.typedFieldDef(t),n,e.config.scale);return i!==e.scaleDomain(t)&&(e.specifiedScales[t]={...e.specifiedScales[t],domain:i}),t==="x"&&st(r.x2)?st(r.x)?Va(da(n,i,e,"x"),da(n,i,e,"x2"),"domain","scale",By):da(n,i,e,"x2"):t==="y"&&st(r.y2)?st(r.y)?Va(da(n,i,e,"y"),da(n,i,e,"y2"),"domain","scale",By):da(n,i,e,"y2"):da(n,i,e,t)}function Yce(e,t,n){return e.map(r=>({signal:`{data: ${Np(r,{timeUnit:n,type:t})}}`}))}function ym(e,t,n){var i;const r=(i=yt(n))==null?void 0:i.unit;return t==="temporal"||r?Yce(e,t,r):[e]}function da(e,t,n,r){const{encoding:i,markDef:a,mark:s,config:o,stack:u}=n,c=st(i[r]),{type:l}=c,f=c.timeUnit;if(lae(t)){const g=da(e,void 0,n,r),p=ym(t.unionWith,l,f);return Hr([...p,...g.value])}else{if(Q(t))return Hr([t]);if(t&&t!=="unaggregated"&&!QM(t))return Hr(ym(t,l,f))}if(u&&r===u.fieldChannel){if(u.offset==="normalize")return kn([[0,1]]);const g=n.requestDataName(ze.Main);return kn([{data:g,field:n.vgField(r,{suffix:"start"})},{data:g,field:n.vgField(r,{suffix:"end"})}])}const d=sa(r)&&j(c)?Vce(n,r,e):void 0;if(Ei(c)){const g=ym([c.datum],l,f);return kn(g)}const h=c;if(t==="unaggregated"){const g=n.requestDataName(ze.Main),{field:p}=c;return kn([{data:g,field:G({field:p,aggregate:"min"})},{data:g,field:G({field:p,aggregate:"max"})}])}else if(Be(h.bin)){if(vt(e))return kn(e==="bin-ordinal"?[]:[{data:uf(d)?n.requestDataName(ze.Main):n.requestDataName(ze.Raw),field:n.vgField(r,ed(h,r)?{binSuffix:"range"}:{}),sort:d===!0||!V(d)?{field:n.vgField(r,{}),op:"min"}:d}]);{const{bin:g}=h;if(Be(g)){const p=K6(n,h.field,g);return kn([new ft(()=>{const m=n.getSignalName(p);return`[${m}.start, ${m}.stop]`})])}else return kn([{data:n.requestDataName(ze.Main),field:n.vgField(r,{})}])}}else if(h.timeUnit&&ye(["time","utc"],e)){const g=i[_i(r)];if(hT(h,g,a,o)){const p=n.requestDataName(ze.Main),m=Xa({fieldDef:h,fieldDef2:g,markDef:a,config:o}),b=lf(s)&&m!==.5&&et(r);return kn([{data:p,field:n.vgField(r,b?{suffix:Ip}:{})},{data:p,field:n.vgField(r,{suffix:b?zp:"end"})}])}}return kn(d?[{data:uf(d)?n.requestDataName(ze.Main):n.requestDataName(ze.Raw),field:n.vgField(r),sort:d}]:[{data:n.requestDataName(ze.Main),field:n.vgField(r)}])}function vm(e,t){const{op:n,field:r,order:i}=e;return{op:n??(t?"sum":kp),...r?{field:ir(r)}:{},...i?{order:i}:{}}}function Xce(e,t){var o;const n=e.component.scales[t],r=e.specifiedScales[t].domain,i=(o=e.fieldDef(t))==null?void 0:o.bin,a=QM(r)&&r,s=No(i)&&xp(i.extent)&&i.extent;(a||s)&&n.set("selectionExtent",a??s,!0)}function Vce(e,t,n){if(!vt(n))return;const r=e.fieldDef(t),i=r.sort;if(fT(i))return{op:"min",field:Ju(r,t),order:"ascending"};const{stack:a}=e,s=a?new Set([...a.groupbyFields,...a.stackBy.map(o=>o.fieldDef.field)]):void 0;if(ei(i)){const o=a&&!s.has(i.field);return vm(i,o)}else if(lT(i)){const{encoding:o,order:u}=i,c=e.fieldDef(o),{aggregate:l,field:f}=c,d=a&&!s.has(f);if(Qi(l)||fs(l))return vm({field:G(c),order:u},d);if(Z7(l)||!l)return vm({op:l,field:f,order:u},d)}else{if(i==="descending")return{op:"min",field:e.vgField(t),order:"descending"};if(ye(["ascending",void 0],i))return!0}}function r_(e,t){const{aggregate:n,type:r}=e;return n?X(n)&&!Sre.has(n)?{valid:!1,reason:hie(n)}:r==="quantitative"&&t==="log"?{valid:!1,reason:gie(e)}:{valid:!0}:{valid:!1,reason:die(e)}}function By(e,t,n,r){return e.explicit&&t.explicit&&U(vie(n,r,e.value,t.value)),{explicit:e.explicit,value:[...e.value,...t.value]}}function Kce(e){const t=Kr(e.map(s=>{if(Ui(s)){const{sort:o,...u}=s;return u}return s}),be),n=Kr(e.map(s=>{if(Ui(s)){const o=s.sort;return o!==void 0&&!uf(o)&&("op"in o&&o.op==="count"&&delete o.field,o.order==="ascending"&&delete o.order),o}}).filter(s=>s!==void 0),be);if(t.length===0)return;if(t.length===1){const s=e[0];if(Ui(s)&&n.length>0){let o=n[0];if(n.length>1){U(dx);const u=n.filter(c=>V(c)&&"op"in c&&c.op!=="min");n.every(c=>V(c)&&"op"in c)&&u.length===1?o=u[0]:o=!0}else if(V(o)&&"field"in o){const u=o.field;s.field===u&&(o=o.order?{order:o.order}:!0)}return{...s,sort:o}}return s}const r=Kr(n.map(s=>uf(s)||!("op"in s)||X(s.op)&&s.op in xre?s:(U(_ie(s)),!0)),be);let i;r.length===1?i=r[0]:r.length>1&&(U(dx),i=!0);const a=Kr(e.map(s=>Ui(s)?s.data:null),s=>s);return a.length===1&&a[0]!==null?{data:a[0],fields:t.map(o=>o.field),...i?{sort:i}:{}}:{fields:t,...i?{sort:i}:{}}}function e8(e){if(Ui(e)&&X(e.field))return e.field;if($re(e)){let t;for(const n of e.fields)if(Ui(n)&&X(n.field)){if(!t)t=n.field;else if(t!==n.field)return U(wie),t}return U(Eie),t}else if(Are(e)){U(Sie);const t=e.fields[0];return X(t)?t:void 0}}function Wp(e,t){const r=e.component.scales[t].get("domains").map(i=>(Ui(i)&&(i.data=e.lookupDataSource(i.data)),i));return Kce(r)}function tD(e){return wc(e)||t8(e)?e.children.reduce((t,n)=>t.concat(tD(n)),i_(e)):i_(e)}function i_(e){return B(e.component.scales).reduce((t,n)=>{const r=e.component.scales[n];if(r.merged)return t;const i=r.combine(),{name:a,type:s,selectionExtent:o,domains:u,range:c,reverse:l,...f}=i,d=Jce(i.range,a,n,e),h=Wp(e,n),g=o?Hoe(e,o,r,h):null;return t.push({name:a,type:s,...h?{domain:h}:{},...g?{domainRaw:g}:{},range:d,...l!==void 0?{reverse:l}:{},...f}),t},[])}function Jce(e,t,n,r){if(et(n)){if(ds(e))return{step:{signal:`${t}_step`}}}else if(V(e)&&Ui(e))return{...e,data:r.lookupDataSource(e.data)};return e}class nD extends ua{constructor(t,n){super({},{name:t}),this.merged=!1,this.setWithExplicit("type",n)}domainDefinitelyIncludesZero(){return this.get("zero")!==!1?!0:co(this.get("domains"),t=>P(t)&&t.length===2&&we(t[0])&&t[0]<=0&&we(t[1])&&t[1]>=0)}}const Qce=["range","scheme"];function Zce(e){const t=e.component.scales;for(const n of vp){const r=t[n];if(!r)continue;const i=ele(n,e);r.setWithExplicit("range",i)}}function a_(e,t){const n=e.fieldDef(t);if(n!=null&&n.bin){const{bin:r,field:i}=n,a=Sn(t),s=e.getName(a);if(V(r)&&r.binned&&r.step!==void 0)return new ft(()=>{const o=e.scaleName(t),u=`(domain("${o}")[1] - domain("${o}")[0]) / ${r.step}`;return`${e.getSignalName(s)} / (${u})`});if(Be(r)){const o=K6(e,i,r);return new ft(()=>{const u=e.getSignalName(o),c=`(${u}.stop - ${u}.start) / ${u}.step`;return`${e.getSignalName(s)} / (${c})`})}}}function ele(e,t){const n=t.specifiedScales[e],{size:r}=t,a=t.getScaleComponent(e).get("type");for(const f of Qce)if(n[f]!==void 0){const d=Sy(a,f),h=ZM(e,f);if(!d)U(NM(a,f,e));else if(h)U(h);else switch(f){case"range":{const g=n.range;if(P(g)){if(et(e))return Hr(g.map(p=>{if(p==="width"||p==="height"){const m=t.getName(p),b=t.getSignalName.bind(t);return ft.fromName(b,m)}return p}))}else if(V(g))return Hr({data:t.requestDataName(ze.Main),field:g.field,sort:{op:"min",field:t.vgField(e)}});return Hr(g)}case"scheme":return Hr(tle(n[f]))}}const s=e===He||e==="xOffset"?"width":"height",o=r[s];if(fi(o)){if(et(e))if(vt(a)){const f=iD(o,t,e);if(f)return Hr({step:f})}else U(DM(s));else if(Xf(e)){const f=e===ss?"x":"y";if(t.getScaleComponent(f).get("type")==="band"){const g=aD(o,a);if(g)return Hr(g)}}}const{rangeMin:u,rangeMax:c}=n,l=nle(e,t);return(u!==void 0||c!==void 0)&&Sy(a,"rangeMin")&&P(l)&&l.length===2?Hr([u??l[0],c??l[1]]):kn(l)}function tle(e){return cae(e)?{scheme:e.name,...bn(e,["name"])}:{scheme:e}}function rD(e,t,n,{center:r}={}){const i=Sn(e),a=t.getName(i),s=t.getSignalName.bind(t);return e===_t&&Un(n)?r?[ft.fromName(o=>`${s(o)}/2`,a),ft.fromName(o=>`-${s(o)}/2`,a)]:[ft.fromName(s,a),0]:r?[ft.fromName(o=>`-${s(o)}/2`,a),ft.fromName(o=>`${s(o)}/2`,a)]:[0,ft.fromName(s,a)]}function nle(e,t){const{size:n,config:r,mark:i,encoding:a}=t,{type:s}=st(a[e]),u=t.getScaleComponent(e).get("type"),{domain:c,domainMid:l}=t.specifiedScales[e];switch(e){case He:case _t:{if(ye(["point","band"],u)){const f=sD(e,n,r.view);if(fi(f))return{step:iD(f,t,e)}}return rD(e,t,u)}case ss:case mc:return rle(e,t,u);case ia:{const f=t.component.scales[e].get("zero"),d=oD(i,f,r),h=sle(i,n,t,r);return Wu(u)?ale(d,h,ile(u,r,c,e)):[d,h]}case or:return[0,Math.PI*2];case Mo:return[0,360];case Rr:return[0,new ft(()=>{const f=t.getSignalName(Ln(t.parent)?"child_width":"width"),d=t.getSignalName(Ln(t.parent)?"child_height":"height");return`min(${f},${d})/2`})];case cs:return[r.scale.minStrokeWidth,r.scale.maxStrokeWidth];case ls:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case En:return"symbol";case wn:case vi:case xi:return u==="ordinal"?s==="nominal"?"category":"ordinal":l!==void 0?"diverging":i==="rect"||i==="geoshape"?"heatmap":"ramp";case aa:case os:case us:return[r.scale.minOpacity,r.scale.maxOpacity]}}function iD(e,t,n){const{encoding:r}=t,i=t.getScaleComponent(n),a=V7(n),s=r[a];if(WT({step:e,offsetIsDiscrete:ue(s)&&YM(s.type)})==="offset"&&$T(r,a)){const u=t.getScaleComponent(a);let l=`domain('${t.scaleName(a)}').length`;if(u.get("type")==="band"){const d=u.get("paddingInner")??u.get("padding")??0,h=u.get("paddingOuter")??u.get("padding")??0;l=`bandspace(${l}, ${d}, ${h})`}const f=i.get("paddingInner")??i.get("padding");return{signal:`${e.step} * ${l} / (1-${Mre(f)})`}}else return e.step}function aD(e,t){if(WT({step:e,offsetIsDiscrete:vt(t)})==="offset")return{step:e.step}}function rle(e,t,n){const r=e===ss?"x":"y",i=t.getScaleComponent(r);if(!i)return rD(r,t,n,{center:!0});const a=i.get("type"),s=t.scaleName(r),{markDef:o,config:u}=t;if(a==="band"){const c=sD(r,t.size,t.config.view);if(fi(c)){const l=aD(c,n);if(l)return l}return[0,{signal:`bandwidth('${s}')`}]}else{const c=t.encoding[r];if(j(c)&&c.timeUnit){const l=qM(c.timeUnit,g=>`scale('${s}', ${g})`),f=t.config.scale.bandWithNestedOffsetPaddingInner,d=Xa({fieldDef:c,markDef:o,config:u})-.5,h=d!==0?` + ${d}`:"";if(f){const g=Q(f)?`${f.signal}/2`+h:`${f/2+d}`,p=Q(f)?`(1 - ${f.signal}/2)`+h:`${1-f/2+d}`;return[{signal:`${g} * (${l})`},{signal:`${p} * (${l})`}]}return[0,{signal:l}]}return ZF(`Cannot use ${e} scale if ${r} scale is not discrete.`)}}function sD(e,t,n){const r=e===He?"width":"height",i=t[r];return i||q0(n,r)}function ile(e,t,n,r){switch(e){case"quantile":return t.scale.quantileCount;case"quantize":return t.scale.quantizeCount;case"threshold":return n!==void 0&&P(n)?n.length+1:(U(Die(r)),3)}}function ale(e,t,n){const r=()=>{const i=_r(t),a=_r(e),s=`(${i} - ${a}) / (${n} - 1)`;return`sequence(${a}, ${i} + ${s}, ${s})`};return Q(t)?new ft(r):{signal:r()}}function oD(e,t,n){if(t)return Q(t)?{signal:`${t.signal} ? 0 : ${oD(e,!1,n)}`}:0;switch(e){case"bar":case"tick":return n.scale.minBandSize;case"line":case"trail":case"rule":return n.scale.minStrokeWidth;case"text":return n.scale.minFontSize;case"point":case"square":case"circle":return n.scale.minSize}throw new Error(_p("size",e))}const s_=.95;function sle(e,t,n,r){const i={x:a_(n,"x"),y:a_(n,"y")};switch(e){case"bar":case"tick":{if(r.scale.maxBandSize!==void 0)return r.scale.maxBandSize;const a=o_(t,i,r.view);return we(a)?a-1:new ft(()=>`${a.signal} - 1`)}case"line":case"trail":case"rule":return r.scale.maxStrokeWidth;case"text":return r.scale.maxFontSize;case"point":case"square":case"circle":{if(r.scale.maxSize)return r.scale.maxSize;const a=o_(t,i,r.view);return we(a)?Math.pow(s_*a,2):new ft(()=>`pow(${s_} * ${a.signal}, 2)`)}}throw new Error(_p("size",e))}function o_(e,t,n){const r=fi(e.width)?e.width.step:j0(n,"width"),i=fi(e.height)?e.height.step:j0(n,"height");return t.x||t.y?new ft(()=>`min(${[t.x?t.x.signal:r,t.y?t.y.signal:i].join(", ")})`):Math.min(r,i)}function uD(e,t){Ve(e)?ole(e,t):lD(e,t)}function ole(e,t){const n=e.component.scales,{config:r,encoding:i,markDef:a,specifiedScales:s}=e;for(const o of B(n)){const u=s[o],c=n[o],l=e.getScaleComponent(o),f=st(i[o]),d=u[t],h=l.get("type"),g=l.get("padding"),p=l.get("paddingInner"),m=Sy(h,t),b=ZM(o,t);if(d!==void 0&&(m?b&&U(b):U(NM(h,t,o))),m&&b===void 0)if(d!==void 0){const y=f.timeUnit,v=f.type;switch(t){case"domainMax":case"domainMin":Do(u[t])||v==="temporal"||y?c.set(t,{signal:Np(u[t],{type:v,timeUnit:y})},!0):c.set(t,u[t],!0);break;default:c.copyKeyFromObject(t,u)}}else{const y=t in u_?u_[t]({model:e,channel:o,fieldOrDatumDef:f,scaleType:h,scalePadding:g,scalePaddingInner:p,domain:u.domain,domainMin:u.domainMin,domainMax:u.domainMax,markDef:a,config:r,hasNestedOffsetScale:AT(i,o),hasSecondaryRangeChannel:!!i[_i(o)]}):r.scale[t];y!==void 0&&c.set(t,y,!1)}}}const u_={bins:({model:e,fieldOrDatumDef:t})=>j(t)?ule(e,t):void 0,interpolate:({channel:e,fieldOrDatumDef:t})=>cle(e,t.type),nice:({scaleType:e,channel:t,domain:n,domainMin:r,domainMax:i,fieldOrDatumDef:a})=>lle(e,t,n,r,i,a),padding:({channel:e,scaleType:t,fieldOrDatumDef:n,markDef:r,config:i})=>fle(e,t,i.scale,n,r,i.bar),paddingInner:({scalePadding:e,channel:t,markDef:n,scaleType:r,config:i,hasNestedOffsetScale:a})=>dle(e,t,n.type,r,i.scale,a),paddingOuter:({scalePadding:e,channel:t,scaleType:n,scalePaddingInner:r,config:i,hasNestedOffsetScale:a})=>hle(e,t,n,r,i.scale,a),reverse:({fieldOrDatumDef:e,scaleType:t,channel:n,config:r})=>{const i=j(e)?e.sort:void 0;return gle(t,i,n,r.scale)},zero:({channel:e,fieldOrDatumDef:t,domain:n,markDef:r,scaleType:i,config:a,hasSecondaryRangeChannel:s})=>ple(e,t,n,r,i,a.scale,s)};function cD(e){Ve(e)?Zce(e):lD(e,"range")}function lD(e,t){const n=e.component.scales;for(const r of e.children)t==="range"?cD(r):uD(r,t);for(const r of B(n)){let i;for(const a of e.children){const s=a.component.scales[r];if(s){const o=s.getWithExplicit(t);i=Va(i,o,t,"scale",rN((u,c)=>{switch(t){case"range":return u.step&&c.step?u.step-c.step:0}return 0}))}}n[r].setWithExplicit(t,i)}}function ule(e,t){const n=t.bin;if(Be(n)){const r=K6(e,t.field,n);return new ft(()=>e.getSignalName(r))}else if(Et(n)&&No(n)&&n.step!==void 0)return{step:n.step}}function cle(e,t){if(ye([wn,vi,xi],e)&&t!=="nominal")return"hcl"}function lle(e,t,n,r,i,a){var s;if(!((s=li(a))!=null&&s.bin||P(n)||i!=null||r!=null||ye([yn.TIME,yn.UTC],e)))return et(t)?!0:void 0}function fle(e,t,n,r,i,a){if(et(e)){if(wr(t)){if(n.continuousPadding!==void 0)return n.continuousPadding;const{type:s,orient:o}=i;if(s==="bar"&&!(j(r)&&(r.bin||r.timeUnit))&&(o==="vertical"&&e==="x"||o==="horizontal"&&e==="y"))return a.continuousBandSize}if(t===yn.POINT)return n.pointPadding}}function dle(e,t,n,r,i,a=!1){if(e===void 0){if(et(t)){const{bandPaddingInner:s,barBandPaddingInner:o,rectBandPaddingInner:u,bandWithNestedOffsetPaddingInner:c}=i;return a?c:Ze(s,n==="bar"?o:u)}else if(Xf(t)&&r===yn.BAND)return i.offsetBandPaddingInner}}function hle(e,t,n,r,i,a=!1){if(e===void 0){if(et(t)){const{bandPaddingOuter:s,bandWithNestedOffsetPaddingOuter:o}=i;if(a)return o;if(n===yn.BAND)return Ze(s,Q(r)?{signal:`${r.signal}/2`}:r/2)}else if(Xf(t)){if(n===yn.POINT)return .5;if(n===yn.BAND)return i.offsetBandPaddingOuter}}}function gle(e,t,n,r){if(n==="x"&&r.xReverse!==void 0)return Un(e)&&t==="descending"?Q(r.xReverse)?{signal:`!${r.xReverse.signal}`}:!r.xReverse:r.xReverse;if(Un(e)&&t==="descending")return!0}function ple(e,t,n,r,i,a,s){if(!!n&&n!=="unaggregated"&&Un(i)){if(P(n)){const u=n[0],c=n[n.length-1];if(we(u)&&u<=0&&we(c)&&c>=0)return!0}return!1}if(e==="size"&&t.type==="quantitative"&&!Wu(i))return!0;if(!(j(t)&&t.bin)&&ye([...wi,...dre],e)){const{orient:u,type:c}=r;return ye(["bar","area","line","trail"],c)&&(u==="horizontal"&&e==="y"||u==="vertical"&&e==="x")?!1:ye(["bar","area"],c)&&!s?!0:a==null?void 0:a.zero}return!1}function mle(e,t,n,r,i=!1){const a=ble(t,n,r,i),{type:s}=e;return sa(t)?s!==void 0?mae(t,s)?j(n)&&!pae(s,n.type)?(U(bie(s,a)),a):s:(U(mie(t,s,a)),a):a:null}function ble(e,t,n,r){var i;switch(t.type){case"nominal":case"ordinal":{if(gu(e)||lm(e)==="discrete")return e==="shape"&&t.type==="ordinal"&&U(fm(e,"ordinal")),"ordinal";if(et(e)||Xf(e)){if(ye(["rect","bar","image","rule"],n.type)||r)return"band"}else if(n.type==="arc"&&e in Q7)return"band";const a=n[Sn(e)];return po(a)||Gu(t)&&((i=t.axis)!=null&&i.tickBand)?"band":"point"}case"temporal":return gu(e)?"time":lm(e)==="discrete"?(U(fm(e,"temporal")),"ordinal"):j(t)&&t.timeUnit&&yt(t.timeUnit).utc?"utc":"time";case"quantitative":return gu(e)?j(t)&&Be(t.bin)?"bin-ordinal":"linear":lm(e)==="discrete"?(U(fm(e,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(MM(t.type))}function yle(e,{ignoreRange:t}={}){fD(e),eD(e);for(const n of gae)uD(e,n);t||cD(e)}function fD(e){Ve(e)?e.component.scales=vle(e):e.component.scales=_le(e)}function vle(e){const{encoding:t,mark:n,markDef:r}=e,i={};for(const a of vp){const s=st(t[a]);if(s&&n===nT&&a===En&&s.type===bc)continue;let o=s&&s.scale;if(s&&o!==null&&o!==!1){o??(o={});const u=AT(t,a),c=mle(o,a,s,r,u);i[a]=new nD(e.scaleName(`${a}`,!0),{value:c,explicit:o.type===c})}}return i}const xle=rN((e,t)=>gx(e)-gx(t));function _le(e){var t;const n=e.component.scales={},r={},i=e.component.resolve;for(const a of e.children){fD(a);for(const s of B(a.component.scales))if((t=i.scale)[s]??(t[s]=UN(s,e)),i.scale[s]==="shared"){const o=r[s],u=a.component.scales[s].getWithExplicit("type");o?iae(o.value,u.value)?r[s]=Va(o,u,"type","scale",xle):(i.scale[s]="independent",delete r[s]):r[s]=u}}for(const a of B(r)){const s=e.scaleName(a,!0),o=r[a];n[a]=new nD(s,o);for(const u of e.children){const c=u.component.scales[a];c&&(u.renameScale(c.get("name"),s),c.merged=!0)}}return n}class xm{constructor(){this.nameMap={}}rename(t,n){this.nameMap[t]=n}has(t){return this.nameMap[t]!==void 0}get(t){for(;this.nameMap[t]&&t!==this.nameMap[t];)t=this.nameMap[t];return t}}function Ve(e){return(e==null?void 0:e.type)==="unit"}function Ln(e){return(e==null?void 0:e.type)==="facet"}function t8(e){return(e==null?void 0:e.type)==="concat"}function wc(e){return(e==null?void 0:e.type)==="layer"}class n8{constructor(t,n,r,i,a,s,o){this.type=n,this.parent=r,this.config=a,this.correctDataNames=u=>{var c,l,f;return(c=u.from)!=null&&c.data&&(u.from.data=this.lookupDataSource(u.from.data)),(f=(l=u.from)==null?void 0:l.facet)!=null&&f.data&&(u.from.facet.data=this.lookupDataSource(u.from.facet.data)),u},this.parent=r,this.config=a,this.view=gn(o),this.name=t.name??i,this.title=ba(t.title)?{text:t.title}:t.title?gn(t.title):void 0,this.scaleNameMap=r?r.scaleNameMap:new xm,this.projectionNameMap=r?r.projectionNameMap:new xm,this.signalNameMap=r?r.signalNameMap:new xm,this.data=t.data,this.description=t.description,this.transforms=Coe(t.transform??[]),this.layout=n==="layer"||n==="unit"?{}:Nse(t,n,a),this.component={data:{sources:r?r.component.data.sources:[],outputNodes:r?r.component.data.outputNodes:{},outputNodeRefCounts:r?r.component.data.outputNodeRefCounts:{},isFaceted:Cp(t)||(r==null?void 0:r.component.data.isFaceted)&&t.data===void 0},layoutSize:new ua,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:{scale:{},axis:{},legend:{},...s?oe(s):{}},selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){yle(this)}parseProjection(){JN(this)}renameTopLevelLayoutSizeSignal(){this.getName("width")!=="width"&&this.renameSignal(this.getName("width"),"width"),this.getName("height")!=="height"&&this.renameSignal(this.getName("height"),"height")}parseLegends(){GN(this)}assembleEncodeFromView(t){const{style:n,...r}=t,i={};for(const a of B(r)){const s=r[a];s!==void 0&&(i[a]=je(s))}return i}assembleGroupEncodeEntry(t){let n={};return this.view&&(n=this.assembleEncodeFromView(this.view)),!t&&(this.description&&(n.description=je(this.description)),this.type==="unit"||this.type==="layer")?{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height"),...n}:Oe(n)?void 0:n}assembleLayout(){if(!this.layout)return;const{spacing:t,...n}=this.layout,{component:r,config:i}=this,a=jue(r.layoutHeaders,i);return{padding:t,...this.assembleDefaultLayout(),...n,...a?{titleBand:a}:{}}}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:t}=this.component;let n=[];for(const r of Kn)t[r].title&&n.push(Lue(this,r));for(const r of G6)n=n.concat(Pue(this,r));return n}assembleAxes(){return Eue(this.component.axes,this.config)}assembleLegends(){return XN(this)}assembleProjections(){return fce(this)}assembleTitle(){const{encoding:t,...n}=this.title??{},r={..._M(this.config.title).nonMarkTitleProperties,...n,...t?{encode:{update:t}}:{}};if(r.text)return ye(["unit","layer"],this.type)?ye(["middle",void 0],r.anchor)&&(r.frame??(r.frame="group")):r.anchor??(r.anchor="start"),Oe(r)?void 0:r}assembleGroup(t=[]){const n={};t=t.concat(this.assembleSignals()),t.length>0&&(n.signals=t);const r=this.assembleLayout();r&&(n.layout=r),n.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const i=!this.parent||Ln(this.parent)?tD(this):[];i.length>0&&(n.scales=i);const a=this.assembleAxes();a.length>0&&(n.axes=a);const s=this.assembleLegends();return s.length>0&&(n.legends=s),n}getName(t){return We((this.name?`${this.name}_`:"")+t)}getDataName(t){return this.getName(ze[t].toLowerCase())}requestDataName(t){const n=this.getDataName(t),r=this.component.data.outputNodeRefCounts;return r[n]=(r[n]||0)+1,n}getSizeSignalRef(t){if(Ln(this.parent)){const n=zN(t),r=yp(n),i=this.component.scales[r];if(i&&!i.merged){const a=i.get("type"),s=i.get("range");if(vt(a)&&ds(s)){const o=i.get("name"),u=Wp(this,r),c=e8(u);if(c){const l=G({aggregate:"distinct",field:c},{expr:"datum"});return{signal:IN(o,i,l)}}else return U(t6(r)),null}}}return{signal:this.signalNameMap.get(this.getName(t))}}lookupDataSource(t){const n=this.component.data.outputNodes[t];return n?n.getSource():t}getSignalName(t){return this.signalNameMap.get(t)}renameSignal(t,n){this.signalNameMap.rename(t,n)}renameScale(t,n){this.scaleNameMap.rename(t,n)}renameProjection(t,n){this.projectionNameMap.rename(t,n)}scaleName(t,n){if(n)return this.getName(t);if(dM(t)&&sa(t)&&this.component.scales[t]||this.scaleNameMap.has(this.getName(t)))return this.scaleNameMap.get(this.getName(t))}projectionName(t){if(t)return this.getName("projection");if(this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection")))return this.projectionNameMap.get(this.getName("projection"))}getScaleComponent(t){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const n=this.component.scales[t];return n&&!n.merged?n:this.parent?this.parent.getScaleComponent(t):void 0}getSelectionComponent(t,n){let r=this.component.selection[t];if(!r&&this.parent&&(r=this.parent.getSelectionComponent(t,n)),!r)throw new Error(Rre(n));return r}hasAxisOrientSignalRef(){var t,n;return((t=this.component.axes.x)==null?void 0:t.some(r=>r.hasOrientSignalRef()))||((n=this.component.axes.y)==null?void 0:n.some(r=>r.hasOrientSignalRef()))}}class dD extends n8{vgField(t,n={}){const r=this.fieldDef(t);if(r)return G(r,n)}reduceFieldDef(t,n){return ose(this.getMapping(),(r,i,a)=>{const s=li(i);return s?t(r,s,a):r},n)}forEachFieldDef(t,n){C6(this.getMapping(),(r,i)=>{const a=li(r);a&&t(a,i)},n)}}class Hp extends De{clone(){return new Hp(null,oe(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=oe(n);const r=this.transform.as??[void 0,void 0];this.transform.as=[r[0]??"value",r[1]??"density"]}dependentFields(){return new Set([this.transform.density,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${be(this.transform)}`}assemble(){const{density:t,...n}=this.transform,r={type:"kde",field:t,...n};return this.transform.groupby&&(r.resolve="shared"),r}}class Gp extends De{clone(){return new Gp(null,oe(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=oe(n)}dependentFields(){return new Set([this.transform.extent])}producedFields(){return new Set([])}hash(){return`ExtentTransform ${be(this.transform)}`}assemble(){const{extent:t,param:n}=this.transform;return{type:"extent",field:t,signal:n}}}class df extends De{clone(){return new df(null,{...this.filter})}constructor(t,n){super(t),this.filter=n}static make(t,n){const{config:r,mark:i,markDef:a}=n;if(Fe("invalid",a,r)!=="filter")return null;const o=n.reduceFieldDef((u,c,l)=>{const f=sa(l)&&n.getScaleComponent(l);if(f){const d=f.get("type");Un(d)&&c.aggregate!=="count"&&!hs(i)&&(u[c.field]=c)}return u},{});return B(o).length?new df(t,o):null}dependentFields(){return new Set(B(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${be(this.filter)}`}assemble(){const t=B(this.filter).reduce((n,r)=>{const i=this.filter[r],a=G(i,{expr:"datum"});return i!==null&&(i.type==="temporal"?n.push(`(isDate(${a}) || (isValid(${a}) && isFinite(+${a})))`):i.type==="quantitative"&&(n.push(`isValid(${a})`),n.push(`isFinite(+${a})`))),n},[]);return t.length>0?{type:"filter",expr:t.join(" && ")}:null}}class Yp extends De{clone(){return new Yp(this.parent,oe(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=oe(n);const{flatten:r,as:i=[]}=this.transform;this.transform.as=r.map((a,s)=>i[s]??a)}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${be(this.transform)}`}assemble(){const{flatten:t,as:n}=this.transform;return{type:"flatten",fields:t,as:n}}}class Xp extends De{clone(){return new Xp(null,oe(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=oe(n);const r=this.transform.as??[void 0,void 0];this.transform.as=[r[0]??"key",r[1]??"value"]}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${be(this.transform)}`}assemble(){const{fold:t,as:n}=this.transform;return{type:"fold",fields:t,as:n}}}class bu extends De{clone(){return new bu(null,oe(this.fields),this.geojson,this.signal)}static parseAll(t,n){if(n.component.projection&&!n.component.projection.isFit)return t;let r=0;for(const i of[[Pr,Lr],[ar,Ir]]){const a=i.map(s=>{const o=st(n.encoding[s]);return j(o)?o.field:Ei(o)?{expr:`${o.datum}`}:Fr(o)?{expr:`${o.value}`}:void 0});(a[0]||a[1])&&(t=new bu(t,a,null,n.getName(`geojson_${r++}`)))}if(n.channelHasField(En)){const i=n.typedFieldDef(En);i.type===bc&&(t=new bu(t,null,i.field,n.getName(`geojson_${r++}`)))}return t}constructor(t,n,r,i){super(t),this.fields=n,this.geojson=r,this.signal=i}dependentFields(){const t=(this.fields??[]).filter(X);return new Set([...this.geojson?[this.geojson]:[],...t])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${be(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],{type:"geojson",...this.fields?{fields:this.fields}:{},...this.geojson?{geojson:this.geojson}:{},signal:this.signal}]}}class hf extends De{clone(){return new hf(null,this.projection,oe(this.fields),oe(this.as))}constructor(t,n,r,i){super(t),this.projection=n,this.fields=r,this.as=i}static parseAll(t,n){if(!n.projectionName())return t;for(const r of[[Pr,Lr],[ar,Ir]]){const i=r.map(s=>{const o=st(n.encoding[s]);return j(o)?o.field:Ei(o)?{expr:`${o.datum}`}:Fr(o)?{expr:`${o.value}`}:void 0}),a=r[0]===ar?"2":"";(i[0]||i[1])&&(t=new hf(t,n.projectionName(),i,[n.getName(`x${a}`),n.getName(`y${a}`)]))}return t}dependentFields(){return new Set(this.fields.filter(X))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${be(this.fields)} ${be(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class Ks extends De{clone(){return new Ks(null,oe(this.transform))}constructor(t,n){super(t),this.transform=n}dependentFields(){return new Set([this.transform.impute,this.transform.key,...this.transform.groupby??[]])}producedFields(){return new Set([this.transform.impute])}processSequence(t){const{start:n=0,stop:r,step:i}=t;return{signal:`sequence(${[n,r,...i?[i]:[]].join(",")})`}}static makeFromTransform(t,n){return new Ks(t,n)}static makeFromEncoding(t,n){const r=n.encoding,i=r.x,a=r.y;if(j(i)&&j(a)){const s=i.impute?i:a.impute?a:void 0;if(s===void 0)return;const o=i.impute?a:a.impute?i:void 0,{method:u,value:c,frame:l,keyvals:f}=s.impute,d=CT(n.mark,r);return new Ks(t,{impute:s.field,key:o.field,...u?{method:u}:{},...c!==void 0?{value:c}:{},...l?{frame:l}:{},...f!==void 0?{keyvals:f}:{},...d.length?{groupby:d}:{}})}return null}hash(){return`Impute ${be(this.transform)}`}assemble(){const{impute:t,key:n,keyvals:r,method:i,groupby:a,value:s,frame:o=[null,null]}=this.transform,u={type:"impute",field:t,key:n,...r?{keyvals:coe(r)?this.processSequence(r):r}:{},method:"value",...a?{groupby:a}:{},value:!i||i==="value"?s:null};if(i&&i!=="value"){const c={type:"window",as:[`imputed_${t}_value`],ops:[i],fields:[t],frame:o,ignorePeers:!1,...a?{groupby:a}:{}},l={type:"formula",expr:`datum.${t} === null ? datum.imputed_${t}_value : datum.${t}`,as:t};return[u,c,l]}else return[u]}}class Vp extends De{clone(){return new Vp(null,oe(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=oe(n);const r=this.transform.as??[void 0,void 0];this.transform.as=[r[0]??n.on,r[1]??n.loess]}dependentFields(){return new Set([this.transform.loess,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${be(this.transform)}`}assemble(){const{loess:t,on:n,...r}=this.transform;return{type:"loess",x:n,y:t,...r}}}class gf extends De{clone(){return new gf(null,oe(this.transform),this.secondary)}constructor(t,n,r){super(t),this.transform=n,this.secondary=r}static make(t,n,r,i){const a=n.component.data.sources,{from:s}=r;let o=null;if(loe(s)){let u=pD(s.data,a);u||(u=new vo(s.data),a.push(u));const c=n.getName(`lookup_${i}`);o=new an(u,c,ze.Lookup,n.component.data.outputNodeRefCounts),n.component.data.outputNodes[c]=o}else if(foe(s)){const u=s.param;r={as:u,...r};let c;try{c=n.getSelectionComponent(We(u),u)}catch{throw new Error(zre(u))}if(o=c.materialized,!o)throw new Error(Bre(u))}return new gf(t,r,o.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?Y(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${be({transform:this.transform,secondary:this.secondary})}`}assemble(){let t;if(this.transform.from.fields)t={values:this.transform.from.fields,...this.transform.as?{as:Y(this.transform.as)}:{}};else{let n=this.transform.as;X(n)||(U(Xre),n="_lookup"),t={as:[n]}}return{type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup],...t,...this.transform.default?{default:this.transform.default}:{}}}}class Kp extends De{clone(){return new Kp(null,oe(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=oe(n);const r=this.transform.as??[void 0,void 0];this.transform.as=[r[0]??"prob",r[1]??"value"]}dependentFields(){return new Set([this.transform.quantile,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${be(this.transform)}`}assemble(){const{quantile:t,...n}=this.transform;return{type:"quantile",field:t,...n}}}class Jp extends De{clone(){return new Jp(null,oe(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=oe(n);const r=this.transform.as??[void 0,void 0];this.transform.as=[r[0]??n.on,r[1]??n.regression]}dependentFields(){return new Set([this.transform.regression,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${be(this.transform)}`}assemble(){const{regression:t,on:n,...r}=this.transform;return{type:"regression",x:n,y:t,...r}}}class Qp extends De{clone(){return new Qp(null,oe(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=Kr((this.transform.groupby??[]).concat(t),n=>n)}producedFields(){}dependentFields(){return new Set([this.transform.pivot,this.transform.value,...this.transform.groupby??[]])}hash(){return`PivotTransform ${be(this.transform)}`}assemble(){const{pivot:t,value:n,groupby:r,limit:i,op:a}=this.transform;return{type:"pivot",field:t,value:n,...i!==void 0?{limit:i}:{},...a!==void 0?{op:a}:{},...r!==void 0?{groupby:r}:{}}}}class Zp extends De{clone(){return new Zp(null,oe(this.transform))}constructor(t,n){super(t),this.transform=n}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${be(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function hD(e){let t=0;function n(r,i){if(r instanceof vo&&!r.isGenerator&&!Xu(r.data)&&(e.push(i),i={name:null,source:i.name,transform:[]}),r instanceof zt&&(r.parent instanceof vo&&!i.source?(i.format={...i.format,parse:r.assembleFormatParse()},i.transform.push(...r.assembleTransforms(!0))):i.transform.push(...r.assembleTransforms())),r instanceof xc){i.name||(i.name=`data_${t++}`),!i.source||i.transform.length>0?(e.push(i),r.data=i.name):r.data=i.source,e.push(...r.assemble());return}switch((r instanceof rd||r instanceof id||r instanceof df||r instanceof vc||r instanceof Ku||r instanceof hf||r instanceof $r||r instanceof gf||r instanceof _c||r instanceof Po||r instanceof Xp||r instanceof Yp||r instanceof Hp||r instanceof Vp||r instanceof Kp||r instanceof Jp||r instanceof Qa||r instanceof Zp||r instanceof Qp||r instanceof Gp)&&i.transform.push(r.assemble()),(r instanceof ni||r instanceof ti||r instanceof Ks||r instanceof Xi||r instanceof bu)&&i.transform.push(...r.assemble()),r instanceof an&&(i.source&&i.transform.length===0?r.setSource(i.source):r.parent instanceof an?r.setSource(i.name):(i.name||(i.name=`data_${t++}`),r.setSource(i.name),r.numChildren()===1&&(e.push(i),i={name:null,source:i.name,transform:[]}))),r.numChildren()){case 0:r instanceof an&&(!i.source||i.transform.length>0)&&e.push(i);break;case 1:n(r.children[0],i);break;default:{i.name||(i.name=`data_${t++}`);let a=i.name;!i.source||i.transform.length>0?e.push(i):a=i.source;for(const s of r.children)n(s,{name:null,source:a,transform:[]});break}}}return n}function wle(e){const t=[],n=hD(t);for(const r of e.children)n(r,{source:e.name,name:null,transform:[]});return t}function Ele(e,t){const n=[],r=hD(n);let i=0;for(const s of e.sources){s.hasName()||(s.dataName=`source_${i++}`);const o=s.assemble();r(s,o)}for(const s of n)s.transform.length===0&&delete s.transform;let a=0;for(const[s,o]of n.entries())(o.transform??[]).length===0&&!o.source&&n.splice(a++,0,n.splice(s,1)[0]);for(const s of n)for(const o of s.transform??[])o.type==="lookup"&&(o.from=e.outputNodes[o.from].getSource());for(const s of n)s.name in t&&(s.values=t[s.name]);return n}function Sle(e){return e==="top"||e==="left"||Q(e)?"header":"footer"}function $le(e){for(const t of Kn)Ale(e,t);c_(e,"x"),c_(e,"y")}function Ale(e,t){var s;const{facet:n,config:r,child:i,component:a}=e;if(e.channelHasField(t)){const o=n[t],u=Qu("title",null,r,t);let c=pu(o,r,{allowDisabling:!0,includeDefault:u===void 0||!!u});i.component.layoutHeaders[t].title&&(c=P(c)?c.join(", "):c,c+=` / ${i.component.layoutHeaders[t].title}`,i.component.layoutHeaders[t].title=null);const l=Qu("labelOrient",o.header,r,t),f=o.header!==null?Ze((s=o.header)==null?void 0:s.labels,r.header.labels,!0):!1,d=ye(["bottom","right"],l)?"footer":"header";a.layoutHeaders[t]={title:o.header!==null?c:null,facetFieldDef:o,[d]:t==="facet"?[]:[gD(e,t,f)]}}}function gD(e,t,n){const r=t==="row"?"height":"width";return{labels:n,sizeSignal:e.child.component.layoutSize.get(r)?e.child.getSizeSignalRef(r):void 0,axes:[]}}function c_(e,t){const{child:n}=e;if(n.component.axes[t]){const{layoutHeaders:r,resolve:i}=e.component;if(i.axis[t]=V6(i,t),i.axis[t]==="shared"){const a=t==="x"?"column":"row",s=r[a];for(const o of n.component.axes[t]){const u=Sle(o.get("orient"));s[u]??(s[u]=[gD(e,a,!1)]);const c=bl(o,"main",e.config,{header:!0});c&&s[u][0].axes.push(c),o.mainExtracted=!0}}}}function kle(e){r8(e),Y0(e,"width"),Y0(e,"height")}function Cle(e){r8(e);const t=e.layout.columns===1?"width":"childWidth",n=e.layout.columns===void 0?"height":"childHeight";Y0(e,t),Y0(e,n)}function r8(e){for(const t of e.children)t.parseLayoutSize()}function Y0(e,t){const n=zN(t),r=yp(n),i=e.component.resolve,a=e.component.layoutSize;let s;for(const o of e.children){const u=o.component.layoutSize.getWithExplicit(n),c=i.scale[r]??UN(r,e);if(c==="independent"&&u.value==="step"){s=void 0;break}if(s){if(c==="independent"&&s.value!==u.value){s=void 0;break}s=Va(s,u,n,"")}else s=u}if(s){for(const o of e.children)e.renameSignal(o.getName(n),e.getName(t)),o.component.layoutSize.set(n,"merged",!1);a.setWithExplicit(t,s)}else a.setWithExplicit(t,{explicit:!1,value:void 0})}function Fle(e){const{size:t,component:n}=e;for(const r of wi){const i=Sn(r);if(t[i]){const a=t[i];n.layoutSize.set(i,fi(a)?"step":a,!0)}else{const a=Mle(e,i);n.layoutSize.set(i,a,!1)}}}function Mle(e,t){const n=t==="width"?"x":"y",r=e.config,i=e.getScaleComponent(n);if(i){const a=i.get("type"),s=i.get("range");if(vt(a)){const o=q0(r.view,t);return ds(s)||fi(o)?"step":o}else return ky(r.view,t)}else{if(e.hasProjection||e.mark==="arc")return ky(r.view,t);{const a=q0(r.view,t);return fi(a)?a.step:a}}}function Uy(e,t,n){return G(t,{suffix:`by_${G(e)}`,...n})}class Dl extends dD{constructor(t,n,r,i){super(t,"facet",n,r,i,t.resolve),this.child=u8(t.spec,this,this.getName("child"),void 0,i),this.children=[this.child],this.facet=this.initFacet(t.facet)}initFacet(t){if(!Qf(t))return{facet:this.initFacetFieldDef(t,"facet")};const n=B(t),r={};for(const i of n){if(![Hi,Gi].includes(i)){U(_p(i,"facet"));break}const a=t[i];if(a.field===void 0){U(wy(a,i));break}r[i]=this.initFacetFieldDef(a,i)}return r}initFacetFieldDef(t,n){const r=A6(t,n);return r.header?r.header=gn(r.header):r.header===null&&(r.header=null),r}channelHasField(t){return!!this.facet[t]}fieldDef(t){return this.facet[t]}parseData(){this.component.data=e1(this),this.child.parseData()}parseLayoutSize(){r8(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),$le(this)}assembleSelectionTopLevelSignals(t){return this.child.assembleSelectionTopLevelSignals(t)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(t){return this.child.assembleSelectionData(t)}getHeaderLayoutMixins(){const t={};for(const n of Kn)for(const r of Y6){const i=this.component.layoutHeaders[n],a=i[r],{facetFieldDef:s}=i;if(s){const o=Qu("titleOrient",s.header,this.config,n);if(["right","bottom"].includes(o)){const u=jp(n,o);t.titleAnchor??(t.titleAnchor={}),t.titleAnchor[u]="end"}}if(a!=null&&a[0]){const o=n==="row"?"height":"width",u=r==="header"?"headerBand":"footerBand";n!=="facet"&&!this.child.component.layoutSize.get(o)&&(t[u]??(t[u]={}),t[u][n]=.5),i.title&&(t.offset??(t.offset={}),t.offset[n==="row"?"rowTitle":"columnTitle"]=10)}}return t}assembleDefaultLayout(){const{column:t,row:n}=this.facet,r=t?this.columnDistinctSignal():n?1:void 0;let i="all";return(!n&&this.component.resolve.scale.x==="independent"||!t&&this.component.resolve.scale.y==="independent")&&(i="none"),{...this.getHeaderLayoutMixins(),...r?{columns:r}:{},bounds:"full",align:i}}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof Dl))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(t){return this.parent&&this.parent instanceof Dl?{...this.channelHasField("column")?{encode:{update:{columns:{field:G(this.facet.column,{prefix:"distinct"})}}}}:{},...super.assembleGroup(t)}:super.assembleGroup(t)}getCardinalityAggregateForChild(){const t=[],n=[],r=[];if(this.child instanceof Dl){if(this.child.channelHasField("column")){const i=G(this.child.facet.column);t.push(i),n.push("distinct"),r.push(`distinct_${i}`)}}else for(const i of wi){const a=this.child.component.scales[i];if(a&&!a.merged){const s=a.get("type"),o=a.get("range");if(vt(s)&&ds(o)){const u=Wp(this.child,i),c=e8(u);c?(t.push(c),n.push("distinct"),r.push(`distinct_${c}`)):U(t6(i))}}}return{fields:t,ops:n,as:r}}assembleFacet(){const{name:t,data:n}=this.component.data.facetRoot,{row:r,column:i}=this.facet,{fields:a,ops:s,as:o}=this.getCardinalityAggregateForChild(),u=[];for(const l of Kn){const f=this.facet[l];if(f){u.push(G(f));const{bin:d,sort:h}=f;if(Be(d)&&u.push(G(f,{binSuffix:"end"})),ei(h)){const{field:g,op:p=kp}=h,m=Uy(f,h);r&&i?(a.push(m),s.push("max"),o.push(m)):(a.push(g),s.push(p),o.push(m))}else if(P(h)){const g=Ju(f,l);a.push(g),s.push("max"),o.push(g)}}}const c=!!r&&!!i;return{name:t,data:n,groupby:u,...c||a.length>0?{aggregate:{...c?{cross:c}:{},...a.length?{fields:a,ops:s,as:o}:{}}}:{}}}facetSortFields(t){const{facet:n}=this,r=n[t];return r?ei(r.sort)?[Uy(r,r.sort,{expr:"datum"})]:P(r.sort)?[Ju(r,t,{expr:"datum"})]:[G(r,{expr:"datum"})]:[]}facetSortOrder(t){const{facet:n}=this,r=n[t];if(r){const{sort:i}=r;return[(ei(i)?i.order:!P(i)&&i)||"ascending"]}return[]}assembleLabelTitle(){var i;const{facet:t,config:n}=this;if(t.facet)return Ry(t.facet,"facet",n);const r={row:["top","bottom"],column:["left","right"]};for(const a of G6)if(t[a]){const s=Qu("labelOrient",(i=t[a])==null?void 0:i.header,n,a);if(r[a].includes(s))return Ry(t[a],a,n)}}assembleMarks(){const{child:t}=this,n=this.component.data.facetRoot,r=wle(n),i=t.assembleGroupEncodeEntry(!1),a=this.assembleLabelTitle()||t.assembleTitle(),s=t.assembleGroupStyle();return[{name:this.getName("cell"),type:"group",...a?{title:a}:{},...s?{style:s}:{},from:{facet:this.assembleFacet()},sort:{field:Kn.map(u=>this.facetSortFields(u)).flat(),order:Kn.map(u=>this.facetSortOrder(u)).flat()},...r.length>0?{data:r}:{},...i?{encode:{update:i}}:{},...t.assembleGroup(Uoe(this,[]))}]}getMapping(){return this.facet}}function Tle(e,t){const{row:n,column:r}=t;if(n&&r){let i=null;for(const a of[n,r])if(ei(a.sort)){const{field:s,op:o=kp}=a.sort;e=i=new Po(e,{joinaggregate:[{op:o,field:s,as:Uy(a,a.sort,{forAs:!0})}],groupby:[G(a)]})}return i}return null}function pD(e,t){var n,r,i,a;for(const s of t){const o=s.data;if(e.name&&s.hasName()&&e.name!==s.dataName)continue;const u=(n=e.format)==null?void 0:n.mesh,c=(r=o.format)==null?void 0:r.feature;if(u&&c)continue;const l=(i=e.format)==null?void 0:i.feature;if((l||c)&&l!==c)continue;const f=(a=o.format)==null?void 0:a.mesh;if(!((u||f)&&u!==f)){if(ff(e)&&ff(o)){if(Dn(e.values,o.values))return s}else if(Xu(e)&&Xu(o)){if(e.url===o.url)return s}else if(iN(e)&&e.name===s.dataName)return s}}return null}function Nle(e,t){if(e.data||!e.parent){if(e.data===null){const r=new vo({values:[]});return t.push(r),r}const n=pD(e.data,t);if(n)return Da(e.data)||(n.data.format=eM({},e.data.format,n.data.format)),!n.hasName()&&e.data.name&&(n.dataName=e.data.name),n;{const r=new vo(e.data);return t.push(r),r}}else return e.parent.component.data.facetRoot?e.parent.component.data.facetRoot:e.parent.component.data.main}function Dle(e,t,n){let r=0;for(const i of t.transforms){let a,s;if(_oe(i))s=e=new Ku(e,i),a="derived";else if(z6(i)){const o=Sce(i);s=e=zt.makeWithAncestors(e,{},o,n)??e,e=new vc(e,t,i.filter)}else if(ZT(i))s=e=ni.makeFromTransform(e,i,t),a="number";else if(Eoe(i))a="date",n.getWithExplicit(i.field).value===void 0&&(e=new zt(e,{[i.field]:a}),n.set(i.field,a,!1)),s=e=ti.makeFromTransform(e,i);else if(Soe(i))s=e=$r.makeFromTransform(e,i),a="number",H6(t)&&(e=new Qa(e));else if(QT(i))s=e=gf.make(e,t,i,r++),a="derived";else if(yoe(i))s=e=new _c(e,i),a="number";else if(voe(i))s=e=new Po(e,i),a="number";else if($oe(i))s=e=Xi.makeFromTransform(e,i),a="derived";else if(Aoe(i))s=e=new Xp(e,i),a="derived";else if(koe(i))s=e=new Gp(e,i),a="derived";else if(xoe(i))s=e=new Yp(e,i),a="derived";else if(doe(i))s=e=new Qp(e,i),a="derived";else if(boe(i))e=new Zp(e,i);else if(woe(i))s=e=Ks.makeFromTransform(e,i),a="derived";else if(hoe(i))s=e=new Hp(e,i),a="derived";else if(goe(i))s=e=new Kp(e,i),a="derived";else if(poe(i))s=e=new Jp(e,i),a="derived";else if(moe(i))s=e=new Vp(e,i),a="derived";else{U(Yre(i));continue}if(s&&a!==void 0)for(const o of s.producedFields()??[])n.set(o,a,!1)}return e}function e1(e){var p;let t=Nle(e,e.component.data.sources);const{outputNodes:n,outputNodeRefCounts:r}=e.component.data,i=e.data,s=!(i&&(Da(i)||Xu(i)||ff(i)))&&e.parent?e.parent.component.data.ancestorParse.clone():new zoe;Da(i)?(aN(i)?t=new id(t,i.sequence):B6(i)&&(t=new rd(t,i.graticule)),s.parseNothing=!0):((p=i==null?void 0:i.format)==null?void 0:p.parse)===null&&(s.parseNothing=!0),t=zt.makeExplicit(t,e,s)??t,t=new Qa(t);const o=e.parent&&wc(e.parent);(Ve(e)||Ln(e))&&o&&(t=ni.makeFromEncoding(t,e)??t),e.transforms.length>0&&(t=Dle(t,e,s));const u=Ace(e),c=$ce(e);t=zt.makeWithAncestors(t,{},{...u,...c},s)??t,Ve(e)&&(t=bu.parseAll(t,e),t=hf.parseAll(t,e)),(Ve(e)||Ln(e))&&(o||(t=ni.makeFromEncoding(t,e)??t),t=ti.makeFromEncoding(t,e)??t,t=Ku.parseAllForSortIndex(t,e));const l=e.getDataName(ze.Raw),f=new an(t,l,ze.Raw,r);if(n[l]=f,t=f,Ve(e)){const m=$r.makeFromEncoding(t,e);m&&(t=m,H6(e)&&(t=new Qa(t))),t=Ks.makeFromEncoding(t,e)??t,t=Xi.makeFromEncoding(t,e)??t}Ve(e)&&(t=df.make(t,e)??t);const d=e.getDataName(ze.Main),h=new an(t,d,ze.Main,r);n[d]=h,t=h,Ve(e)&&_ue(e,h);let g=null;if(Ln(e)){const m=e.getName("facet");t=Tle(t,e.facet)??t,g=new xc(t,e,m,h.getSource()),n[m]=g}return{...e.component.data,outputNodes:n,outputNodeRefCounts:r,raw:f,main:h,facetRoot:g,ancestorParse:s}}class Ole extends n8{constructor(t,n,r,i){var a,s,o,u;super(t,"concat",n,r,i,t.resolve),(((s=(a=t.resolve)==null?void 0:a.axis)==null?void 0:s.x)==="shared"||((u=(o=t.resolve)==null?void 0:o.axis)==null?void 0:u.y)==="shared")&&U(Wre),this.children=this.getChildren(t).map((c,l)=>u8(c,this,this.getName(`concat_${l}`),void 0,i))}parseData(){this.component.data=e1(this);for(const t of this.children)t.parseData()}parseSelections(){this.component.selection={};for(const t of this.children){t.parseSelections();for(const n of B(t.component.selection))this.component.selection[n]=t.component.selection[n]}}parseMarkGroup(){for(const t of this.children)t.parseMarkGroup()}parseAxesAndHeaders(){for(const t of this.children)t.parseAxesAndHeaders()}getChildren(t){return Rp(t)?t.vconcat:P6(t)?t.hconcat:t.concat}parseLayoutSize(){Cle(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(t){return this.children.reduce((n,r)=>r.assembleSelectionTopLevelSignals(n),t)}assembleSignals(){return this.children.forEach(t=>t.assembleSignals()),[]}assembleLayoutSignals(){const t=X6(this);for(const n of this.children)t.push(...n.assembleLayoutSignals());return t}assembleSelectionData(t){return this.children.reduce((n,r)=>r.assembleSelectionData(n),t)}assembleMarks(){return this.children.map(t=>{const n=t.assembleTitle(),r=t.assembleGroupStyle(),i=t.assembleGroupEncodeEntry(!1);return{type:"group",name:t.getName("group"),...n?{title:n}:{},...r?{style:r}:{},...i?{encode:{update:i}}:{},...t.assembleGroup()}})}assembleGroupStyle(){}assembleDefaultLayout(){const t=this.layout.columns;return{...t!=null?{columns:t}:{},bounds:"full",align:"each"}}}function Rle(e){return e===!1||e===null}const Lle={disable:1,gridScale:1,scale:1,...ET,labelExpr:1,encode:1},mD=B(Lle);class i8 extends ua{constructor(t={},n={},r=!1){super(),this.explicit=t,this.implicit=n,this.mainExtracted=r}clone(){return new i8(oe(this.explicit),oe(this.implicit),this.mainExtracted)}hasAxisPart(t){return t==="axis"?!0:t==="grid"||t==="title"?!!this.get(t):!Rle(this.get(t))}hasOrientSignalRef(){return Q(this.explicit.orient)}}function Ple(e,t,n){const{encoding:r,config:i}=e,a=st(r[t])??st(r[_i(t)]),s=e.axis(t)||{},{format:o,formatType:u}=s;if(mo(u))return{text:Er({fieldOrDatumDef:a,field:"datum.value",format:o,formatType:u,config:i}),...n};if(o===void 0&&u===void 0&&i.customFormatTypes){if(Hu(a)==="quantitative"){if(Gu(a)&&a.stack==="normalize"&&i.normalizedNumberFormatType)return{text:Er({fieldOrDatumDef:a,field:"datum.value",format:i.normalizedNumberFormat,formatType:i.normalizedNumberFormatType,config:i}),...n};if(i.numberFormatType)return{text:Er({fieldOrDatumDef:a,field:"datum.value",format:i.numberFormat,formatType:i.numberFormatType,config:i}),...n}}if(Hu(a)==="temporal"&&i.timeFormatType&&j(a)&&!a.timeUnit)return{text:Er({fieldOrDatumDef:a,field:"datum.value",format:i.timeFormat,formatType:i.timeFormatType,config:i}),...n}}return n}function Ile(e){return wi.reduce((t,n)=>(e.component.scales[n]&&(t[n]=[Hle(n,e)]),t),{})}const zle={bottom:"top",top:"bottom",left:"right",right:"left"};function Ble(e){const{axes:t,resolve:n}=e.component,r={top:0,bottom:0,right:0,left:0};for(const i of e.children){i.parseAxesAndHeaders();for(const a of B(i.component.axes))n.axis[a]=V6(e.component.resolve,a),n.axis[a]==="shared"&&(t[a]=Ule(t[a],i.component.axes[a]),t[a]||(n.axis[a]="independent",delete t[a]))}for(const i of wi){for(const a of e.children)if(a.component.axes[i]){if(n.axis[i]==="independent"){t[i]=(t[i]??[]).concat(a.component.axes[i]);for(const s of a.component.axes[i]){const{value:o,explicit:u}=s.getWithExplicit("orient");if(!Q(o)){if(r[o]>0&&!u){const c=zle[o];r[o]>r[c]&&s.set("orient",c,!1)}r[o]++}}}delete a.component.axes[i]}if(n.axis[i]==="independent"&&t[i]&&t[i].length>1)for(const[a,s]of(t[i]||[]).entries())a>0&&s.get("grid")&&!s.explicit.grid&&(s.implicit.grid=!1)}}function Ule(e,t){if(e){if(e.length!==t.length)return;const n=e.length;for(let r=0;rn.clone());return e}function jle(e,t){for(const n of mD){const r=Va(e.getWithExplicit(n),t.getWithExplicit(n),n,"axis",(i,a)=>{switch(n){case"title":return CM(i,a);case"gridScale":return{explicit:i.explicit,value:Ze(i.value,a.value)}}return Pp(i,a,n,"axis")});e.setWithExplicit(n,r)}return e}function qle(e,t,n,r,i){if(t==="disable")return n!==void 0;switch(n=n||{},t){case"titleAngle":case"labelAngle":return e===(Q(n.labelAngle)?n.labelAngle:cf(n.labelAngle));case"values":return!!n.values;case"encode":return!!n.encoding||!!n.labelAngle;case"title":if(e===ON(r,i))return!0}return e===n[t]}const Wle=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function Hle(e,t){var b,y;let n=t.axis(e);const r=new i8,i=st(t.encoding[e]),{mark:a,config:s}=t,o=(n==null?void 0:n.orient)||((b=s[e==="x"?"axisX":"axisY"])==null?void 0:b.orient)||((y=s.axis)==null?void 0:y.orient)||Tue(e),u=t.getScaleComponent(e).get("type"),c=Sue(e,u,o,t.config),l=n!==void 0?!n:Dy("disable",s.style,n==null?void 0:n.style,c).configValue;if(r.set("disable",l,n!==void 0),l)return r;n=n||{};const f=Cue(i,n,e,s.style,c),d=uT(n.formatType,i,u),h=oT(i,i.type,n.format,n.formatType,s,!0),g={fieldOrDatumDef:i,axis:n,channel:e,model:t,scaleType:u,orient:o,labelAngle:f,format:h,formatType:d,mark:a,config:s};for(const v of mD){const x=v in Xx?Xx[v](g):_x(v)?n[v]:void 0,_=x!==void 0,E=qle(x,v,n,t,e);if(_&&E)r.set(v,x,E);else{const{configValue:w=void 0,configFrom:S=void 0}=_x(v)&&v!=="values"?Dy(v,s.style,n.style,c):{},$=w!==void 0;_&&!$?r.set(v,x,E):(S!=="vgAxisConfig"||Wle.has(v)&&$||td(w)||Q(w))&&r.set(v,w,!1)}}const p=n.encoding??{},m=wT.reduce((v,x)=>{if(!r.hasAxisPart(x))return v;const _=BN(p[x]??{},t),E=x==="labels"?Ple(t,e,_):_;return E!==void 0&&!Oe(E)&&(v[x]={update:E}),v},{});return Oe(m)||r.set("encode",m,!!n.encoding||n.labelAngle!==void 0),r}function Gle({encoding:e,size:t}){for(const n of wi){const r=Sn(n);fi(t[r])&&ka(e[n])&&(delete t[r],U(DM(r)))}return t}const Yle={vgMark:"arc",encodeEntry:e=>({...ur(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...It("x",e,{defaultPos:"mid"}),...It("y",e,{defaultPos:"mid"}),...Ka(e,"radius"),...Ka(e,"theta")})},Xle={vgMark:"area",encodeEntry:e=>({...ur(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"}),...W0("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:e.markDef.orient==="horizontal"}),...W0("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:e.markDef.orient==="vertical"}),...W6(e)})},Vle={vgMark:"rect",encodeEntry:e=>({...ur(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...Ka(e,"x"),...Ka(e,"y")})},Kle={vgMark:"shape",encodeEntry:e=>({...ur(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})}),postEncodingTransform:e=>{const{encoding:t}=e,n=t.shape;return[{type:"geoshape",projection:e.projectionName(),...n&&j(n)&&n.type===bc?{field:G(n,{expr:"datum"})}:{}}]}},Jle={vgMark:"image",encodeEntry:e=>({...ur(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"}),...Ka(e,"x"),...Ka(e,"y"),...j6(e,"url")})},Qle={vgMark:"line",encodeEntry:e=>({...ur(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...It("x",e,{defaultPos:"mid"}),...It("y",e,{defaultPos:"mid"}),...dt("size",e,{vgChannel:"strokeWidth"}),...W6(e)})},Zle={vgMark:"trail",encodeEntry:e=>({...ur(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...It("x",e,{defaultPos:"mid"}),...It("y",e,{defaultPos:"mid"}),...dt("size",e),...W6(e)})};function a8(e,t){const{config:n}=e;return{...ur(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...It("x",e,{defaultPos:"mid"}),...It("y",e,{defaultPos:"mid"}),...dt("size",e),...dt("angle",e),...efe(e,n,t)}}function efe(e,t,n){return n?{shape:{value:n}}:dt("shape",e)}const tfe={vgMark:"symbol",encodeEntry:e=>a8(e)},nfe={vgMark:"symbol",encodeEntry:e=>a8(e,"circle")},rfe={vgMark:"symbol",encodeEntry:e=>a8(e,"square")},ife={vgMark:"rect",encodeEntry:e=>({...ur(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...Ka(e,"x"),...Ka(e,"y")})},afe={vgMark:"rule",encodeEntry:e=>{const{markDef:t}=e,n=t.orient;return!e.encoding.x&&!e.encoding.y&&!e.encoding.latitude&&!e.encoding.longitude?{}:{...ur(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...W0("x",e,{defaultPos:n==="horizontal"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:n!=="vertical"}),...W0("y",e,{defaultPos:n==="vertical"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:n!=="horizontal"}),...dt("size",e,{vgChannel:"strokeWidth"})}}},sfe={vgMark:"text",encodeEntry:e=>{const{config:t,encoding:n}=e;return{...ur(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"}),...It("x",e,{defaultPos:"mid"}),...It("y",e,{defaultPos:"mid"}),...j6(e),...dt("size",e,{vgChannel:"fontSize"}),...dt("angle",e),...Wx("align",ofe(e.markDef,n,t)),...Wx("baseline",ufe(e.markDef,n,t)),...It("radius",e,{defaultPos:null}),...It("theta",e,{defaultPos:null})}}};function ofe(e,t,n){if(Fe("align",e,n)===void 0)return"center"}function ufe(e,t,n){if(Fe("baseline",e,n)===void 0)return"middle"}const cfe={vgMark:"rect",encodeEntry:e=>{const{config:t,markDef:n}=e,r=n.orient,i=r==="horizontal"?"width":"height",a=r==="horizontal"?"height":"width";return{...ur(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...It("x",e,{defaultPos:"mid",vgChannel:"xc"}),...It("y",e,{defaultPos:"mid",vgChannel:"yc"}),...dt("size",e,{defaultValue:lfe(e),vgChannel:i}),[a]:je(Fe("thickness",n,t))}}};function lfe(e){const{config:t,markDef:n}=e,{orient:r}=n,i=r==="horizontal"?"width":"height",a=e.getScaleComponent(r==="horizontal"?"x":"y"),s=Fe("size",n,t,{vgChannel:i})??t.tick.bandSize;if(s!==void 0)return s;{const o=a?a.get("range"):void 0;return o&&ds(o)&&we(o.step)?o.step*3/4:j0(t.view,i)*3/4}}const Id={arc:Yle,area:Xle,bar:Vle,circle:nfe,geoshape:Kle,image:Jle,line:Qle,point:tfe,rect:ife,rule:afe,square:rfe,text:sfe,tick:cfe,trail:Zle};function ffe(e){if(ye([$p,Ep,vae],e.mark)){const t=CT(e.mark,e.encoding);if(t.length>0)return dfe(e,t)}else if(e.mark===Sp){const t=_y.some(n=>Fe(n,e.markDef,e.config));if(e.stack&&!e.fieldDef("size")&&t)return hfe(e)}return s8(e)}const l_="faceted_path_";function dfe(e,t){return[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:l_+e.requestDataName(ze.Main),data:e.requestDataName(ze.Main),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:s8(e,{fromPrefix:l_})}]}const f_="stack_group_";function hfe(e){var c;const[t]=s8(e,{fromPrefix:f_}),n=e.scaleName(e.stack.fieldChannel),r=(l={})=>e.vgField(e.stack.fieldChannel,l),i=(l,f)=>{const d=[r({prefix:"min",suffix:"start",expr:f}),r({prefix:"max",suffix:"start",expr:f}),r({prefix:"min",suffix:"end",expr:f}),r({prefix:"max",suffix:"end",expr:f})];return`${l}(${d.map(h=>`scale('${n}',${h})`).join(",")})`};let a,s;e.stack.fieldChannel==="x"?(a={...zu(t.encode.update,["y","yc","y2","height",..._y]),x:{signal:i("min","datum")},x2:{signal:i("max","datum")},clip:{value:!0}},s={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},t.encode.update={...bn(t.encode.update,["y","yc","y2"]),height:{field:{group:"height"}}}):(a={...zu(t.encode.update,["x","xc","x2","width"]),y:{signal:i("min","datum")},y2:{signal:i("max","datum")},clip:{value:!0}},s={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},t.encode.update={...bn(t.encode.update,["x","xc","x2"]),width:{field:{group:"width"}}});for(const l of _y){const f=Zi(l,e.markDef,e.config);t.encode.update[l]?(a[l]=t.encode.update[l],delete t.encode.update[l]):f&&(a[l]=je(f)),f&&(t.encode.update[l]={value:0})}const o=[];if(((c=e.stack.groupbyChannels)==null?void 0:c.length)>0)for(const l of e.stack.groupbyChannels){const f=e.fieldDef(l),d=G(f);d&&o.push(d),(f!=null&&f.bin||f!=null&&f.timeUnit)&&o.push(G(f,{binSuffix:"end"}))}return a=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((l,f)=>{if(t.encode.update[f])return{...l,[f]:t.encode.update[f]};{const d=Zi(f,e.markDef,e.config);return d!==void 0?{...l,[f]:je(d)}:l}},a),a.stroke&&(a.strokeForeground={value:!0},a.strokeOffset={value:0}),[{type:"group",from:{facet:{data:e.requestDataName(ze.Main),name:f_+e.requestDataName(ze.Main),groupby:o,aggregate:{fields:[r({suffix:"start"}),r({suffix:"start"}),r({suffix:"end"}),r({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:a},marks:[{type:"group",encode:{update:s},marks:[t]}]}]}function gfe(e){var o;const{encoding:t,stack:n,mark:r,markDef:i,config:a}=e,s=t.order;if(!(!P(s)&&Fr(s)&&vy(s.value)||!s&&vy(Fe("order",i,a)))){if((P(s)||j(s))&&!n)return $M(s,{expr:"datum"});if(hs(r)){const u=i.orient==="horizontal"?"y":"x",c=t[u];if(j(c)){const l=c.sort;if(P(l))return{field:G(c,{prefix:u,suffix:"sort_index",expr:"datum"})};if(ei(l))return{field:G({aggregate:k6(e.encoding)?l.op:void 0,field:l.field},{expr:"datum"})};if(lT(l)){const f=e.fieldDef(l.encoding);return{field:G(f,{expr:"datum"}),order:l.order}}else return l===null?void 0:{field:G(c,{binSuffix:(o=e.stack)!=null&&o.impute?"mid":void 0,expr:"datum"})}}return}}}function s8(e,t={fromPrefix:""}){const{mark:n,markDef:r,encoding:i,config:a}=e,s=Ze(r.clip,pfe(e),mfe(e)),o=EM(r),u=i.key,c=gfe(e),l=bfe(e),f=Fe("aria",r,a),d=Id[n].postEncodingTransform?Id[n].postEncodingTransform(e):null;return[{name:e.getName("marks"),type:Id[n].vgMark,...s?{clip:s}:{},...o?{style:o}:{},...u?{key:u.field}:{},...c?{sort:c}:{},...l||{},...f===!1?{aria:f}:{},from:{data:t.fromPrefix+e.requestDataName(ze.Main)},encode:{update:Id[n].encodeEntry(e)},...d?{transform:d}:{}}]}function pfe(e){const t=e.getScaleComponent("x"),n=e.getScaleComponent("y");return t!=null&&t.get("selectionExtent")||n!=null&&n.get("selectionExtent")?!0:void 0}function mfe(e){const t=e.component.projection;return t&&!t.isFit?!0:void 0}function bfe(e){if(!e.component.selection)return null;const t=B(e.component.selection).length;let n=t,r=e.parent;for(;r&&n===0;)n=B(r.component.selection).length,r=r.parent;return n?{interactive:t>0||e.mark==="geoshape"||!!e.encoding.tooltip||!!e.markDef.tooltip}:null}class bD extends dD{constructor(t,n,r,i={},a){super(t,"unit",n,r,a,void 0,Ex(t)?t.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[];const s=ci(t.mark)?{...t.mark}:{type:t.mark},o=s.type;s.filled===void 0&&(s.filled=toe(s,a,{graticule:t.data&&B6(t.data)}));const u=this.encoding=ase(t.encoding||{},o,s.filled,a);this.markDef=VT(s,u,a),this.size=Gle({encoding:u,size:Ex(t)?{...i,...t.width?{width:t.width}:{},...t.height?{height:t.height}:{}}:i}),this.stack=XT(this.markDef,u),this.specifiedScales=this.initScales(o,u),this.specifiedAxes=this.initAxes(u),this.specifiedLegends=this.initLegends(u),this.specifiedProjection=t.projection,this.selection=(t.params??[]).filter(c=>R6(c))}get hasProjection(){const{encoding:t}=this,n=this.mark===nT,r=t&&rre.some(i=>ue(t[i]));return n||r}scaleDomain(t){const n=this.specifiedScales[t];return n?n.domain:void 0}axis(t){return this.specifiedAxes[t]}legend(t){return this.specifiedLegends[t]}initScales(t,n){return vp.reduce((r,i)=>{const a=st(n[i]);return a&&(r[i]=this.initScale(a.scale??{})),r},{})}initScale(t){const{domain:n,range:r}=t,i=gn(t);return P(n)&&(i.domain=n.map(Mn)),P(r)&&(i.range=r.map(Mn)),i}initAxes(t){return wi.reduce((n,r)=>{const i=t[r];if(ue(i)||r===He&&ue(t.x2)||r===_t&&ue(t.y2)){const a=ue(i)?i.axis:void 0;n[r]=a&&this.initAxis({...a})}return n},{})}initAxis(t){const n=B(t),r={};for(const i of n){const a=t[i];r[i]=td(a)?wM(a):Mn(a)}return r}initLegends(t){return hre.reduce((n,r)=>{const i=st(t[r]);if(i&&pre(r)){const a=i.legend;n[r]=a&&gn(a)}return n},{})}parseData(){this.component.data=e1(this)}parseLayoutSize(){Fle(this)}parseSelections(){this.component.selection=xue(this,this.selection)}parseMarkGroup(){this.component.mark=ffe(this)}parseAxesAndHeaders(){this.component.axes=Ile(this)}assembleSelectionTopLevelSignals(t){return joe(this,t)}assembleSignals(){return[...TN(this),...Boe(this,[])]}assembleSelectionData(t){return qoe(this,t)}assembleLayout(){return null}assembleLayoutSignals(){return X6(this)}assembleMarks(){let t=this.component.mark??[];return(!this.parent||!wc(this.parent))&&(t=uN(this,t)),t.map(this.correctDataNames)}assembleGroupStyle(){const{style:t}=this.view||{};return t!==void 0?t:this.encoding.x||this.encoding.y?"cell":"view"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(t){return Xs(this.encoding,t)}fieldDef(t){const n=this.encoding[t];return li(n)}typedFieldDef(t){const n=this.fieldDef(t);return un(n)?n:null}}class o8 extends n8{constructor(t,n,r,i,a){super(t,"layer",n,r,a,t.resolve,t.view);const s={...i,...t.width?{width:t.width}:{},...t.height?{height:t.height}:{}};this.children=t.layer.map((o,u)=>{if(Lp(o))return new o8(o,this,this.getName(`layer_${u}`),s,a);if(oa(o))return new bD(o,this,this.getName(`layer_${u}`),s,a);throw new Error(e6(o))})}parseData(){this.component.data=e1(this);for(const t of this.children)t.parseData()}parseLayoutSize(){kle(this)}parseSelections(){this.component.selection={};for(const t of this.children){t.parseSelections();for(const n of B(t.component.selection))this.component.selection[n]=t.component.selection[n]}}parseMarkGroup(){for(const t of this.children)t.parseMarkGroup()}parseAxesAndHeaders(){Ble(this)}assembleSelectionTopLevelSignals(t){return this.children.reduce((n,r)=>r.assembleSelectionTopLevelSignals(n),t)}assembleSignals(){return this.children.reduce((t,n)=>t.concat(n.assembleSignals()),TN(this))}assembleLayoutSignals(){return this.children.reduce((t,n)=>t.concat(n.assembleLayoutSignals()),X6(this))}assembleSelectionData(t){return this.children.reduce((n,r)=>r.assembleSelectionData(n),t)}assembleGroupStyle(){const t=new Set;for(const r of this.children)for(const i of Y(r.assembleGroupStyle()))t.add(i);const n=Array.from(t);return n.length>1?n:n.length===1?n[0]:void 0}assembleTitle(){let t=super.assembleTitle();if(t)return t;for(const n of this.children)if(t=n.assembleTitle(),t)return t}assembleLayout(){return null}assembleMarks(){return Woe(this,this.children.flatMap(t=>t.assembleMarks()))}assembleLegends(){return this.children.reduce((t,n)=>t.concat(n.assembleLegends()),XN(this))}}function u8(e,t,n,r,i){if(Cp(e))return new Dl(e,t,n,i);if(Lp(e))return new o8(e,t,n,r,i);if(oa(e))return new bD(e,t,n,r,i);if(Fse(e))return new Ole(e,t,n,i);throw new Error(e6(e))}function yfe(e,t={}){t.logger&&Oie(t.logger),t.fieldTitle&&vT(t.fieldTitle);try{const n=YT(ec(t.config,e.config)),r=nN(e,n),i=u8(r,null,"",void 0,n);return i.parse(),jce(i.component.data,i),{spec:xfe(i,vfe(e,r.autosize,n,i),e.datasets,e.usermeta),normalized:r}}finally{t.logger&&Rie(),t.fieldTitle&&Kae()}}function vfe(e,t,n,r){const i=r.component.layoutSize.get("width"),a=r.component.layoutSize.get("height");if(t===void 0?(t={type:"pad"},r.hasAxisOrientSignalRef()&&(t.resize=!0)):X(t)&&(t={type:t}),i&&a&&Loe(t.type)){if(i==="step"&&a==="step")U(ox()),t.type="pad";else if(i==="step"||a==="step"){const s=i==="step"?"width":"height";U(ox(yp(s)));const o=s==="width"?"height":"width";t.type=Poe(o)}}return{...B(t).length===1&&t.type?t.type==="pad"?{}:{autosize:t.type}:{autosize:t},...Rx(n,!1),...Rx(e,!0)}}function xfe(e,t,n={},r){const i=e.config?qse(e.config):void 0,a=[].concat(e.assembleSelectionData([]),Ele(e.component.data,n)),s=e.assembleProjections(),o=e.assembleTitle(),u=e.assembleGroupStyle(),c=e.assembleGroupEncodeEntry(!0);let l=e.assembleLayoutSignals();l=l.filter(h=>(h.name==="width"||h.name==="height")&&h.value!==void 0?(t[h.name]=+h.value,!1):!0);const{params:f,...d}=t;return{$schema:"https://vega.github.io/schema/vega/v5.json",...e.description?{description:e.description}:{},...d,...o?{title:o}:{},...u?{style:u}:{},...c?{encode:{update:c}}:{},data:a,...s.length>0?{projections:s}:{},...e.assembleGroup([...l,...e.assembleSelectionTopLevelSignals([]),...qT(f)]),...i?{config:i}:{},...r?{usermeta:r}:{}}}const _fe=Jne.version,wfe=Object.freeze(Object.defineProperty({__proto__:null,accessPathDepth:Bu,accessPathWithDatum:W7,compile:yfe,contains:ye,deepEqual:Dn,deleteNestedProperty:N0,duplicate:oe,entries:Ga,every:U7,fieldIntersection:q7,flatAccessWithDatum:nM,getFirstDefined:Ze,hasIntersection:j7,hash:be,internalField:aM,isBoolean:uf,isEmpty:Oe,isEqual:Zne,isInternalField:sM,isNullOrFalse:vy,isNumeric:dp,keys:B,logicalExpr:Tl,mergeDeep:eM,never:ZF,normalize:nN,normalizeAngle:cf,omit:bn,pick:zu,prefixGenerator:xy,removePathFromField:H7,replaceAll:lo,replacePathInField:ir,resetIdCounter:tre,setEqual:tM,some:co,stringify:Re,titleCase:Hf,unique:Kr,uniqueId:iM,vals:kt,varName:We,version:_fe},Symbol.toStringTag,{value:"Module"}));function yD(e){const[t,n]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t,version:n}}var Efe="vega-themes",Sfe="2.14.0",$fe="Themes for stylized Vega and Vega-Lite visualizations.",Afe=["vega","vega-lite","themes","style"],kfe="BSD-3-Clause",Cfe={name:"UW Interactive Data Lab",url:"https://idl.cs.washington.edu"},Ffe=[{name:"Emily Gu",url:"https://github.com/emilygu"},{name:"Arvind Satyanarayan",url:"http://arvindsatya.com"},{name:"Jeffrey Heer",url:"https://idl.cs.washington.edu"},{name:"Dominik Moritz",url:"https://www.domoritz.de"}],Mfe="build/vega-themes.js",Tfe="build/vega-themes.module.js",Nfe="build/vega-themes.min.js",Dfe="build/vega-themes.min.js",Ofe="build/vega-themes.module.d.ts",Rfe={type:"git",url:"https://github.com/vega/vega-themes.git"},Lfe=["src","build"],Pfe={prebuild:"yarn clean",build:"rollup -c",clean:"rimraf build && rimraf examples/build","copy:data":"rsync -r node_modules/vega-datasets/data/* examples/data","copy:build":"rsync -r build/* examples/build","deploy:gh":"yarn build && mkdir -p examples/build && rsync -r build/* examples/build && gh-pages -d examples",preversion:"yarn lint",serve:"browser-sync start -s -f build examples --serveStatic examples",start:"yarn build && concurrently --kill-others -n Server,Rollup 'yarn serve' 'rollup -c -w'",format:"eslint . --fix",lint:"eslint .",release:"release-it"},Ife={"@babel/core":"^7.22.9","@babel/plugin-proposal-async-generator-functions":"^7.20.7","@babel/plugin-proposal-json-strings":"^7.18.6","@babel/plugin-proposal-object-rest-spread":"^7.20.7","@babel/plugin-proposal-optional-catch-binding":"^7.18.6","@babel/plugin-transform-runtime":"^7.22.9","@babel/preset-env":"^7.22.9","@babel/preset-typescript":"^7.22.5","@release-it/conventional-changelog":"^7.0.0","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.1.0","@rollup/plugin-terser":"^0.4.3","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","browser-sync":"^2.29.3",concurrently:"^8.2.0",eslint:"^8.45.0","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^5.0.0","gh-pages":"^5.0.0",prettier:"^3.0.0","release-it":"^16.1.0",rollup:"^3.26.2","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-ts":"^3.2.0",typescript:"^5.1.6",vega:"^5.25.0","vega-lite":"^5.9.3"},zfe={vega:"*","vega-lite":"*"},Bfe={},Ufe={name:Efe,version:Sfe,description:$fe,keywords:Afe,license:kfe,author:Cfe,contributors:Ffe,main:Mfe,module:Tfe,unpkg:Nfe,jsdelivr:Dfe,types:Ofe,repository:Rfe,files:Lfe,scripts:Pfe,devDependencies:Ife,peerDependencies:zfe,dependencies:Bfe};const Ko="#fff",d_="#888",jfe={background:"#333",view:{stroke:d_},title:{color:Ko,subtitleColor:Ko},style:{"guide-label":{fill:Ko},"guide-title":{fill:Ko}},axis:{domainColor:Ko,gridColor:d_,tickColor:Ko}},xs="#4572a7",qfe={background:"#fff",arc:{fill:xs},area:{fill:xs},line:{stroke:xs,strokeWidth:2},path:{stroke:xs},rect:{fill:xs},shape:{stroke:xs},symbol:{fill:xs,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},_s="#30a2da",_m="#cbcbcb",Wfe="#999",Hfe="#333",h_="#f0f0f0",g_="#333",Gfe={arc:{fill:_s},area:{fill:_s},axis:{domainColor:_m,grid:!0,gridColor:_m,gridWidth:1,labelColor:Wfe,labelFontSize:10,titleColor:Hfe,tickColor:_m,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:h_,group:{fill:h_},legend:{labelColor:g_,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:g_,titleFontSize:14,titlePadding:10},line:{stroke:_s,strokeWidth:2},path:{stroke:_s,strokeWidth:.5},rect:{fill:_s},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:_s},bar:{binSpacing:2,fill:_s,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},ws="#000",Yfe={group:{fill:"#e5e5e5"},arc:{fill:ws},area:{fill:ws},line:{stroke:ws},path:{stroke:ws},rect:{fill:ws},shape:{stroke:ws},symbol:{fill:ws,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},Xfe=22,Vfe="normal",p_="Benton Gothic, sans-serif",m_=11.5,Kfe="normal",Es="#82c6df",wm="Benton Gothic Bold, sans-serif",b_="normal",y_=13,Hc={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},Jfe={background:"#ffffff",title:{anchor:"start",color:"#000000",font:wm,fontSize:Xfe,fontWeight:Vfe},arc:{fill:Es},area:{fill:Es},line:{stroke:Es,strokeWidth:2},path:{stroke:Es},rect:{fill:Es},shape:{stroke:Es},symbol:{fill:Es,size:30},axis:{labelFont:p_,labelFontSize:m_,labelFontWeight:Kfe,titleFont:wm,titleFontSize:y_,titleFontWeight:b_},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:p_,labelFontSize:m_,symbolType:"square",titleFont:wm,titleFontSize:y_,titleFontWeight:b_},range:{category:Hc["category-6"],diverging:Hc["fireandice-6"],heatmap:Hc["fire-7"],ordinal:Hc["fire-7"],ramp:Hc["fire-7"]}},Ss="#ab5787",zd="#979797",Qfe={background:"#f9f9f9",arc:{fill:Ss},area:{fill:Ss},line:{stroke:Ss},path:{stroke:Ss},rect:{fill:Ss},shape:{stroke:Ss},symbol:{fill:Ss,size:30},axis:{domainColor:zd,domainWidth:.5,gridWidth:.2,labelColor:zd,tickColor:zd,tickWidth:.2,titleColor:zd},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},$s="#3e5c69",Zfe={background:"#fff",arc:{fill:$s},area:{fill:$s},line:{stroke:$s},path:{stroke:$s},rect:{fill:$s},shape:{stroke:$s},symbol:{fill:$s},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},Wn="#1696d2",v_="#000000",ede="#FFFFFF",Bd="Lato",Em="Lato",tde="Lato",nde="#DEDDDD",rde=18,Gc={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},ide={background:ede,title:{anchor:"start",fontSize:rde,font:Bd},axisX:{domain:!0,domainColor:v_,domainWidth:1,grid:!1,labelFontSize:12,labelFont:Em,labelAngle:0,tickColor:v_,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:Bd},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:nde,gridWidth:1,labelFontSize:12,labelFont:Em,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:Bd,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:Em,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:Bd,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:Gc["six-groups-cat-1"],diverging:Gc["diverging-colors"],heatmap:Gc["diverging-colors"],ordinal:Gc["six-groups-seq"],ramp:Gc["shades-blue"]},area:{fill:Wn},rect:{fill:Wn},line:{color:Wn,stroke:Wn,strokeWidth:5},trail:{color:Wn,stroke:Wn,strokeWidth:0,size:1},path:{stroke:Wn,strokeWidth:.5},point:{filled:!0},text:{font:tde,color:Wn,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:Wn,stroke:null}},arc:{fill:Wn},shape:{stroke:Wn},symbol:{fill:Wn,size:30}},As="#3366CC",x_="#ccc",Ud="Arial, sans-serif",ade={arc:{fill:As},area:{fill:As},path:{stroke:As},rect:{fill:As},shape:{stroke:As},symbol:{stroke:As},circle:{fill:As},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:Ud,fontSize:12},"guide-title":{font:Ud,fontSize:12},"group-title":{font:Ud,fontSize:12}},title:{font:Ud,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:x_,tickColor:x_,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},c8=e=>e*(1/3+1),__=c8(9),w_=c8(10),E_=c8(12),Yc="Segoe UI",S_="wf_standard-font, helvetica, arial, sans-serif",$_="#252423",Xc="#605E5C",A_="transparent",sde="#C8C6C4",fr="#118DFF",ode="#12239E",ude="#E66C37",cde="#6B007B",lde="#E044A7",fde="#744EC2",dde="#D9B300",hde="#D64550",vD=fr,xD="#DEEFFF",k_=[xD,vD],gde=[xD,"#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",vD],pde={view:{stroke:A_},background:A_,font:Yc,header:{titleFont:S_,titleFontSize:E_,titleColor:$_,labelFont:Yc,labelFontSize:w_,labelColor:Xc},axis:{ticks:!1,grid:!1,domain:!1,labelColor:Xc,labelFontSize:__,titleFont:S_,titleColor:$_,titleFontSize:E_,titleFontWeight:"normal"},axisQuantitative:{tickCount:3,grid:!0,gridColor:sde,gridDash:[1,5],labelFlush:!1},axisBand:{tickExtra:!0},axisX:{labelPadding:5},axisY:{labelPadding:10},bar:{fill:fr},line:{stroke:fr,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:Yc,fontSize:__,fill:Xc},arc:{fill:fr},area:{fill:fr,line:!0,opacity:.6},path:{stroke:fr},rect:{fill:fr},point:{fill:fr,filled:!0,size:75},shape:{stroke:fr},symbol:{fill:fr,strokeWidth:1.5,size:50},legend:{titleFont:Yc,titleFontWeight:"bold",titleColor:Xc,labelFont:Yc,labelFontSize:w_,labelColor:Xc,symbolType:"circle",symbolSize:75},range:{category:[fr,ode,ude,cde,lde,fde,dde,hde],diverging:k_,heatmap:k_,ordinal:gde}},Sm='IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,".sfnstext-regular",sans-serif',C_=400,mde=["#8a3ffc","#33b1ff","#007d79","#ff7eb6","#fa4d56","#fff1f1","#6fdc8c","#4589ff","#d12771","#d2a106","#08bdba","#bae6ff","#ba4e00","#d4bbff"],bde=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"];function t1({type:e,background:t}){const n=e==="dark"?"#161616":"#ffffff",r=e==="dark"?"#f4f4f4":"#161616",i=e==="dark"?mde:bde,a=e==="dark"?"#d4bbff":"#6929c4";return{background:t,arc:{fill:a},area:{fill:a},path:{stroke:a},rect:{fill:a},shape:{stroke:a},symbol:{stroke:a},circle:{fill:a},view:{fill:n,stroke:n},group:{fill:n},title:{color:r,anchor:"start",dy:-15,fontSize:16,font:Sm,fontWeight:600},axis:{labelColor:r,labelFontSize:12,grid:!0,gridColor:"#525252",titleColor:r,labelAngle:0},style:{"guide-label":{font:Sm,fill:r,fontWeight:C_},"guide-title":{font:Sm,fill:r,fontWeight:C_}},range:{category:i,diverging:["#750e13","#a2191f","#da1e28","#fa4d56","#ff8389","#ffb3b8","#ffd7d9","#fff1f1","#e5f6ff","#bae6ff","#82cfff","#33b1ff","#1192e8","#0072c3","#00539a","#003a6d"],heatmap:["#f6f2ff","#e8daff","#d4bbff","#be95ff","#a56eff","#8a3ffc","#6929c4","#491d8b","#31135e","#1c0f30"]}}}const yde=t1({type:"light",background:"#ffffff"}),vde=t1({type:"light",background:"#f4f4f4"}),xde=t1({type:"dark",background:"#262626"}),_de=t1({type:"dark",background:"#161616"}),wde=Ufe.version,Ede=Object.freeze(Object.defineProperty({__proto__:null,carbong10:vde,carbong100:_de,carbong90:xde,carbonwhite:yde,dark:jfe,excel:qfe,fivethirtyeight:Gfe,ggplot2:Yfe,googlecharts:ade,latimes:Jfe,powerbi:pde,quartz:Qfe,urbaninstitute:ide,version:wde,vox:Zfe},Symbol.toStringTag,{value:"Module"}));function Sde(e,t,n,r){if(P(e))return`[${e.map(i=>t(X(i)?i:F_(i,n))).join(", ")}]`;if(V(e)){let i="";const{title:a,image:s,...o}=e;a&&(i+=`

${t(a)}

`),s&&(i+=``);const u=Object.keys(o);if(u.length>0){i+="";for(const c of u){let l=o[c];l!==void 0&&(V(l)&&(l=F_(l,n)),i+=``)}i+="
${t(c)}${t(l)}
"}return i||"{}"}return t(e)}function $de(e){const t=[];return function(n,r){if(typeof r!="object"||r===null)return r;const i=t.indexOf(this)+1;return t.length=i,t.length>e?"[Object]":t.indexOf(r)>=0?"[Circular]":(t.push(r),r)}}function F_(e,t){return JSON.stringify(e,$de(t))}var Ade=`#vg-tooltip-element { - visibility: hidden; - padding: 8px; - position: fixed; - z-index: 1000; - font-family: sans-serif; - font-size: 11px; - border-radius: 3px; - box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); - /* The default theme is the light theme. */ - background-color: rgba(255, 255, 255, 0.95); - border: 1px solid #d9d9d9; - color: black; -} -#vg-tooltip-element.visible { - visibility: visible; -} -#vg-tooltip-element h2 { - margin-top: 0; - margin-bottom: 10px; - font-size: 13px; -} -#vg-tooltip-element table { - border-spacing: 0; -} -#vg-tooltip-element table tr { - border: none; -} -#vg-tooltip-element table tr td { - overflow: hidden; - text-overflow: ellipsis; - padding-top: 2px; - padding-bottom: 2px; -} -#vg-tooltip-element table tr td.key { - color: #808080; - max-width: 150px; - text-align: right; - padding-right: 4px; -} -#vg-tooltip-element table tr td.value { - display: block; - max-width: 300px; - max-height: 7em; - text-align: left; -} -#vg-tooltip-element.dark-theme { - background-color: rgba(32, 32, 32, 0.9); - border: 1px solid #f5f5f5; - color: white; -} -#vg-tooltip-element.dark-theme td.key { - color: #bfbfbf; -} -`;const _D="vg-tooltip-element",kde={offsetX:10,offsetY:10,id:_D,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:Cde,maxDepth:2,formatTooltip:Sde,baseURL:""};function Cde(e){return String(e).replace(/&/g,"&").replace(/window.innerWidth&&(i=+e.clientX-n-t.width);let a=e.clientY+r;return a+t.height>window.innerHeight&&(a=+e.clientY-r-t.height),{x:i,y:a}}class Tde{constructor(t){this.options={...kde,...t};const n=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const r=document.createElement("style");r.setAttribute("id",this.options.styleId),r.innerHTML=Fde(n);const i=document.head;i.childNodes.length>0?i.insertBefore(r,i.childNodes[0]):i.appendChild(r)}}tooltipHandler(t,n,r,i){if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),(document.fullscreenElement??document.body).appendChild(this.el)),i==null||i===""){this.el.classList.remove("visible",`${this.options.theme}-theme`);return}this.el.innerHTML=this.options.formatTooltip(i,this.options.sanitize,this.options.maxDepth,this.options.baseURL),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:a,y:s}=Mde(n,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY);this.el.style.top=`${s}px`,this.el.style.left=`${a}px`}}var $m={};function Nde(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Am,M_;function Dde(){return M_||(M_=1,Am=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),Am}var Ode=ke;ke.Node=xo;ke.create=ke;function ke(e){var t=this;if(t instanceof ke||(t=new ke),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(i){t.push(i)});else if(arguments.length>0)for(var n=0,r=arguments.length;n1)n=t;else if(this.head)r=this.head.next,n=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;r!==null;i++)n=e(n,r.value,i),r=r.next;return n};ke.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else if(this.tail)r=this.tail.prev,n=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;r!==null;i--)n=e(n,r.value,i),r=r.prev;return n};ke.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;n!==null;t++)e[t]=n.value,n=n.next;return e};ke.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;n!==null;t++)e[t]=n.value,n=n.prev;return e};ke.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new ke;if(tthis.length&&(t=this.length);for(var r=0,i=this.head;i!==null&&rthis.length&&(t=this.length);for(var r=this.length,i=this.tail;i!==null&&r>t;r--)i=i.prev;for(;i!==null&&r>e;r--,i=i.prev)n.push(i.value);return n};ke.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,i=this.head;i!==null&&r1;class zde{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[Rs]=t.max||1/0;const n=t.length||km;if(this[Jo]=typeof n!="function"?km:n,this[Ol]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[Bs]=t.maxAge||0,this[Mi]=t.dispose,this[T_]=t.noDisposeOnSet||!1,this[wD]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[Rs]=t||1/0,Vc(this)}get max(){return this[Rs]}set allowStale(t){this[Ol]=!!t}get allowStale(){return this[Ol]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[Bs]=t,Vc(this)}get maxAge(){return this[Bs]}set lengthCalculator(t){typeof t!="function"&&(t=km),t!==this[Jo]&&(this[Jo]=t,this[Di]=0,this[lt].forEach(n=>{n.length=this[Jo](n.value,n.key),this[Di]+=n.length})),Vc(this)}get lengthCalculator(){return this[Jo]}get length(){return this[Di]}get itemCount(){return this[lt].length}rforEach(t,n){n=n||this;for(let r=this[lt].tail;r!==null;){const i=r.prev;N_(this,t,r,n),r=i}}forEach(t,n){n=n||this;for(let r=this[lt].head;r!==null;){const i=r.next;N_(this,t,r,n),r=i}}keys(){return this[lt].toArray().map(t=>t.key)}values(){return this[lt].toArray().map(t=>t.value)}reset(){this[Mi]&&this[lt]&&this[lt].length&&this[lt].forEach(t=>this[Mi](t.key,t.value)),this[dr]=new Map,this[lt]=new Ide,this[Di]=0}dump(){return this[lt].map(t=>X0(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[lt]}set(t,n,r){if(r=r||this[Bs],r&&typeof r!="number")throw new TypeError("maxAge must be a number");const i=r?Date.now():0,a=this[Jo](n,t);if(this[dr].has(t)){if(a>this[Rs])return yu(this,this[dr].get(t)),!1;const u=this[dr].get(t).value;return this[Mi]&&(this[T_]||this[Mi](t,u.value)),u.now=i,u.maxAge=r,u.value=n,this[Di]+=a-u.length,u.length=a,this.get(t),Vc(this),!0}const s=new Bde(t,n,a,i,r);return s.length>this[Rs]?(this[Mi]&&this[Mi](t,n),!1):(this[Di]+=s.length,this[lt].unshift(s),this[dr].set(t,this[lt].head),Vc(this),!0)}has(t){if(!this[dr].has(t))return!1;const n=this[dr].get(t).value;return!X0(this,n)}get(t){return Cm(this,t,!0)}peek(t){return Cm(this,t,!1)}pop(){const t=this[lt].tail;return t?(yu(this,t),t.value):null}del(t){yu(this,this[dr].get(t))}load(t){this.reset();const n=Date.now();for(let r=t.length-1;r>=0;r--){const i=t[r],a=i.e||0;if(a===0)this.set(i.k,i.v);else{const s=a-n;s>0&&this.set(i.k,i.v,s)}}}prune(){this[dr].forEach((t,n)=>Cm(this,n,!1))}}const Cm=(e,t,n)=>{const r=e[dr].get(t);if(r){const i=r.value;if(X0(e,i)){if(yu(e,r),!e[Ol])return}else n&&(e[wD]&&(r.value.now=Date.now()),e[lt].unshiftNode(r));return i.value}},X0=(e,t)=>{if(!t||!t.maxAge&&!e[Bs])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[Bs]&&n>e[Bs]},Vc=e=>{if(e[Di]>e[Rs])for(let t=e[lt].tail;e[Di]>e[Rs]&&t!==null;){const n=t.prev;yu(e,t),t=n}},yu=(e,t)=>{if(t){const n=t.value;e[Mi]&&e[Mi](n.key,n.value),e[Di]-=n.length,e[dr].delete(n.key),e[lt].removeNode(t)}};class Bde{constructor(t,n,r,i,a){this.key=t,this.value=n,this.length=r,this.now=i,this.maxAge=a||0}}const N_=(e,t,n,r)=>{let i=n.value;X0(e,i)&&(yu(e,n),e[Ol]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};var Ude=zde;const jde=Object.freeze({loose:!0}),qde=Object.freeze({}),Wde=e=>e?typeof e!="object"?jde:e:qde;var l8=Wde,jy={exports:{}};const Hde="2.0.0",ED=256,Gde=Number.MAX_SAFE_INTEGER||9007199254740991,Yde=16,Xde=ED-6,Vde=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var f8={MAX_LENGTH:ED,MAX_SAFE_COMPONENT_LENGTH:Yde,MAX_SAFE_BUILD_LENGTH:Xde,MAX_SAFE_INTEGER:Gde,RELEASE_TYPES:Vde,SEMVER_SPEC_VERSION:Hde,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const Kde=typeof process=="object"&&$m&&$m.NODE_DEBUG&&/\bsemver\b/i.test($m.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var n1=Kde;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=f8,a=n1;t=e.exports={};const s=t.re=[],o=t.safeRe=[],u=t.src=[],c=t.t={};let l=0;const f="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",i],[f,r]],h=p=>{for(const[m,b]of d)p=p.split(`${m}*`).join(`${m}{0,${b}}`).split(`${m}+`).join(`${m}{1,${b}}`);return p},g=(p,m,b)=>{const y=h(m),v=l++;a(p,v,m),c[p]=v,u[v]=m,s[v]=new RegExp(m,b?"g":void 0),o[v]=new RegExp(y,b?"g":void 0)};g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),g("MAINVERSION",`(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${u[c.NUMERICIDENTIFIER]}|${u[c.NONNUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${u[c.NUMERICIDENTIFIERLOOSE]}|${u[c.NONNUMERICIDENTIFIER]})`),g("PRERELEASE",`(?:-(${u[c.PRERELEASEIDENTIFIER]}(?:\\.${u[c.PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${u[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[c.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${f}+`),g("BUILD",`(?:\\+(${u[c.BUILDIDENTIFIER]}(?:\\.${u[c.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${u[c.MAINVERSION]}${u[c.PRERELEASE]}?${u[c.BUILD]}?`),g("FULL",`^${u[c.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${u[c.MAINVERSIONLOOSE]}${u[c.PRERELEASELOOSE]}?${u[c.BUILD]}?`),g("LOOSE",`^${u[c.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRANGEIDENTIFIERLOOSE",`${u[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${u[c.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:${u[c.PRERELEASE]})?${u[c.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:${u[c.PRERELEASELOOSE]})?${u[c.BUILD]}?)?)?`),g("XRANGE",`^${u[c.GTLT]}\\s*${u[c.XRANGEPLAIN]}$`),g("XRANGELOOSE",`^${u[c.GTLT]}\\s*${u[c.XRANGEPLAINLOOSE]}$`),g("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),g("COERCERTL",u[c.COERCE],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${u[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",g("TILDE",`^${u[c.LONETILDE]}${u[c.XRANGEPLAIN]}$`),g("TILDELOOSE",`^${u[c.LONETILDE]}${u[c.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${u[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",g("CARET",`^${u[c.LONECARET]}${u[c.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${u[c.LONECARET]}${u[c.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${u[c.GTLT]}\\s*(${u[c.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]}|${u[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",g("HYPHENRANGE",`^\\s*(${u[c.XRANGEPLAIN]})\\s+-\\s+(${u[c.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${u[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[c.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(jy,jy.exports);var d8=jy.exports;const D_=/^[0-9]+$/,SD=(e,t)=>{const n=D_.test(e),r=D_.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:eSD(t,e);var Qde={compareIdentifiers:SD,rcompareIdentifiers:Jde};const jd=n1,{MAX_LENGTH:O_,MAX_SAFE_INTEGER:qd}=f8,{safeRe:R_,t:L_}=d8,Zde=l8,{compareIdentifiers:Qo}=Qde;let ehe=class jr{constructor(t,n){if(n=Zde(n),t instanceof jr){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>O_)throw new TypeError(`version is longer than ${O_} characters`);jd("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?R_[L_.LOOSE]:R_[L_.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>qd||this.major<0)throw new TypeError("Invalid major version");if(this.minor>qd||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>qd||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const a=+i;if(a>=0&&a=0;)typeof this.prerelease[a]=="number"&&(this.prerelease[a]++,a=-2);if(a===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(n){let a=[n,i];r===!1&&(a=[n]),Qo(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=a):this.prerelease=a}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var h8=ehe;const P_=h8,the=(e,t,n)=>new P_(e,n).compare(new P_(t,n));var Ec=the;const nhe=Ec,rhe=(e,t,n)=>nhe(e,t,n)===0;var ihe=rhe;const ahe=Ec,she=(e,t,n)=>ahe(e,t,n)!==0;var ohe=she;const uhe=Ec,che=(e,t,n)=>uhe(e,t,n)>0;var lhe=che;const fhe=Ec,dhe=(e,t,n)=>fhe(e,t,n)>=0;var hhe=dhe;const ghe=Ec,phe=(e,t,n)=>ghe(e,t,n)<0;var mhe=phe;const bhe=Ec,yhe=(e,t,n)=>bhe(e,t,n)<=0;var vhe=yhe;const xhe=ihe,_he=ohe,whe=lhe,Ehe=hhe,She=mhe,$he=vhe,Ahe=(e,t,n,r)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return xhe(e,n,r);case"!=":return _he(e,n,r);case">":return whe(e,n,r);case">=":return Ehe(e,n,r);case"<":return She(e,n,r);case"<=":return $he(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};var khe=Ahe,Fm,I_;function Che(){if(I_)return Fm;I_=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(l,f){if(f=n(f),l instanceof t){if(l.loose===!!f.loose)return l;l=l.value}l=l.trim().split(/\s+/).join(" "),s("comparator",l,f),this.options=f,this.loose=!!f.loose,this.parse(l),this.semver===e?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(l){const f=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],d=l.match(f);if(!d)throw new TypeError(`Invalid comparator: ${l}`);this.operator=d[1]!==void 0?d[1]:"",this.operator==="="&&(this.operator=""),d[2]?this.semver=new o(d[2],this.options.loose):this.semver=e}toString(){return this.value}test(l){if(s("Comparator.test",l,this.options.loose),this.semver===e||l===e)return!0;if(typeof l=="string")try{l=new o(l,this.options)}catch{return!1}return a(l,this.operator,this.semver,this.options)}intersects(l,f){if(!(l instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new u(l.value,f).test(this.value):l.operator===""?l.value===""?!0:new u(this.value,f).test(l.semver):(f=n(f),f.includePrerelease&&(this.value==="<0.0.0-0"||l.value==="<0.0.0-0")||!f.includePrerelease&&(this.value.startsWith("<0.0.0")||l.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&l.operator.startsWith(">")||this.operator.startsWith("<")&&l.operator.startsWith("<")||this.semver.version===l.semver.version&&this.operator.includes("=")&&l.operator.includes("=")||a(this.semver,"<",l.semver,f)&&this.operator.startsWith(">")&&l.operator.startsWith("<")||a(this.semver,">",l.semver,f)&&this.operator.startsWith("<")&&l.operator.startsWith(">")))}}Fm=t;const n=l8,{safeRe:r,t:i}=d8,a=khe,s=n1,o=h8,u=$D();return Fm}var Mm,z_;function $D(){if(z_)return Mm;z_=1;class e{constructor(M,C){if(C=r(C),M instanceof e)return M.loose===!!C.loose&&M.includePrerelease===!!C.includePrerelease?M:new e(M.raw,C);if(M instanceof i)return this.raw=M.value,this.set=[[M]],this.format(),this;if(this.options=C,this.loose=!!C.loose,this.includePrerelease=!!C.includePrerelease,this.raw=M.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(T=>this.parseRange(T.trim())).filter(T=>T.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const T=this.set[0];if(this.set=this.set.filter(L=>!g(L[0])),this.set.length===0)this.set=[T];else if(this.set.length>1){for(const L of this.set)if(L.length===1&&p(L[0])){this.set=[L];break}}}this.format()}format(){return this.range=this.set.map(M=>M.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(M){const T=((this.options.includePrerelease&&d)|(this.options.loose&&h))+":"+M,L=n.get(T);if(L)return L;const I=this.options.loose,z=I?o[u.HYPHENRANGELOOSE]:o[u.HYPHENRANGE];M=M.replace(z,k(this.options.includePrerelease)),a("hyphen replace",M),M=M.replace(o[u.COMPARATORTRIM],c),a("comparator trim",M),M=M.replace(o[u.TILDETRIM],l),a("tilde trim",M),M=M.replace(o[u.CARETTRIM],f),a("caret trim",M);let Z=M.split(" ").map(me=>b(me,this.options)).join(" ").split(/\s+/).map(me=>F(me,this.options));I&&(Z=Z.filter(me=>(a("loose invalid filter",me,this.options),!!me.match(o[u.COMPARATORLOOSE])))),a("range list",Z);const ee=new Map,fe=Z.map(me=>new i(me,this.options));for(const me of fe){if(g(me))return[me];ee.set(me.value,me)}ee.size>1&&ee.has("")&&ee.delete("");const Ee=[...ee.values()];return n.set(T,Ee),Ee}intersects(M,C){if(!(M instanceof e))throw new TypeError("a Range is required");return this.set.some(T=>m(T,C)&&M.set.some(L=>m(L,C)&&T.every(I=>L.every(z=>I.intersects(z,C)))))}test(M){if(!M)return!1;if(typeof M=="string")try{M=new s(M,this.options)}catch{return!1}for(let C=0;CA.value==="<0.0.0-0",p=A=>A.value==="",m=(A,M)=>{let C=!0;const T=A.slice();let L=T.pop();for(;C&&T.length;)C=T.every(I=>L.intersects(I,M)),L=T.pop();return C},b=(A,M)=>(a("comp",A,M),A=_(A,M),a("caret",A),A=v(A,M),a("tildes",A),A=w(A,M),a("xrange",A),A=$(A,M),a("stars",A),A),y=A=>!A||A.toLowerCase()==="x"||A==="*",v=(A,M)=>A.trim().split(/\s+/).map(C=>x(C,M)).join(" "),x=(A,M)=>{const C=M.loose?o[u.TILDELOOSE]:o[u.TILDE];return A.replace(C,(T,L,I,z,Z)=>{a("tilde",A,T,L,I,z,Z);let ee;return y(L)?ee="":y(I)?ee=`>=${L}.0.0 <${+L+1}.0.0-0`:y(z)?ee=`>=${L}.${I}.0 <${L}.${+I+1}.0-0`:Z?(a("replaceTilde pr",Z),ee=`>=${L}.${I}.${z}-${Z} <${L}.${+I+1}.0-0`):ee=`>=${L}.${I}.${z} <${L}.${+I+1}.0-0`,a("tilde return",ee),ee})},_=(A,M)=>A.trim().split(/\s+/).map(C=>E(C,M)).join(" "),E=(A,M)=>{a("caret",A,M);const C=M.loose?o[u.CARETLOOSE]:o[u.CARET],T=M.includePrerelease?"-0":"";return A.replace(C,(L,I,z,Z,ee)=>{a("caret",A,L,I,z,Z,ee);let fe;return y(I)?fe="":y(z)?fe=`>=${I}.0.0${T} <${+I+1}.0.0-0`:y(Z)?I==="0"?fe=`>=${I}.${z}.0${T} <${I}.${+z+1}.0-0`:fe=`>=${I}.${z}.0${T} <${+I+1}.0.0-0`:ee?(a("replaceCaret pr",ee),I==="0"?z==="0"?fe=`>=${I}.${z}.${Z}-${ee} <${I}.${z}.${+Z+1}-0`:fe=`>=${I}.${z}.${Z}-${ee} <${I}.${+z+1}.0-0`:fe=`>=${I}.${z}.${Z}-${ee} <${+I+1}.0.0-0`):(a("no pr"),I==="0"?z==="0"?fe=`>=${I}.${z}.${Z}${T} <${I}.${z}.${+Z+1}-0`:fe=`>=${I}.${z}.${Z}${T} <${I}.${+z+1}.0-0`:fe=`>=${I}.${z}.${Z} <${+I+1}.0.0-0`),a("caret return",fe),fe})},w=(A,M)=>(a("replaceXRanges",A,M),A.split(/\s+/).map(C=>S(C,M)).join(" ")),S=(A,M)=>{A=A.trim();const C=M.loose?o[u.XRANGELOOSE]:o[u.XRANGE];return A.replace(C,(T,L,I,z,Z,ee)=>{a("xRange",A,T,L,I,z,Z,ee);const fe=y(I),Ee=fe||y(z),me=Ee||y(Z),Ie=me;return L==="="&&Ie&&(L=""),ee=M.includePrerelease?"-0":"",fe?L===">"||L==="<"?T="<0.0.0-0":T="*":L&&Ie?(Ee&&(z=0),Z=0,L===">"?(L=">=",Ee?(I=+I+1,z=0,Z=0):(z=+z+1,Z=0)):L==="<="&&(L="<",Ee?I=+I+1:z=+z+1),L==="<"&&(ee="-0"),T=`${L+I}.${z}.${Z}${ee}`):Ee?T=`>=${I}.0.0${ee} <${+I+1}.0.0-0`:me&&(T=`>=${I}.${z}.0${ee} <${I}.${+z+1}.0-0`),a("xRange return",T),T})},$=(A,M)=>(a("replaceStars",A,M),A.trim().replace(o[u.STAR],"")),F=(A,M)=>(a("replaceGTE0",A,M),A.trim().replace(o[M.includePrerelease?u.GTE0PRE:u.GTE0],"")),k=A=>(M,C,T,L,I,z,Z,ee,fe,Ee,me,Ie,Si)=>(y(T)?C="":y(L)?C=`>=${T}.0.0${A?"-0":""}`:y(I)?C=`>=${T}.${L}.0${A?"-0":""}`:z?C=`>=${C}`:C=`>=${C}${A?"-0":""}`,y(fe)?ee="":y(Ee)?ee=`<${+fe+1}.0.0-0`:y(me)?ee=`<${fe}.${+Ee+1}.0-0`:Ie?ee=`<=${fe}.${Ee}.${me}-${Ie}`:A?ee=`<${fe}.${Ee}.${+me+1}-0`:ee=`<=${ee}`,`${C} ${ee}`.trim()),D=(A,M,C)=>{for(let T=0;T0){const L=A[T].semver;if(L.major===M.major&&L.minor===M.minor&&L.patch===M.patch)return!0}return!1}return!0};return Mm}const Fhe=$D(),Mhe=(e,t,n)=>{try{t=new Fhe(t,n)}catch{return!1}return t.test(e)};var The=Mhe,AD=Nde(The);function Nhe(e,t,n){const r=e.open(t),i=1e4,a=250,{origin:s}=new URL(t);let o=~~(i/a);function u(l){l.source===r&&(o=0,e.removeEventListener("message",u,!1))}e.addEventListener("message",u,!1);function c(){o<=0||(r.postMessage(n,s),setTimeout(c,a),o-=1)}setTimeout(c,a)}var Dhe=`.vega-embed { - position: relative; - display: inline-block; - box-sizing: border-box; -} -.vega-embed.has-actions { - padding-right: 38px; -} -.vega-embed details:not([open]) > :not(summary) { - display: none !important; -} -.vega-embed summary { - list-style: none; - position: absolute; - top: 0; - right: 0; - padding: 6px; - z-index: 1000; - background: white; - box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1); - color: #1b1e23; - border: 1px solid #aaa; - border-radius: 999px; - opacity: 0.2; - transition: opacity 0.4s ease-in; - cursor: pointer; - line-height: 0px; -} -.vega-embed summary::-webkit-details-marker { - display: none; -} -.vega-embed summary:active { - box-shadow: #aaa 0px 0px 0px 1px inset; -} -.vega-embed summary svg { - width: 14px; - height: 14px; -} -.vega-embed details[open] summary { - opacity: 0.7; -} -.vega-embed:hover summary, .vega-embed:focus-within summary { - opacity: 1 !important; - transition: opacity 0.2s ease; -} -.vega-embed .vega-actions { - position: absolute; - z-index: 1001; - top: 35px; - right: -9px; - display: flex; - flex-direction: column; - padding-bottom: 8px; - padding-top: 8px; - border-radius: 4px; - box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2); - border: 1px solid #d9d9d9; - background: white; - animation-duration: 0.15s; - animation-name: scale-in; - animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5); - text-align: left; -} -.vega-embed .vega-actions a { - padding: 8px 16px; - font-family: sans-serif; - font-size: 14px; - font-weight: 600; - white-space: nowrap; - color: #434a56; - text-decoration: none; -} -.vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus { - background-color: #f7f7f9; - color: black; -} -.vega-embed .vega-actions::before, .vega-embed .vega-actions::after { - content: ""; - display: inline-block; - position: absolute; -} -.vega-embed .vega-actions::before { - left: auto; - right: 14px; - top: -16px; - border: 8px solid rgba(0, 0, 0, 0); - border-bottom-color: #d9d9d9; -} -.vega-embed .vega-actions::after { - left: auto; - right: 15px; - top: -14px; - border: 7px solid rgba(0, 0, 0, 0); - border-bottom-color: #fff; -} -.vega-embed .chart-wrapper.fit-x { - width: 100%; -} -.vega-embed .chart-wrapper.fit-y { - height: 100%; -} - -.vega-embed-wrapper { - max-width: 100%; - overflow: auto; - padding-right: 14px; -} - -@keyframes scale-in { - from { - opacity: 0; - transform: scale(0.6); - } - to { - opacity: 1; - transform: scale(1); - } -} -`;function kD(e,...t){for(const n of t)Ohe(e,n);return e}function Ohe(e,t){for(const n of Object.keys(t))tc(e,n,t[n],!0)}const qr=yne;let pf=wfe;const Wd=typeof window<"u"?window:void 0;var q_;pf===void 0&&((q_=Wd==null?void 0:Wd.vl)!=null&&q_.compile)&&(pf=Wd.vl);const Rhe={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},Lhe={CLICK_TO_VIEW_ACTIONS:"Click to view actions",COMPILED_ACTION:"View Compiled Vega",EDITOR_ACTION:"Open in Vega Editor",PNG_ACTION:"Save as PNG",SOURCE_ACTION:"View Source",SVG_ACTION:"Save as SVG"},vl={vega:"Vega","vega-lite":"Vega-Lite"},V0={vega:qr.version,"vega-lite":pf?pf.version:"not available"},Phe={vega:e=>e,"vega-lite":(e,t)=>pf.compile(e,{config:t}).spec},Ihe=` - - - - -`,zhe="chart-wrapper";function Bhe(e){return typeof e=="function"}function B_(e,t,n,r){const i=`${t}
`,a=`
${n}`,s=window.open("");s.document.write(i+e+a),s.document.title=`${vl[r]} JSON Source`}function Uhe(e,t){if(e.$schema){const n=yD(e.$schema);t&&t!==n.library&&console.warn(`The given visualization spec is written in ${vl[n.library]}, but mode argument sets ${vl[t]??t}.`);const r=n.library;return AD(V0[r],`^${n.version.slice(1)}`)||console.warn(`The input spec uses ${vl[r]} ${n.version}, but the current version of ${vl[r]} is v${V0[r]}.`),r}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":t??"vega"}function CD(e){return!!(e&&"load"in e)}function U_(e){return CD(e)?e:qr.loader(e)}function jhe(e){var n;const t=((n=e.usermeta)==null?void 0:n.embedOptions)??{};return X(t.defaultStyle)&&(t.defaultStyle=!1),t}async function qhe(e,t,n={}){let r,i;X(t)?(i=U_(n.loader),r=JSON.parse(await i.load(t))):r=t;const a=jhe(r),s=a.loader;(!i||s)&&(i=U_(n.loader??s));const o=await j_(a,i),u=await j_(n,i),c={...kD(u,o),config:ec(u.config??{},o.config??{})};return await Hhe(e,r,c,i)}async function j_(e,t){const n=X(e.config)?JSON.parse(await t.load(e.config)):e.config??{},r=X(e.patch)?JSON.parse(await t.load(e.patch)):e.patch;return{...e,...r?{patch:r}:{},...n?{config:n}:{}}}function Whe(e){const t=e.getRootNode?e.getRootNode():document;return t instanceof ShadowRoot?{root:t,rootContainer:t}:{root:document,rootContainer:document.head??document.body}}async function Hhe(e,t,n={},r){const i=n.theme?ec(Ede[n.theme],n.config??{}):n.config,a=Za(n.actions)?n.actions:kD({},Rhe,n.actions??{}),s={...Lhe,...n.i18n},o=n.renderer??"canvas",u=n.logLevel??qr.Warn,c=n.downloadFileName??"visualization",l=typeof e=="string"?document.querySelector(e):e;if(!l)throw new Error(`${e} does not exist`);if(n.defaultStyle!==!1){const _="vega-embed-style",{root:E,rootContainer:w}=Whe(l);if(!E.getElementById(_)){const S=document.createElement("style");S.id=_,S.innerHTML=n.defaultStyle===void 0||n.defaultStyle===!0?Dhe.toString():n.defaultStyle,w.appendChild(S)}}const f=Uhe(t,n.mode);let d=Phe[f](t,i);if(f==="vega-lite"&&d.$schema){const _=yD(d.$schema);AD(V0.vega,`^${_.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${_.version}, but current version is v${V0.vega}.`)}l.classList.add("vega-embed"),a&&l.classList.add("has-actions"),l.innerHTML="";let h=l;if(a){const _=document.createElement("div");_.classList.add(zhe),l.appendChild(_),h=_}const g=n.patch;if(g&&(d=g instanceof Function?g(d):K0(d,g,!0,!1).newDocument),n.formatLocale&&qr.formatLocale(n.formatLocale),n.timeFormatLocale&&qr.timeFormatLocale(n.timeFormatLocale),n.expressionFunctions)for(const _ in n.expressionFunctions){const E=n.expressionFunctions[_];"fn"in E?qr.expressionFunction(_,E.fn,E.visitor):E instanceof Function&&qr.expressionFunction(_,E)}const{ast:p}=n,m=qr.parse(d,f==="vega-lite"?{}:i,{ast:p}),b=new(n.viewClass||qr.View)(m,{loader:r,logLevel:u,renderer:o,...p?{expr:qr.expressionInterpreter??n.expr??Cne}:{}});if(b.addSignalListener("autosize",(_,E)=>{const{type:w}=E;w=="fit-x"?(h.classList.add("fit-x"),h.classList.remove("fit-y")):w=="fit-y"?(h.classList.remove("fit-x"),h.classList.add("fit-y")):w=="fit"?h.classList.add("fit-x","fit-y"):h.classList.remove("fit-x","fit-y")}),n.tooltip!==!1){const{loader:_,tooltip:E}=n,w=_&&!CD(_)?_==null?void 0:_.baseURL:void 0,S=Bhe(E)?E:new Tde({baseURL:w,...E===!0?{}:E}).call;b.tooltip(S)}let{hover:y}=n;if(y===void 0&&(y=f==="vega"),y){const{hoverSet:_,updateSet:E}=typeof y=="boolean"?{}:y;b.hover(_,E)}n&&(n.width!=null&&b.width(n.width),n.height!=null&&b.height(n.height),n.padding!=null&&b.padding(n.padding)),await b.initialize(h,n.bind).runAsync();let v;if(a!==!1){let _=l;if(n.defaultStyle!==!1||n.forceActionsMenu){const w=document.createElement("details");w.title=s.CLICK_TO_VIEW_ACTIONS,l.append(w),_=w;const S=document.createElement("summary");S.innerHTML=Ihe,w.append(S),v=$=>{w.contains($.target)||w.removeAttribute("open")},document.addEventListener("click",v)}const E=document.createElement("div");if(_.append(E),E.classList.add("vega-actions"),a===!0||a.export!==!1){for(const w of["svg","png"])if(a===!0||a.export===!0||a.export[w]){const S=s[`${w.toUpperCase()}_ACTION`],$=document.createElement("a"),F=V(n.scaleFactor)?n.scaleFactor[w]:n.scaleFactor;$.text=S,$.href="#",$.target="_blank",$.download=`${c}.${w}`,$.addEventListener("mousedown",async function(k){k.preventDefault();const D=await b.toImageURL(w,F);this.href=D}),E.append($)}}if(a===!0||a.source!==!1){const w=document.createElement("a");w.text=s.SOURCE_ACTION,w.href="#",w.addEventListener("click",function(S){B_(i1(t),n.sourceHeader??"",n.sourceFooter??"",f),S.preventDefault()}),E.append(w)}if(f==="vega-lite"&&(a===!0||a.compiled!==!1)){const w=document.createElement("a");w.text=s.COMPILED_ACTION,w.href="#",w.addEventListener("click",function(S){B_(i1(d),n.sourceHeader??"",n.sourceFooter??"","vega"),S.preventDefault()}),E.append(w)}if(a===!0||a.editor!==!1){const w=n.editorUrl??"https://vega.github.io/editor/",S=document.createElement("a");S.text=s.EDITOR_ACTION,S.href="#",S.addEventListener("click",function($){Nhe(window,w,{config:i,mode:f,renderer:o,spec:i1(t)}),$.preventDefault()}),E.append(S)}}function x(){v&&document.removeEventListener("click",v),b.finalize()}return{view:b,spec:t,vgSpec:d,finalize:x,embedOptions:n}}const Ghe=[{id:"d05b72be-a5aa-40e4-9458-cd39a739ee5a",name:"projects"},{id:"f472c52a-6da4-4392-9f8c-464fde1ef0f2",name:"research",parent:"d05b72be-a5aa-40e4-9458-cd39a739ee5a"},{id:"e62091d9-1840-49aa-ba52-2fa18374e4fd",name:"infra",parent:"d05b72be-a5aa-40e4-9458-cd39a739ee5a"},{id:"125eeb61-6a53-4ece-9a5f-a94c6be92ea9",name:"other",parent:"d05b72be-a5aa-40e4-9458-cd39a739ee5a"},{id:"de7d562f-b513-4b00-a64d-78f9c60d77d0",name:"digital_preservation",parent:"f472c52a-6da4-4392-9f8c-464fde1ef0f2"},{id:"d17170ad-a131-4478-9d00-75231fd9a8cd",name:"analysis",parent:"f472c52a-6da4-4392-9f8c-464fde1ef0f2"},{id:"dc646dac-666b-4734-9dbf-409576635a4a",name:"infra",parent:"e62091d9-1840-49aa-ba52-2fa18374e4fd"},{id:"90886ac6-e53d-417a-960c-688a530cd4ea",name:"other",parent:"125eeb61-6a53-4ece-9a5f-a94c6be92ea9"},{id:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",name:"afrikanische_stimmen_in_islamischen_manuskripten",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"d1e6d69b-5e9a-4b4a-85ad-09aac56ed2d9",name:"anonym_classic",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"e52825b6-9bd6-4206-b99c-964521b5e773",name:"arabic_latin_corpus",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"e9bf3427-1c16-4bec-9d2d-22836ae7a4b9",name:"arabic_papyrology_database",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"ce6e74fb-c872-4ab4-a6f2-908232d0099a",name:"arches",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"3992a23d-8426-4b73-8b30-844e471e76e2",name:"averroes_commentary_on_the_physics_in_hebrew_and_latin_transmission",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"7c7438e6-4172-4059-ad60-54a6d0d61f7c",name:"averroes_de_partibus_animalium_and_de_generatione_animalium",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"a6e1fb68-e7a5-4125-8cfc-ec3aa16da73b",name:"averroes_edition",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"c3e206ec-9989-4500-ac20-4126e35871f2",name:"averroes_ibn_baggas_de_generatione_et_corruptione",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"f24e806a-0777-4690-b148-1b35ab3745e2",name:"averroes_ibn_baggas_physics",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"0a2ff403-834b-484f-b961-0822220bab58",name:"avestan_digital_archive",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"72bf1192-8af5-4df0-bd88-cf4d62d13d66",name:"a_digital_typology_of_arabic_documents",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"942e9692-8e2a-4060-84d8-c8db17eae689",name:"babmed",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"2ec36f1f-9f08-4284-964b-2f40a1d3e0db",name:"barlaam_and_josaphat",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"169677fd-14f9-46e7-b8f1-2202fb91397c",name:"beta_masaheft_manuscripts_of_ethiopia_and_eritrea",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"ab7e5659-177f-40ed-befb-5d0eecea737f",name:"bibliotheca_arabica",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"b485ffeb-bcbc-42a0-b141-4450ddc914e6",name:"borno_and_old_kanembu_islamic_manuscripts",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"4c68f56a-2c44-41c0-acb9-ece91afaf70c",name:"cab",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"b8097890-6eeb-43ba-890d-28e1490fde08",name:"cdli",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"95a2024b-9fea-4ced-8136-1130b0fb8f51",name:"colophons_in_sumerian_and_akkadian",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"0fd7b9cd-fdae-441b-a6fd-a791d4583ce0",name:"corpus_coranicum",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"1c38b421-95a2-4b2b-becf-119f36721a07",name:"corpus_masoreticum",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"5838a872-ff79-4e68-afff-edd784b0952e",name:"corpus_musicae_ottomanicae",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"9ed78f16-e6fa-4156-a03d-f6581b7b7367",name:"der_bibeltext_der_handschriften",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"0a75cf74-9cbe-4ce2-9799-ee16dcc1e88e",name:"digitalisierung_der_handschriften_ubl_1",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"cad00fa7-09a1-4df1-a08b-4ab5b2a48703",name:"digitalisierung_der_handschriften_ubl_2",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"df700e7b-1fad-4e54-b534-f63cf5805925",name:"digital_corpus_for_greco_arabic_studies",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"1b19963e-ffc5-48f0-a1b3-81553d601497",name:"digital_edition_of_the_coptic_old_testament",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"d1f743f2-7e94-4e00-a8bf-f46e56c7508e",name:"grasping_the_world_in_ottoman_istanbul",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"5f9179dc-cfdf-442b-b4a4-73ebf2f6256d",name:"hannah_arendt_digital",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"52ce273e-7935-42fd-82e8-806f6aaa3049",name:"hmml",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"da4755a8-5d05-4bda-8d2e-afab81c7ce27",name:"hpm",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"1a587e85-1385-40b0-b6eb-25ca8fa5042c",name:"humanweb",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"70944a30-3932-46bb-8c3f-410a48d9e0b9",name:"hunaynnet",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"04ea57c8-69c7-4c83-8249-753850e9cc53",name:"ibn_nubata_gesamtedition",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",name:"intersame",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"8e4ab5b4-7298-4d55-b490-eb2943527981",name:"irankoran",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",name:"islamic_painted_page",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"9efa71cc-aaf8-4481-a155-caa8d9fe23c1",name:"mesopotamian_royal_inscriptions",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"9497c5c0-0cdc-4f43-96de-4843bd246bac",name:"mesopotamian_seals",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"bef67936-aeda-45ea-86fa-d06d79620459",name:"nimrud_palace",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"e050deba-6e1d-4d82-851b-cf6c1f7187a5",name:"nomansland",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"4ed4b218-0a06-4ae1-857a-1d87a9371e08",name:"open_arabic_pe",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"3e56a148-845f-4a39-a7d4-c05c75cabd31",name:"oracc",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"a4fa5143-90d2-42ba-a8a1-424b09696b1c",name:"orient_digital",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"d5448b02-b57f-429d-9553-637cc2add035",name:"paleocoran",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"c2c309a5-923c-4759-ae83-f870b10dceff",name:"patterns_of_knowledge_circulation",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"d0bda69f-d8c4-4521-ab18-af2c097ffcfc",name:"pre_19th_century_kurmanji_kurdish",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"a9ca5d9f-47ab-4704-ad27-9a09e492ca2a",name:"ptolemaeus_arabus_et_latinus",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"3c5b84d0-791c-43bc-ab68-7372478bc568",name:"qalamos",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"6298a9cd-d41a-40d8-91d0-c532692e95c9",name:"qhod",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"ff1ec94f-2233-46e9-b550-45c792ae581e",name:"qhod_die_grossbotschaften",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"e9b15bcd-05ec-4de1-95f5-07d5bb44e482",name:"qhod_die_schreiben_selims_ii",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"38e6dfb4-730a-4a80-8090-4b7ea551b3c7",name:"refaiya",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"32bc596c-eafd-4bd2-8df3-f1ab5cff4ad6",name:"romantic_period_poetry_archive",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"9513964d-3509-462e-9d64-c47fd3922459",name:"scripta_qumranica_electronica",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"177501b1-c847-4547-a757-76f56c5af15f",name:"sefaria_org",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"81d8ad85-5da8-457f-99a3-6ab11128ef03",name:"sfardata",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"1b2ca0bf-fb29-4b5c-852b-2eedd6a85773",name:"sharia_source",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"880f1d65-b815-4474-9fb4-b17f13bd3765",name:"streamlining_galen",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"827f5ce7-a331-44fe-b40a-5cd93f348a0a",name:"synoptische_edition_des_kabbalistischen_traktats_keter_shem_tov",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"33a6a747-4180-4e28-a99c-2bf6dcf53200",name:"the_formation_of_islam",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"e9e4a759-5a0c-4d7d-aa61-49051477ab2f",name:"the_literary_history_of_medicine_online",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"57622367-8250-4932-ab3e-0356615d578a",name:"tierrecht_und_strafen",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"a2984fec-9396-488e-ad56-d3d21dc49052",name:"verse_und_sprueche",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"e17c5b2a-7619-40bd-bddd-51063f687cb0",name:"ymdi",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"cb428a09-41a6-4b68-b81e-8e72e23e6aba",name:"muya",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"bef2e507-b663-422e-9dd3-7e49ca299f05",name:"open_iti",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"01ac0c0c-b09c-40cf-a75f-42e540b67c2f",name:"kohd_digital",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",name:"acp",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"e3fec817-a269-4359-b028-a542387b1cce",name:"apsearch",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"46aff246-b6ef-4632-90c2-0993a9f9b1f5",name:"alc",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"5d194da4-2d99-4793-9757-59a197059b9b",name:"casg",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"aec92ee9-7c8a-49ce-8491-46667fc75505",name:"mesmom",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"97408d45-9570-4cad-a623-6007573bf070",name:"ocimco",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"fbd22cab-b0b1-4ed4-aa1a-9f675c19c1af",name:"titus",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"f67c8fcd-d190-4419-a85a-e6998da4f0ba",name:"kohd_coptica",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"fbf007e0-7eee-4bb1-801d-568785d43d04",name:"ethio_spare",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"77ae1011-1b54-46b5-b676-02895e3300fc",name:"traces",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",name:"cmcl",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"43faf354-6069-4d15-9e04-bcb5813bc67a",name:"elephantine",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"2253d7f2-c150-44e2-9a8a-c7c5ba0ab661",name:"classicmayan",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"7d8eb5d0-6284-4939-a48b-7ff7a2407989",name:"mpcd",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"9734b5c3-fa35-4e45-878e-1deb62db97d5",name:"fihrist",parent:"de7d562f-b513-4b00-a64d-78f9c60d77d0",parentname:"digital_preservation",url:""},{id:"5e7ab61a-0c33-44fc-8175-a1930e6d08bc",name:"acdc",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"a4d189e4-f03f-4db0-8742-b777e22da760",name:"altaegyptisches_woerterbuch",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"8682a8f5-b601-4a6c-808c-aa4b7ce8a7c4",name:"al_turayya_project",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"6a7e308d-0588-40b5-9a22-09354d313806",name:"arabic_latin_glossary",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"71ff37e4-7e16-4c1f-b0a9-9bf47778d41f",name:"a_digital_synopsis_of_the_mishnah_and_tosefta",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"c523675a-0e54-4d1e-8d08-2395d58323e3",name:"biblia_arabica",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"614f4c99-0d96-48a9-baa5-48a402a8deec",name:"bldcil",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"9fbb8b57-bd55-4b84-ab51-2c8a0d7ec5bc",name:"coptic_ocr",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"5f57a071-60c1-4fd2-b191-8fa8d15d70bb",name:"coranica",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"eb1591d7-75b9-4d62-9f67-0679e627587b",name:"corpus_builder",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",name:"demarginalizing_medieval_africa",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"5c1c0e5b-cb6c-4d8e-9d1e-55e622a3ca40",name:"dhimmis_and_muslims",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"5209d91c-6fe3-4349-9a58-c5fde8c62ebf",name:"digital_sirah_project",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"a8ee7d05-56b3-4312-8e1a-a07a46fdc809",name:"dobes",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",name:"documentation_of_gorani",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"6f32aa08-b11d-48f4-8a9d-8f76738dc62e",name:"doha_historical_dictionary",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",name:"evolution_of_islamic_societies",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"31ad93ff-ca97-4cf0-b30c-60685624e2c8",name:"e_scriptorium",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"94044a63-eae5-4e1d-ba04-64874109fc36",name:"genesis_rabbah_loanwords",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"7a287a76-c663-413d-9e3e-3191b1d6093e",name:"glossarium_graeco_arabicum",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"da852d13-2483-443b-a2f3-77c0d19d08bd",name:"isnalyser",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"d4d49850-4711-4d43-97e9-c3563626d8df",name:"kitab",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"583ab46e-ccb8-4a49-9912-7771683cd605",name:"majlis",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"47a62965-3241-4531-b01a-a25e25dac602",name:"mtaac",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"b37c6bd1-90d3-4718-ab58-fb1d60873186",name:"multi_cast",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"9a4a2962-fbf2-4a52-a1ea-53af8e3d0842",name:"newnlp",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"ddbb569b-1542-40fe-9fa7-3842610945c8",name:"onomasticon_arabicum",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"786edd87-476e-42a6-bcc0-521833ec73e5",name:"open_iti_aocp",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"2adf7ddc-9dd5-49b3-842c-9dc48dbbf36e",name:"pal_read",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"c1a2957b-0c24-46e6-9a67-381997525a87",name:"post_predicate_elements_in_iranian",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"99718590-5e1e-4a64-bf84-6e2213ad1836",name:"qumran_digital_text_und_lexikon",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"b0da2d75-183c-4fa4-8b12-47366c02ed7c",name:"ria",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"9078ff92-18f1-4019-a9f3-8c7d9aaa0db8",name:"sabaweb",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"87d036b9-5145-47d0-8d0e-83bb6821f3fe",name:"saop",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"0cf58379-39c3-4e95-b7b1-cc9f7f11c7ba",name:"scripta_psl",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"68422d65-ccba-4dcb-8a0e-bd4f3f9e1dc9",name:"shawi",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"85d053c3-4ce6-4130-bc6a-63f96acfb067",name:"strukturen_und_transformationen",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"fdda3e43-e15b-4c64-a99d-924f37152cc9",name:"syriaca_org",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"ce4fc765-1578-4cfb-8efa-b82387c99590",name:"tikkoun_sofrim",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"2b2d72f0-c4d6-462b-b47f-7c3550acdad3",name:"time_space_relations_in_hadith_literature",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"79462111-75a7-4fa0-8e11-9d424293a074",name:"tunico",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"325a929a-6764-41e1-b452-6556209fa74f",name:"tunocent",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"8f343a28-a873-449c-b359-efcfab7d1201",name:"vicav",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"e9cb8ab1-2d2c-4cc3-a44d-a793220a8638",name:"wibarab",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"5f3c2fbb-ca17-41c9-acdb-d3e147869400",name:"wissensgemeinschaften",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"7050ac6d-523c-4ba0-b381-48ec200ff6c4",name:"kalimat",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"d5dd164d-1887-473f-8282-584b8d09474d",name:"moving_frontiers",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"20ee58f5-f699-4262-a473-7765e249c871",name:"sihafa",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"5416d598-83e8-4b34-b4d8-6beea3faf6f2",name:"ali",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"fb7e7faa-8797-4db7-9061-3498dd7e1c6d",name:"zodiac",parent:"d17170ad-a131-4478-9d00-75231fd9a8cd",parentname:"analysis",url:""},{id:"5755bad5-4162-48ce-84b4-997819fa61b7",name:"kallimachos",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"6c5643df-bfb8-48e8-a7c6-473146cf497d",name:"kompetenzwerk_d",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"2860c96f-323e-4c33-97c6-4219bcf99f52",name:"open_encyclopedia_system",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"4a8c71d9-bdf0-4df1-9980-b13fb5b1af3b",name:"arbeitsstelle_kleine_faecher",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"a0e93701-b975-4760-b3cc-0204f54be3d1",name:"arche",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"eb8e91fe-952e-48b7-af0d-c026ebe37826",name:"bildverarbeitung_bestimmung_von_visuellen_manuskript_und_zeichenmerkmalen",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"f87c6596-0ce3-4f2e-8ec5-ea5d17253bba",name:"change_projekt",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"842dc7b3-020c-47ea-a37e-d5e5aae0bde0",name:"clariah_de",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"7e14a810-7d07-4e60-96eb-01fccf9323e8",name:"clarin",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"b5604b8b-e9fa-43d3-af0d-ef287cc2fee7",name:"clarin_d",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"894f2c88-1713-480d-99cd-32d30f3c0ac2",name:"cls_infra",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"1ae31b2f-5c67-49a7-9fba-c162b314bbcb",name:"dariah",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"ea8a1aa5-a2a1-4d4a-9254-f647158c66fa",name:"dariah_de",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",name:"datenrepositorium_manuskriptkulturen",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"43f49ea7-ec28-4e08-9ff4-57de8c755acd",name:"elexis",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"2fd5c31a-17a5-41ea-ae62-b6c2d3921cf5",name:"fdnext",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"ee6404e6-57f0-4e11-bb4a-1bbd13b08cb7",name:"glossarion",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"d0a1971a-e11b-442f-ab1a-6d8d421422c5",name:"handschriftenportal",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"892b783d-1788-451f-9efd-1c58bfb4b064",name:"methoden_der_manuskriptanalyse_zur_wiedergewinnung_verlorener_schrift",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"3c5fd869-4651-414c-a0f1-b1254712b689",name:"pudel",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"2689651d-1e28-4f26-ac43-cfdca097d837",name:"text_plus",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"fcbda96b-0c65-4ac9-9047-bde2323a0cb4",name:"virtuelle_archive_fuer_die_geisteswissenschaftliche_forschung",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"28b08ba5-2a3f-4f35-a909-7a745c26ba55",name:"text_grid",parent:"dc646dac-666b-4734-9dbf-409576635a4a",parentname:"infra",url:""},{id:"173631fa-ddc3-4762-bfd9-5bf40ccef41a",name:"ada_center",parent:"90886ac6-e53d-417a-960c-688a530cd4ea",parentname:"other",url:""},{id:"85590bb4-4b9a-49c9-8e41-d548a7d234e1",name:"hist-me",parent:"90886ac6-e53d-417a-960c-688a530cd4ea",parentname:"other",url:""},{id:"377201a9-9b09-4a6b-b5e8-873190633e78",name:"mela",parent:"90886ac6-e53d-417a-960c-688a530cd4ea",parentname:"other",url:""},{id:"862e636c-6757-4dc6-a382-b77768b69cbc",name:"the_islamic_manuscript_association",parent:"90886ac6-e53d-417a-960c-688a530cd4ea",parentname:"other",url:""},{id:"b583a2f6-22bb-4ddb-8639-c9a9aa7b511b",name:"topoi",parent:"90886ac6-e53d-417a-960c-688a530cd4ea",parentname:"other",url:""},{id:"9ca46873-3089-4a04-99fa-89c0c1b01213",name:"understanding_written_artefacts",parent:"90886ac6-e53d-417a-960c-688a530cd4ea",parentname:"other",url:""},{id:"7050ac6d-523c-4ba0-b381-48ec200ff6c4",name:"kalimat",parent:"90886ac6-e53d-417a-960c-688a530cd4ea",parentname:"other",url:""},{id:"e3fec817-a269-4359-b028-a542387b1cce",name:"apsearch",parent:"90886ac6-e53d-417a-960c-688a530cd4ea",parentname:"other",url:""}],Yhe=[{source:"e9bf3427-1c16-4bec-9d2d-22836ae7a4b9",target:"72bf1192-8af5-4df0-bd88-cf4d62d13d66"},{source:"a6e1fb68-e7a5-4125-8cfc-ec3aa16da73b",target:"3992a23d-8426-4b73-8b30-844e471e76e2"},{source:"a6e1fb68-e7a5-4125-8cfc-ec3aa16da73b",target:"c3e206ec-9989-4500-ac20-4126e35871f2"},{source:"a6e1fb68-e7a5-4125-8cfc-ec3aa16da73b",target:"7c7438e6-4172-4059-ad60-54a6d0d61f7c"},{source:"a6e1fb68-e7a5-4125-8cfc-ec3aa16da73b",target:"f24e806a-0777-4690-b148-1b35ab3745e2"},{source:"b8097890-6eeb-43ba-890d-28e1490fde08",target:"9efa71cc-aaf8-4481-a155-caa8d9fe23c1"},{source:"b8097890-6eeb-43ba-890d-28e1490fde08",target:"bef67936-aeda-45ea-86fa-d06d79620459"},{source:"b8097890-6eeb-43ba-890d-28e1490fde08",target:"9497c5c0-0cdc-4f43-96de-4843bd246bac"},{source:"b8097890-6eeb-43ba-890d-28e1490fde08",target:"3e56a148-845f-4a39-a7d4-c05c75cabd31"},{source:"7e14a810-7d07-4e60-96eb-01fccf9323e8",target:"b5604b8b-e9fa-43d3-af0d-ef287cc2fee7"},{source:"b5604b8b-e9fa-43d3-af0d-ef287cc2fee7",target:"842dc7b3-020c-47ea-a37e-d5e5aae0bde0"},{source:"1ae31b2f-5c67-49a7-9fba-c162b314bbcb",target:"ea8a1aa5-a2a1-4d4a-9254-f647158c66fa"},{source:"1ae31b2f-5c67-49a7-9fba-c162b314bbcb",target:"894f2c88-1713-480d-99cd-32d30f3c0ac2"},{source:"ea8a1aa5-a2a1-4d4a-9254-f647158c66fa",target:"842dc7b3-020c-47ea-a37e-d5e5aae0bde0"},{source:"a8ee7d05-56b3-4312-8e1a-a07a46fdc809",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"d4d49850-4711-4d43-97e9-c3563626d8df",target:"5209d91c-6fe3-4349-9a58-c5fde8c62ebf"},{source:"97408d45-9570-4cad-a623-6007573bf070",target:"9734b5c3-fa35-4e45-878e-1deb62db97d5"},{source:"bef2e507-b663-422e-9dd3-7e49ca299f05",target:"5e7ab61a-0c33-44fc-8175-a1930e6d08bc"},{source:"bef2e507-b663-422e-9dd3-7e49ca299f05",target:"eb1591d7-75b9-4d62-9f67-0679e627587b"},{source:"bef2e507-b663-422e-9dd3-7e49ca299f05",target:"786edd87-476e-42a6-bcc0-521833ec73e5"},{source:"bef2e507-b663-422e-9dd3-7e49ca299f05",target:"31ad93ff-ca97-4cf0-b30c-60685624e2c8"},{source:"a4fa5143-90d2-42ba-a8a1-424b09696b1c",target:"3c5b84d0-791c-43bc-ab68-7372478bc568"},{source:"6298a9cd-d41a-40d8-91d0-c532692e95c9",target:"ff1ec94f-2233-46e9-b550-45c792ae581e"},{source:"6298a9cd-d41a-40d8-91d0-c532692e95c9",target:"e9b15bcd-05ec-4de1-95f5-07d5bb44e482"},{source:"0cf58379-39c3-4e95-b7b1-cc9f7f11c7ba",target:"31ad93ff-ca97-4cf0-b30c-60685624e2c8"},{source:"1b2ca0bf-fb29-4b5c-852b-2eedd6a85773",target:"eb1591d7-75b9-4d62-9f67-0679e627587b"},{source:"1b2ca0bf-fb29-4b5c-852b-2eedd6a85773",target:"786edd87-476e-42a6-bcc0-521833ec73e5"},{source:"2b2d72f0-c4d6-462b-b47f-7c3550acdad3",target:"da852d13-2483-443b-a2f3-77c0d19d08bd"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"d1f743f2-7e94-4e00-a8bf-f46e56c7508e"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"95a2024b-9fea-4ced-8136-1130b0fb8f51"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"a2984fec-9396-488e-ad56-d3d21dc49052",target:"ee6404e6-57f0-4e11-bb4a-1bbd13b08cb7"}],Xhe=[{source:"5e7ab61a-0c33-44fc-8175-a1930e6d08bc",target:"786edd87-476e-42a6-bcc0-521833ec73e5"},{source:"5e7ab61a-0c33-44fc-8175-a1930e6d08bc",target:"eb1591d7-75b9-4d62-9f67-0679e627587b"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"d1f743f2-7e94-4e00-a8bf-f46e56c7508e"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"95a2024b-9fea-4ced-8136-1130b0fb8f51"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"b333a11d-b9fc-4379-9e21-fbddfa9500b1",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"9ca46873-3089-4a04-99fa-89c0c1b01213"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"eaf36ccc-5ee4-4749-80ea-7f71f479c968",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"46aff246-b6ef-4632-90c2-0993a9f9b1f5",target:"a2984fec-9396-488e-ad56-d3d21dc49052"},{source:"46aff246-b6ef-4632-90c2-0993a9f9b1f5",target:"2adf7ddc-9dd5-49b3-842c-9dc48dbbf36e"},{source:"46aff246-b6ef-4632-90c2-0993a9f9b1f5",target:"7050ac6d-523c-4ba0-b381-48ec200ff6c4"},{source:"46aff246-b6ef-4632-90c2-0993a9f9b1f5",target:"aec92ee9-7c8a-49ce-8491-46667fc75505"},{source:"a4d189e4-f03f-4db0-8742-b777e22da760",target:"0fd7b9cd-fdae-441b-a6fd-a791d4583ce0"},{source:"a4d189e4-f03f-4db0-8742-b777e22da760",target:"85d053c3-4ce6-4130-bc6a-63f96acfb067"},{source:"d1e6d69b-5e9a-4b4a-85ad-09aac56ed2d9",target:"a2984fec-9396-488e-ad56-d3d21dc49052"},{source:"d1e6d69b-5e9a-4b4a-85ad-09aac56ed2d9",target:"2adf7ddc-9dd5-49b3-842c-9dc48dbbf36e"},{source:"d1e6d69b-5e9a-4b4a-85ad-09aac56ed2d9",target:"7050ac6d-523c-4ba0-b381-48ec200ff6c4"},{source:"d1e6d69b-5e9a-4b4a-85ad-09aac56ed2d9",target:"aec92ee9-7c8a-49ce-8491-46667fc75505"},{source:"e52825b6-9bd6-4206-b99c-964521b5e773",target:"6a7e308d-0588-40b5-9a22-09354d313806"},{source:"6a7e308d-0588-40b5-9a22-09354d313806",target:"e52825b6-9bd6-4206-b99c-964521b5e773"},{source:"3992a23d-8426-4b73-8b30-844e471e76e2",target:"c3e206ec-9989-4500-ac20-4126e35871f2"},{source:"3992a23d-8426-4b73-8b30-844e471e76e2",target:"7c7438e6-4172-4059-ad60-54a6d0d61f7c"},{source:"3992a23d-8426-4b73-8b30-844e471e76e2",target:"f24e806a-0777-4690-b148-1b35ab3745e2"},{source:"7c7438e6-4172-4059-ad60-54a6d0d61f7c",target:"3992a23d-8426-4b73-8b30-844e471e76e2"},{source:"7c7438e6-4172-4059-ad60-54a6d0d61f7c",target:"c3e206ec-9989-4500-ac20-4126e35871f2"},{source:"7c7438e6-4172-4059-ad60-54a6d0d61f7c",target:"f24e806a-0777-4690-b148-1b35ab3745e2"},{source:"c3e206ec-9989-4500-ac20-4126e35871f2",target:"3992a23d-8426-4b73-8b30-844e471e76e2"},{source:"c3e206ec-9989-4500-ac20-4126e35871f2",target:"7c7438e6-4172-4059-ad60-54a6d0d61f7c"},{source:"c3e206ec-9989-4500-ac20-4126e35871f2",target:"f24e806a-0777-4690-b148-1b35ab3745e2"},{source:"f24e806a-0777-4690-b148-1b35ab3745e2",target:"3992a23d-8426-4b73-8b30-844e471e76e2"},{source:"f24e806a-0777-4690-b148-1b35ab3745e2",target:"c3e206ec-9989-4500-ac20-4126e35871f2"},{source:"f24e806a-0777-4690-b148-1b35ab3745e2",target:"7c7438e6-4172-4059-ad60-54a6d0d61f7c"},{source:"0a2ff403-834b-484f-b961-0822220bab58",target:"4c68f56a-2c44-41c0-acb9-ece91afaf70c"},{source:"0a2ff403-834b-484f-b961-0822220bab58",target:"57622367-8250-4932-ab3e-0356615d578a"},{source:"0a2ff403-834b-484f-b961-0822220bab58",target:"7d8eb5d0-6284-4939-a48b-7ff7a2407989"},{source:"71ff37e4-7e16-4c1f-b0a9-9bf47778d41f",target:"c2c309a5-923c-4759-ae83-f870b10dceff"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"9ca46873-3089-4a04-99fa-89c0c1b01213"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"d1f743f2-7e94-4e00-a8bf-f46e56c7508e"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"169677fd-14f9-46e7-b8f1-2202fb91397c",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"9ca46873-3089-4a04-99fa-89c0c1b01213"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"eb8e91fe-952e-48b7-af0d-c026ebe37826",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"614f4c99-0d96-48a9-baa5-48a402a8deec",target:"b37c6bd1-90d3-4718-ab58-fb1d60873186"},{source:"614f4c99-0d96-48a9-baa5-48a402a8deec",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"614f4c99-0d96-48a9-baa5-48a402a8deec",target:"d0bda69f-d8c4-4521-ab18-af2c097ffcfc"},{source:"614f4c99-0d96-48a9-baa5-48a402a8deec",target:"c1a2957b-0c24-46e6-9a67-381997525a87"},{source:"4c68f56a-2c44-41c0-acb9-ece91afaf70c",target:"0a2ff403-834b-484f-b961-0822220bab58"},{source:"4c68f56a-2c44-41c0-acb9-ece91afaf70c",target:"57622367-8250-4932-ab3e-0356615d578a"},{source:"4c68f56a-2c44-41c0-acb9-ece91afaf70c",target:"7d8eb5d0-6284-4939-a48b-7ff7a2407989"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289",target:"9ca46873-3089-4a04-99fa-89c0c1b01213"},{source:"95a2024b-9fea-4ced-8136-1130b0fb8f51",target:"d1f743f2-7e94-4e00-a8bf-f46e56c7508e"},{source:"95a2024b-9fea-4ced-8136-1130b0fb8f51",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"5f57a071-60c1-4fd2-b191-8fa8d15d70bb",target:"0fd7b9cd-fdae-441b-a6fd-a791d4583ce0"},{source:"eb1591d7-75b9-4d62-9f67-0679e627587b",target:"786edd87-476e-42a6-bcc0-521833ec73e5"},{source:"eb1591d7-75b9-4d62-9f67-0679e627587b",target:"5e7ab61a-0c33-44fc-8175-a1930e6d08bc"},{source:"0fd7b9cd-fdae-441b-a6fd-a791d4583ce0",target:"a4d189e4-f03f-4db0-8742-b777e22da760"},{source:"0fd7b9cd-fdae-441b-a6fd-a791d4583ce0",target:"5f57a071-60c1-4fd2-b191-8fa8d15d70bb"},{source:"0fd7b9cd-fdae-441b-a6fd-a791d4583ce0",target:"8e4ab5b4-7298-4d55-b490-eb2943527981"},{source:"0fd7b9cd-fdae-441b-a6fd-a791d4583ce0",target:"d5448b02-b57f-429d-9553-637cc2add035"},{source:"0fd7b9cd-fdae-441b-a6fd-a791d4583ce0",target:"85d053c3-4ce6-4130-bc6a-63f96acfb067"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"9ca46873-3089-4a04-99fa-89c0c1b01213"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"9ca46873-3089-4a04-99fa-89c0c1b01213"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"d1f743f2-7e94-4e00-a8bf-f46e56c7508e"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"46121edb-516b-4dbf-ba49-e2c5f07cec2e",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"0a75cf74-9cbe-4ce2-9799-ee16dcc1e88e",target:"cad00fa7-09a1-4df1-a08b-4ab5b2a48703"},{source:"0a75cf74-9cbe-4ce2-9799-ee16dcc1e88e",target:"38e6dfb4-730a-4a80-8090-4b7ea551b3c7"},{source:"cad00fa7-09a1-4df1-a08b-4ab5b2a48703",target:"0a75cf74-9cbe-4ce2-9799-ee16dcc1e88e"},{source:"cad00fa7-09a1-4df1-a08b-4ab5b2a48703",target:"38e6dfb4-730a-4a80-8090-4b7ea551b3c7"},{source:"1b19963e-ffc5-48f0-a1b3-81553d601497",target:"f67c8fcd-d190-4419-a85a-e6998da4f0ba"},{source:"1b19963e-ffc5-48f0-a1b3-81553d601497",target:"01ac0c0c-b09c-40cf-a75f-42e540b67c2f"},{source:"1b19963e-ffc5-48f0-a1b3-81553d601497",target:"99718590-5e1e-4a64-bf84-6e2213ad1836"},{source:"1b19963e-ffc5-48f0-a1b3-81553d601497",target:"9513964d-3509-462e-9d64-c47fd3922459"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"b37c6bd1-90d3-4718-ab58-fb1d60873186"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"614f4c99-0d96-48a9-baa5-48a402a8deec"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"d0bda69f-d8c4-4521-ab18-af2c097ffcfc"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"c1a2957b-0c24-46e6-9a67-381997525a87"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"9ca46873-3089-4a04-99fa-89c0c1b01213"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"9ca46873-3089-4a04-99fa-89c0c1b01213"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"fbf007e0-7eee-4bb1-801d-568785d43d04",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"9ca46873-3089-4a04-99fa-89c0c1b01213"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"94044a63-eae5-4e1d-ba04-64874109fc36",target:"e9cb8ab1-2d2c-4cc3-a44d-a793220a8638"},{source:"94044a63-eae5-4e1d-ba04-64874109fc36",target:"8f343a28-a873-449c-b359-efcfab7d1201"},{source:"94044a63-eae5-4e1d-ba04-64874109fc36",target:"68422d65-ccba-4dcb-8a0e-bd4f3f9e1dc9"},{source:"94044a63-eae5-4e1d-ba04-64874109fc36",target:"e050deba-6e1d-4d82-851b-cf6c1f7187a5"},{source:"94044a63-eae5-4e1d-ba04-64874109fc36",target:"79462111-75a7-4fa0-8e11-9d424293a074"},{source:"94044a63-eae5-4e1d-ba04-64874109fc36",target:"325a929a-6764-41e1-b452-6556209fa74f"},{source:"d1f743f2-7e94-4e00-a8bf-f46e56c7508e",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"d1f743f2-7e94-4e00-a8bf-f46e56c7508e",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"d1f743f2-7e94-4e00-a8bf-f46e56c7508e",target:"95a2024b-9fea-4ced-8136-1130b0fb8f51"},{source:"d1f743f2-7e94-4e00-a8bf-f46e56c7508e",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"1a587e85-1385-40b0-b6eb-25ca8fa5042c",target:"e17c5b2a-7619-40bd-bddd-51063f687cb0"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"9ca46873-3089-4a04-99fa-89c0c1b01213"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"8e4ab5b4-7298-4d55-b490-eb2943527981",target:"0fd7b9cd-fdae-441b-a6fd-a791d4583ce0"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"9ca46873-3089-4a04-99fa-89c0c1b01213"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"31534c48-6b74-4cc5-8aff-ea8dbc60c445",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"7050ac6d-523c-4ba0-b381-48ec200ff6c4",target:"2adf7ddc-9dd5-49b3-842c-9dc48dbbf36e"},{source:"7050ac6d-523c-4ba0-b381-48ec200ff6c4",target:"a2984fec-9396-488e-ad56-d3d21dc49052"},{source:"7050ac6d-523c-4ba0-b381-48ec200ff6c4",target:"d1e6d69b-5e9a-4b4a-85ad-09aac56ed2d9"},{source:"7050ac6d-523c-4ba0-b381-48ec200ff6c4",target:"46aff246-b6ef-4632-90c2-0993a9f9b1f5"},{source:"7050ac6d-523c-4ba0-b381-48ec200ff6c4",target:"aec92ee9-7c8a-49ce-8491-46667fc75505"},{source:"d4d49850-4711-4d43-97e9-c3563626d8df",target:"bef2e507-b663-422e-9dd3-7e49ca299f05"},{source:"f67c8fcd-d190-4419-a85a-e6998da4f0ba",target:"1b19963e-ffc5-48f0-a1b3-81553d601497"},{source:"f67c8fcd-d190-4419-a85a-e6998da4f0ba",target:"01ac0c0c-b09c-40cf-a75f-42e540b67c2f"},{source:"f67c8fcd-d190-4419-a85a-e6998da4f0ba",target:"99718590-5e1e-4a64-bf84-6e2213ad1836"},{source:"f67c8fcd-d190-4419-a85a-e6998da4f0ba",target:"9513964d-3509-462e-9d64-c47fd3922459"},{source:"01ac0c0c-b09c-40cf-a75f-42e540b67c2f",target:"1b19963e-ffc5-48f0-a1b3-81553d601497"},{source:"01ac0c0c-b09c-40cf-a75f-42e540b67c2f",target:"f67c8fcd-d190-4419-a85a-e6998da4f0ba"},{source:"01ac0c0c-b09c-40cf-a75f-42e540b67c2f",target:"99718590-5e1e-4a64-bf84-6e2213ad1836"},{source:"01ac0c0c-b09c-40cf-a75f-42e540b67c2f",target:"9513964d-3509-462e-9d64-c47fd3922459"},{source:"aec92ee9-7c8a-49ce-8491-46667fc75505",target:"d1e6d69b-5e9a-4b4a-85ad-09aac56ed2d9"},{source:"aec92ee9-7c8a-49ce-8491-46667fc75505",target:"a2984fec-9396-488e-ad56-d3d21dc49052"},{source:"aec92ee9-7c8a-49ce-8491-46667fc75505",target:"2adf7ddc-9dd5-49b3-842c-9dc48dbbf36e"},{source:"aec92ee9-7c8a-49ce-8491-46667fc75505",target:"46aff246-b6ef-4632-90c2-0993a9f9b1f5"},{source:"aec92ee9-7c8a-49ce-8491-46667fc75505",target:"7050ac6d-523c-4ba0-b381-48ec200ff6c4"},{source:"9efa71cc-aaf8-4481-a155-caa8d9fe23c1",target:"bef67936-aeda-45ea-86fa-d06d79620459"},{source:"9efa71cc-aaf8-4481-a155-caa8d9fe23c1",target:"9497c5c0-0cdc-4f43-96de-4843bd246bac"},{source:"9efa71cc-aaf8-4481-a155-caa8d9fe23c1",target:"3e56a148-845f-4a39-a7d4-c05c75cabd31"},{source:"9497c5c0-0cdc-4f43-96de-4843bd246bac",target:"9efa71cc-aaf8-4481-a155-caa8d9fe23c1"},{source:"9497c5c0-0cdc-4f43-96de-4843bd246bac",target:"bef67936-aeda-45ea-86fa-d06d79620459"},{source:"9497c5c0-0cdc-4f43-96de-4843bd246bac",target:"3e56a148-845f-4a39-a7d4-c05c75cabd31"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"9ca46873-3089-4a04-99fa-89c0c1b01213"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"892b783d-1788-451f-9efd-1c58bfb4b064",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"7d8eb5d0-6284-4939-a48b-7ff7a2407989",target:"0a2ff403-834b-484f-b961-0822220bab58"},{source:"7d8eb5d0-6284-4939-a48b-7ff7a2407989",target:"57622367-8250-4932-ab3e-0356615d578a"},{source:"7d8eb5d0-6284-4939-a48b-7ff7a2407989",target:"4c68f56a-2c44-41c0-acb9-ece91afaf70c"},{source:"b37c6bd1-90d3-4718-ab58-fb1d60873186",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"b37c6bd1-90d3-4718-ab58-fb1d60873186",target:"614f4c99-0d96-48a9-baa5-48a402a8deec"},{source:"b37c6bd1-90d3-4718-ab58-fb1d60873186",target:"d0bda69f-d8c4-4521-ab18-af2c097ffcfc"},{source:"b37c6bd1-90d3-4718-ab58-fb1d60873186",target:"c1a2957b-0c24-46e6-9a67-381997525a87"},{source:"bef67936-aeda-45ea-86fa-d06d79620459",target:"9efa71cc-aaf8-4481-a155-caa8d9fe23c1"},{source:"bef67936-aeda-45ea-86fa-d06d79620459",target:"9497c5c0-0cdc-4f43-96de-4843bd246bac"},{source:"bef67936-aeda-45ea-86fa-d06d79620459",target:"3e56a148-845f-4a39-a7d4-c05c75cabd31"},{source:"e050deba-6e1d-4d82-851b-cf6c1f7187a5",target:"e9cb8ab1-2d2c-4cc3-a44d-a793220a8638"},{source:"e050deba-6e1d-4d82-851b-cf6c1f7187a5",target:"94044a63-eae5-4e1d-ba04-64874109fc36"},{source:"e050deba-6e1d-4d82-851b-cf6c1f7187a5",target:"8f343a28-a873-449c-b359-efcfab7d1201"},{source:"e050deba-6e1d-4d82-851b-cf6c1f7187a5",target:"68422d65-ccba-4dcb-8a0e-bd4f3f9e1dc9"},{source:"e050deba-6e1d-4d82-851b-cf6c1f7187a5",target:"79462111-75a7-4fa0-8e11-9d424293a074"},{source:"e050deba-6e1d-4d82-851b-cf6c1f7187a5",target:"325a929a-6764-41e1-b452-6556209fa74f"},{source:"bef2e507-b663-422e-9dd3-7e49ca299f05",target:"d4d49850-4711-4d43-97e9-c3563626d8df"},{source:"786edd87-476e-42a6-bcc0-521833ec73e5",target:"5e7ab61a-0c33-44fc-8175-a1930e6d08bc"},{source:"786edd87-476e-42a6-bcc0-521833ec73e5",target:"eb1591d7-75b9-4d62-9f67-0679e627587b"},{source:"3e56a148-845f-4a39-a7d4-c05c75cabd31",target:"9efa71cc-aaf8-4481-a155-caa8d9fe23c1"},{source:"3e56a148-845f-4a39-a7d4-c05c75cabd31",target:"bef67936-aeda-45ea-86fa-d06d79620459"},{source:"3e56a148-845f-4a39-a7d4-c05c75cabd31",target:"9497c5c0-0cdc-4f43-96de-4843bd246bac"},{source:"d5448b02-b57f-429d-9553-637cc2add035",target:"0fd7b9cd-fdae-441b-a6fd-a791d4583ce0"},{source:"2adf7ddc-9dd5-49b3-842c-9dc48dbbf36e",target:"a2984fec-9396-488e-ad56-d3d21dc49052"},{source:"2adf7ddc-9dd5-49b3-842c-9dc48dbbf36e",target:"d1e6d69b-5e9a-4b4a-85ad-09aac56ed2d9"},{source:"2adf7ddc-9dd5-49b3-842c-9dc48dbbf36e",target:"7050ac6d-523c-4ba0-b381-48ec200ff6c4"},{source:"2adf7ddc-9dd5-49b3-842c-9dc48dbbf36e",target:"46aff246-b6ef-4632-90c2-0993a9f9b1f5"},{source:"2adf7ddc-9dd5-49b3-842c-9dc48dbbf36e",target:"aec92ee9-7c8a-49ce-8491-46667fc75505"},{source:"c2c309a5-923c-4759-ae83-f870b10dceff",target:"71ff37e4-7e16-4c1f-b0a9-9bf47778d41f"},{source:"c1a2957b-0c24-46e6-9a67-381997525a87",target:"b37c6bd1-90d3-4718-ab58-fb1d60873186"},{source:"c1a2957b-0c24-46e6-9a67-381997525a87",target:"614f4c99-0d96-48a9-baa5-48a402a8deec"},{source:"c1a2957b-0c24-46e6-9a67-381997525a87",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"c1a2957b-0c24-46e6-9a67-381997525a87",target:"d0bda69f-d8c4-4521-ab18-af2c097ffcfc"},{source:"d0bda69f-d8c4-4521-ab18-af2c097ffcfc",target:"b37c6bd1-90d3-4718-ab58-fb1d60873186"},{source:"d0bda69f-d8c4-4521-ab18-af2c097ffcfc",target:"614f4c99-0d96-48a9-baa5-48a402a8deec"},{source:"d0bda69f-d8c4-4521-ab18-af2c097ffcfc",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"d0bda69f-d8c4-4521-ab18-af2c097ffcfc",target:"c1a2957b-0c24-46e6-9a67-381997525a87"},{source:"ff1ec94f-2233-46e9-b550-45c792ae581e",target:"e9b15bcd-05ec-4de1-95f5-07d5bb44e482"},{source:"e9b15bcd-05ec-4de1-95f5-07d5bb44e482",target:"ff1ec94f-2233-46e9-b550-45c792ae581e"},{source:"99718590-5e1e-4a64-bf84-6e2213ad1836",target:"9513964d-3509-462e-9d64-c47fd3922459"},{source:"99718590-5e1e-4a64-bf84-6e2213ad1836",target:"1b19963e-ffc5-48f0-a1b3-81553d601497"},{source:"99718590-5e1e-4a64-bf84-6e2213ad1836",target:"f67c8fcd-d190-4419-a85a-e6998da4f0ba"},{source:"99718590-5e1e-4a64-bf84-6e2213ad1836",target:"01ac0c0c-b09c-40cf-a75f-42e540b67c2f"},{source:"99718590-5e1e-4a64-bf84-6e2213ad1836",target:"9513964d-3509-462e-9d64-c47fd3922459"},{source:"38e6dfb4-730a-4a80-8090-4b7ea551b3c7",target:"cad00fa7-09a1-4df1-a08b-4ab5b2a48703"},{source:"38e6dfb4-730a-4a80-8090-4b7ea551b3c7",target:"0a75cf74-9cbe-4ce2-9799-ee16dcc1e88e"},{source:"9513964d-3509-462e-9d64-c47fd3922459",target:"99718590-5e1e-4a64-bf84-6e2213ad1836"},{source:"9513964d-3509-462e-9d64-c47fd3922459",target:"1b19963e-ffc5-48f0-a1b3-81553d601497"},{source:"9513964d-3509-462e-9d64-c47fd3922459",target:"f67c8fcd-d190-4419-a85a-e6998da4f0ba"},{source:"9513964d-3509-462e-9d64-c47fd3922459",target:"01ac0c0c-b09c-40cf-a75f-42e540b67c2f"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"9ca46873-3089-4a04-99fa-89c0c1b01213"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"81d8ad85-5da8-457f-99a3-6ab11128ef03",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"68422d65-ccba-4dcb-8a0e-bd4f3f9e1dc9",target:"e9cb8ab1-2d2c-4cc3-a44d-a793220a8638"},{source:"68422d65-ccba-4dcb-8a0e-bd4f3f9e1dc9",target:"94044a63-eae5-4e1d-ba04-64874109fc36"},{source:"68422d65-ccba-4dcb-8a0e-bd4f3f9e1dc9",target:"8f343a28-a873-449c-b359-efcfab7d1201"},{source:"68422d65-ccba-4dcb-8a0e-bd4f3f9e1dc9",target:"e050deba-6e1d-4d82-851b-cf6c1f7187a5"},{source:"68422d65-ccba-4dcb-8a0e-bd4f3f9e1dc9",target:"79462111-75a7-4fa0-8e11-9d424293a074"},{source:"68422d65-ccba-4dcb-8a0e-bd4f3f9e1dc9",target:"325a929a-6764-41e1-b452-6556209fa74f"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"9ca46873-3089-4a04-99fa-89c0c1b01213"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"20ee58f5-f699-4262-a473-7765e249c871",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"85d053c3-4ce6-4130-bc6a-63f96acfb067",target:"a4d189e4-f03f-4db0-8742-b777e22da760"},{source:"85d053c3-4ce6-4130-bc6a-63f96acfb067",target:"0fd7b9cd-fdae-441b-a6fd-a791d4583ce0"},{source:"57622367-8250-4932-ab3e-0356615d578a",target:"0a2ff403-834b-484f-b961-0822220bab58"},{source:"57622367-8250-4932-ab3e-0356615d578a",target:"7d8eb5d0-6284-4939-a48b-7ff7a2407989"},{source:"57622367-8250-4932-ab3e-0356615d578a",target:"4c68f56a-2c44-41c0-acb9-ece91afaf70c"},{source:"ce4fc765-1578-4cfb-8efa-b82387c99590",target:"0cf58379-39c3-4e95-b7b1-cc9f7f11c7ba"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"b333a11d-b9fc-4379-9e21-fbddfa9500b1"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"9ca46873-3089-4a04-99fa-89c0c1b01213"},{source:"77ae1011-1b54-46b5-b676-02895e3300fc",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"79462111-75a7-4fa0-8e11-9d424293a074",target:"e9cb8ab1-2d2c-4cc3-a44d-a793220a8638"},{source:"79462111-75a7-4fa0-8e11-9d424293a074",target:"94044a63-eae5-4e1d-ba04-64874109fc36"},{source:"79462111-75a7-4fa0-8e11-9d424293a074",target:"8f343a28-a873-449c-b359-efcfab7d1201"},{source:"79462111-75a7-4fa0-8e11-9d424293a074",target:"68422d65-ccba-4dcb-8a0e-bd4f3f9e1dc9"},{source:"79462111-75a7-4fa0-8e11-9d424293a074",target:"e050deba-6e1d-4d82-851b-cf6c1f7187a5"},{source:"79462111-75a7-4fa0-8e11-9d424293a074",target:"325a929a-6764-41e1-b452-6556209fa74f"},{source:"325a929a-6764-41e1-b452-6556209fa74f",target:"e9cb8ab1-2d2c-4cc3-a44d-a793220a8638"},{source:"325a929a-6764-41e1-b452-6556209fa74f",target:"94044a63-eae5-4e1d-ba04-64874109fc36"},{source:"325a929a-6764-41e1-b452-6556209fa74f",target:"8f343a28-a873-449c-b359-efcfab7d1201"},{source:"325a929a-6764-41e1-b452-6556209fa74f",target:"68422d65-ccba-4dcb-8a0e-bd4f3f9e1dc9"},{source:"325a929a-6764-41e1-b452-6556209fa74f",target:"79462111-75a7-4fa0-8e11-9d424293a074"},{source:"325a929a-6764-41e1-b452-6556209fa74f",target:"e050deba-6e1d-4d82-851b-cf6c1f7187a5"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"169677fd-14f9-46e7-b8f1-2202fb91397c"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"46121edb-516b-4dbf-ba49-e2c5f07cec2e"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"eaf36ccc-5ee4-4749-80ea-7f71f479c968"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"659c0aba-3bdd-43eb-937d-dad4ad63e3fc"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"bb852d81-0c6d-4413-8c20-1bb38c4db4e7"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"eb8e91fe-952e-48b7-af0d-c026ebe37826"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"894dcf0c-7295-4fb8-b4ba-866a5ebe3310"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"17fa004d-c9d2-4ce3-8116-b7bfff5d14ed"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"31534c48-6b74-4cc5-8aff-ea8dbc60c445"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"892b783d-1788-451f-9efd-1c58bfb4b064"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"81d8ad85-5da8-457f-99a3-6ab11128ef03"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"20ee58f5-f699-4262-a473-7765e249c871"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"fbf007e0-7eee-4bb1-801d-568785d43d04"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"77ae1011-1b54-46b5-b676-02895e3300fc"},{source:"9ca46873-3089-4a04-99fa-89c0c1b01213",target:"c4f41a6d-9fb9-4c31-85f0-b66acfe41289"},{source:"a2984fec-9396-488e-ad56-d3d21dc49052",target:"2adf7ddc-9dd5-49b3-842c-9dc48dbbf36e"},{source:"a2984fec-9396-488e-ad56-d3d21dc49052",target:"d1e6d69b-5e9a-4b4a-85ad-09aac56ed2d9"},{source:"a2984fec-9396-488e-ad56-d3d21dc49052",target:"7050ac6d-523c-4ba0-b381-48ec200ff6c4"},{source:"a2984fec-9396-488e-ad56-d3d21dc49052",target:"46aff246-b6ef-4632-90c2-0993a9f9b1f5"},{source:"a2984fec-9396-488e-ad56-d3d21dc49052",target:"aec92ee9-7c8a-49ce-8491-46667fc75505"},{source:"8f343a28-a873-449c-b359-efcfab7d1201",target:"e9cb8ab1-2d2c-4cc3-a44d-a793220a8638"},{source:"8f343a28-a873-449c-b359-efcfab7d1201",target:"94044a63-eae5-4e1d-ba04-64874109fc36"},{source:"8f343a28-a873-449c-b359-efcfab7d1201",target:"68422d65-ccba-4dcb-8a0e-bd4f3f9e1dc9"},{source:"8f343a28-a873-449c-b359-efcfab7d1201",target:"e050deba-6e1d-4d82-851b-cf6c1f7187a5"},{source:"8f343a28-a873-449c-b359-efcfab7d1201",target:"79462111-75a7-4fa0-8e11-9d424293a074"},{source:"8f343a28-a873-449c-b359-efcfab7d1201",target:"325a929a-6764-41e1-b452-6556209fa74f"},{source:"e9cb8ab1-2d2c-4cc3-a44d-a793220a8638",target:"94044a63-eae5-4e1d-ba04-64874109fc36"},{source:"e9cb8ab1-2d2c-4cc3-a44d-a793220a8638",target:"8f343a28-a873-449c-b359-efcfab7d1201"},{source:"e9cb8ab1-2d2c-4cc3-a44d-a793220a8638",target:"68422d65-ccba-4dcb-8a0e-bd4f3f9e1dc9"},{source:"e9cb8ab1-2d2c-4cc3-a44d-a793220a8638",target:"e050deba-6e1d-4d82-851b-cf6c1f7187a5"},{source:"e9cb8ab1-2d2c-4cc3-a44d-a793220a8638",target:"79462111-75a7-4fa0-8e11-9d424293a074"},{source:"e9cb8ab1-2d2c-4cc3-a44d-a793220a8638",target:"325a929a-6764-41e1-b452-6556209fa74f"},{source:"e17c5b2a-7619-40bd-bddd-51063f687cb0",target:"1a587e85-1385-40b0-b6eb-25ca8fa5042c"}],Vhe=[{source:"46aff246-b6ef-4632-90c2-0993a9f9b1f5",target:"d1e6d69b-5e9a-4b4a-85ad-09aac56ed2d9"},{source:"d1e6d69b-5e9a-4b4a-85ad-09aac56ed2d9",target:"46aff246-b6ef-4632-90c2-0993a9f9b1f5"},{source:"0a2ff403-834b-484f-b961-0822220bab58",target:"57622367-8250-4932-ab3e-0356615d578a"},{source:"0a2ff403-834b-484f-b961-0822220bab58",target:"7d8eb5d0-6284-4939-a48b-7ff7a2407989"},{source:"0a2ff403-834b-484f-b961-0822220bab58",target:"4c68f56a-2c44-41c0-acb9-ece91afaf70c"},{source:"942e9692-8e2a-4060-84d8-c8db17eae689",target:"b8097890-6eeb-43ba-890d-28e1490fde08"},{source:"4c68f56a-2c44-41c0-acb9-ece91afaf70c",target:"57622367-8250-4932-ab3e-0356615d578a"},{source:"4c68f56a-2c44-41c0-acb9-ece91afaf70c",target:"0a2ff403-834b-484f-b961-0822220bab58"},{source:"4c68f56a-2c44-41c0-acb9-ece91afaf70c",target:"7d8eb5d0-6284-4939-a48b-7ff7a2407989"},{source:"b8097890-6eeb-43ba-890d-28e1490fde08",target:"47a62965-3241-4531-b01a-a25e25dac602"},{source:"b8097890-6eeb-43ba-890d-28e1490fde08",target:"b0da2d75-183c-4fa4-8b12-47366c02ed7c"},{source:"b8097890-6eeb-43ba-890d-28e1490fde08",target:"da4755a8-5d05-4bda-8d2e-afab81c7ce27"},{source:"b8097890-6eeb-43ba-890d-28e1490fde08",target:"942e9692-8e2a-4060-84d8-c8db17eae689"},{source:"7e14a810-7d07-4e60-96eb-01fccf9323e8",target:"43f49ea7-ec28-4e08-9ff4-57de8c755acd"},{source:"7e14a810-7d07-4e60-96eb-01fccf9323e8",target:"1ae31b2f-5c67-49a7-9fba-c162b314bbcb"},{source:"2253d7f2-c150-44e2-9a8a-c7c5ba0ab661",target:"28b08ba5-2a3f-4f35-a909-7a745c26ba55"},{source:"5f57a071-60c1-4fd2-b191-8fa8d15d70bb",target:"d5448b02-b57f-429d-9553-637cc2add035"},{source:"1ae31b2f-5c67-49a7-9fba-c162b314bbcb",target:"43f49ea7-ec28-4e08-9ff4-57de8c755acd"},{source:"1ae31b2f-5c67-49a7-9fba-c162b314bbcb",target:"7e14a810-7d07-4e60-96eb-01fccf9323e8"},{source:"0a75cf74-9cbe-4ce2-9799-ee16dcc1e88e",target:"3c5b84d0-791c-43bc-ab68-7372478bc568"},{source:"cad00fa7-09a1-4df1-a08b-4ab5b2a48703",target:"3c5b84d0-791c-43bc-ab68-7372478bc568"},{source:"43f49ea7-ec28-4e08-9ff4-57de8c755acd",target:"1ae31b2f-5c67-49a7-9fba-c162b314bbcb"},{source:"43f49ea7-ec28-4e08-9ff4-57de8c755acd",target:"7e14a810-7d07-4e60-96eb-01fccf9323e8"},{source:"da4755a8-5d05-4bda-8d2e-afab81c7ce27",target:"b8097890-6eeb-43ba-890d-28e1490fde08"},{source:"7050ac6d-523c-4ba0-b381-48ec200ff6c4",target:"2860c96f-323e-4c33-97c6-4219bcf99f52"},{source:"d5dd164d-1887-473f-8282-584b8d09474d",target:"33a6a747-4180-4e28-a99c-2bf6dcf53200"},{source:"7d8eb5d0-6284-4939-a48b-7ff7a2407989",target:"0a2ff403-834b-484f-b961-0822220bab58"},{source:"7d8eb5d0-6284-4939-a48b-7ff7a2407989",target:"4c68f56a-2c44-41c0-acb9-ece91afaf70c"},{source:"47a62965-3241-4531-b01a-a25e25dac602",target:"b8097890-6eeb-43ba-890d-28e1490fde08"},{source:"2860c96f-323e-4c33-97c6-4219bcf99f52",target:"7050ac6d-523c-4ba0-b381-48ec200ff6c4"},{source:"d5448b02-b57f-429d-9553-637cc2add035",target:"5f57a071-60c1-4fd2-b191-8fa8d15d70bb"},{source:"3c5b84d0-791c-43bc-ab68-7372478bc568",target:"0a75cf74-9cbe-4ce2-9799-ee16dcc1e88e"},{source:"3c5b84d0-791c-43bc-ab68-7372478bc568",target:"cad00fa7-09a1-4df1-a08b-4ab5b2a48703"},{source:"3c5b84d0-791c-43bc-ab68-7372478bc568",target:"38e6dfb4-730a-4a80-8090-4b7ea551b3c7"},{source:"38e6dfb4-730a-4a80-8090-4b7ea551b3c7",target:"3c5b84d0-791c-43bc-ab68-7372478bc568"},{source:"b0da2d75-183c-4fa4-8b12-47366c02ed7c",target:"b8097890-6eeb-43ba-890d-28e1490fde08"},{source:"28b08ba5-2a3f-4f35-a909-7a745c26ba55",target:"2253d7f2-c150-44e2-9a8a-c7c5ba0ab661"},{source:"33a6a747-4180-4e28-a99c-2bf6dcf53200",target:"d5dd164d-1887-473f-8282-584b8d09474d"},{source:"57622367-8250-4932-ab3e-0356615d578a",target:"4c68f56a-2c44-41c0-acb9-ece91afaf70c"},{source:"57622367-8250-4932-ab3e-0356615d578a",target:"0a2ff403-834b-484f-b961-0822220bab58"}];function Khe(e){let t,n='
';return{c(){t=DD("div"),t.innerHTML=n,this.h()},l(r){t=OD(r,"DIV",{class:!0,"data-svelte-h":!0}),RD(t)!=="svelte-un78vs"&&(t.innerHTML=n),this.h()},h(){LD(t,"class","flex justify-center px-4")},m(r,i){PD(r,t,i)},p:r1,i:r1,o:r1,d(r){r&&ID(t)}}}function Jhe(e){const t={$schema:"https://vega.github.io/schema/vega/v5.json",description:"A network diagram of software dependencies, with edges grouped via hierarchical edge bundling.",width:1e3,height:1e3,autosize:"none",signals:[{name:"tension",value:.85},{name:"radius",value:280},{name:"extent",value:360},{name:"rotate",value:0},{name:"textSize",value:8},{name:"textOffset",value:8},{name:"layout",value:"cluster"},{name:"colorSib",value:"firebrick"},{name:"colorPar",value:"forestgreen"},{name:"colorChil",value:"orange"},{name:"colorCoop",value:"darkorchid"},{name:"originX",update:"width / 2"},{name:"originY",update:"height / 2"},{name:"active",value:null,on:[{events:"text:mouseover",update:"datum.id"},{events:"mouseover[!event.item]",update:"null"}]},{name:"innerRadius",value:281},{name:"outerRadius",value:287}],data:[{name:"tree",values:Ghe,transform:[{type:"stratify",key:"id",parentKey:"parent"},{type:"tree",method:{signal:"layout"},size:[1,1],as:["alpha","beta","depth","children"]},{type:"formula",expr:"(rotate + extent * datum.alpha + 270) % 360",as:"angle"},{type:"formula",expr:"inrange(datum.angle, [90, 270])",as:"leftside"},{type:"formula",expr:"originX + radius * datum.beta * cos(PI * datum.angle / 180)",as:"x"},{type:"formula",expr:"originY + radius * datum.beta * sin(PI * datum.angle / 180)",as:"y"},{type:"formula",expr:"2*PI*datum.alpha",as:"rangle"}]},{name:"leaves",source:"tree",transform:[{type:"filter",expr:"!datum.children"}]},{name:"sib_dependencies",values:Xhe,transform:[{type:"formula",expr:"treePath('tree', datum.source, datum.target)",as:"treepath",initonly:!0}]},{name:"sib_selected",source:"sib_dependencies",transform:[{type:"filter",expr:"datum.source === active || datum.target === active"}]},{name:"par_dependencies",values:Yhe,transform:[{type:"formula",expr:"treePath('tree', datum.source, datum.target)",as:"treepath",initonly:!0}]},{name:"par_selected",source:"par_dependencies",transform:[{type:"filter",expr:"datum.source === active || datum.target === active"}]},{name:"coop_dependencies",values:Vhe,transform:[{type:"formula",expr:"treePath('tree', datum.source, datum.target)",as:"treepath",initonly:!0}]},{name:"coop_selected",source:"coop_dependencies",transform:[{type:"filter",expr:"datum.source === active || datum.target === active"}]}],marks:[{type:"arc",from:{data:"leaves"},encode:{enter:{fill:{scale:"cat_color",field:"parentname"},fillOpacity:{value:.6},padAngle:{value:0},x:{signal:"originX"},y:{signal:"originY"},href:{field:"parenturl"}},update:{startAngle:{signal:"datum.rangle-0.075"},endAngle:{signal:"datum.rangle+0.075"},innerRadius:{signal:"innerRadius"},outerRadius:{signal:"outerRadius"},cornerRadius:{value:0},tooltip:{field:"parentname"}},hover:{cursor:{value:"pointer"}}}},{type:"text",from:{data:"leaves"},encode:{enter:{text:{field:"name"},baseline:{value:"middle"}},update:{x:{field:"x"},y:{field:"y"},dx:{signal:"textOffset * (datum.leftside ? -1 : 1)"},angle:{signal:"datum.leftside ? datum.angle - 180 : datum.angle"},align:{signal:"datum.leftside ? 'right' : 'left'"},fontSize:{signal:"textSize"},fontWeight:[{test:"indata('sib_selected', 'source', datum.id)",value:"bold"},{test:"indata('sib_selected', 'target', datum.id)",value:"bold"},{test:"indata('par_selected', 'source', datum.id)",value:"bold"},{test:"indata('par_selected', 'target', datum.id)",value:"bold"},{test:"indata('coop_selected', 'source', datum.id)",value:"bold"},{test:"indata('coop_selected', 'target', datum.id)",value:"bold"},{value:null}],fill:[{test:"datum.id === active",value:"black"},{test:"indata('sib_selected', 'source', datum.id)",signal:"colorSib"},{test:"indata('sib_selected', 'target', datum.id)",signal:"colorSib"},{test:"indata('par_selected', 'source', datum.id)",signal:"colorPar"},{test:"indata('par_selected', 'target', datum.id)",signal:"colorChil"},{test:"indata('coop_selected', 'source', datum.id)",signal:"colorCoop"},{test:"indata('coop_selected', 'target', datum.id)",signal:"colorCoop"},{value:"black"}]},hover:{cursor:{value:"pointer"}}}},{type:"group",from:{facet:{name:"path",data:"sib_dependencies",field:"treepath"}},marks:[{type:"line",interactive:!1,from:{data:"path"},encode:{enter:{interpolate:{value:"bundle"},strokeWidth:{value:1.5}},update:{stroke:[{test:"parent.source === active",signal:"colorSib"},{test:"parent.target === active",signal:"colorSib"},{value:"steelblue"}],strokeOpacity:[{test:"parent.source === active || parent.target === active",value:1},{value:.2}],tension:{signal:"tension"},x:{field:"x"},y:{field:"y"}}}}]},{type:"group",from:{facet:{name:"path",data:"par_dependencies",field:"treepath"}},marks:[{type:"line",interactive:!1,from:{data:"path"},encode:{enter:{interpolate:{value:"bundle"},strokeWidth:{value:1.5}},update:{stroke:[{test:"parent.source === active",signal:"colorChil"},{test:"parent.target === active",signal:"colorPar"},{value:"steelblue"}],strokeOpacity:[{test:"parent.source === active || parent.target === active",value:1},{value:.2}],tension:{signal:"tension"},x:{field:"x"},y:{field:"y"}}}}]},{type:"group",from:{facet:{name:"path",data:"coop_dependencies",field:"treepath"}},marks:[{type:"line",interactive:!1,from:{data:"path"},encode:{enter:{interpolate:{value:"bundle"},strokeWidth:{value:1.5}},update:{stroke:[{test:"parent.source === active",signal:"colorCoop"},{test:"parent.target === active",signal:"colorCoop"},{value:"steelblue"}],strokeOpacity:[{test:"parent.source === active || parent.target === active",value:1},{value:.2}],tension:{signal:"tension"},x:{field:"x"},y:{field:"y"}}}}]}],scales:[{name:"color",type:"ordinal",domain:["sibling","parent","child","cooperation"],range:[{signal:"colorSib"},{signal:"colorPar"},{signal:"colorChil"},{signal:"colorCoop"}]},{name:"cat_color",type:"ordinal",domain:{data:"leaves",field:"parentname"},range:{scheme:"set1"}},{name:"opacity",type:"linear",range:[.6,.6]}],legends:[{stroke:"color",orient:"bottom-left",title:"Relations",titleFontSize:16,labelFontSize:14,symbolType:"stroke",symbolStrokeWidth:3},{stroke:"cat_color",orient:"bottom-right",title:"Categories",titleFontSize:16,labelFontSize:14,symbolType:"circle",fill:"cat_color",columns:2}]};return MD(()=>{qhe("#vega",t,{})}),[]}class I0e extends TD{constructor(t){super(),ND(this,t,Jhe,Khe,FD,{})}}export{I0e as component}; diff --git a/_app/immutable/nodes/8.D-fQwb2A.js b/_app/immutable/nodes/8.D-fQwb2A.js new file mode 100644 index 000000000..33ff4cdda --- /dev/null +++ b/_app/immutable/nodes/8.D-fQwb2A.js @@ -0,0 +1,201 @@ +import{s as FL,n as i0,o as ML}from"../chunks/scheduler.kPUuJgHu.js";import{S as TL,i as DL,e as NL,c as OL,l as RL,m as LL,g as PL,d as IL}from"../chunks/index.CYrHsBOq.js";import{g as zL}from"../chunks/_commonjsHelpers.Cpj98o6Y.js";import{e as BL}from"../chunks/ENTRIES.B8oTZR8-.js";/*! + * https://github.com/Starcounter-Jack/JSON-Patch + * (c) 2017-2022 Joachim Wester + * MIT licensed + */var UL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var o in r)r.hasOwnProperty(o)&&(i[o]=r[o])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),jL=Object.prototype.hasOwnProperty;function T1(e,t){return jL.call(e,t)}function D1(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n=48&&i<=57){t++;continue}return!1}return!0}function Cs(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function WC(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function O1(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;t0&&u[c-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&d===void 0&&(l[h]===void 0?d=u.slice(0,c).join("/"):c==f-1&&(d=t.path),d!==void 0&&p(t,0,e,d)),c++,Array.isArray(l)){if(h==="-")h=l.length;else{if(n&&!N1(h))throw new Xe("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",o,t,e);N1(h)&&(h=~~h)}if(c>=f){if(n&&t.op==="add"&&h>l.length)throw new Xe("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",o,t,e);var s=WL[t.op].call(t,l,h,e);if(s.test===!1)throw new Xe("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return s}}else if(c>=f){var s=tu[t.op].call(t,l,h,e);if(s.test===!1)throw new Xe("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return s}if(l=l[h],n&&c0)throw new Xe('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new Xe("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new Xe("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&O1(e.value))throw new Xe("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n){if(e.op=="add"){var r=e.path.split("/").length,o=i.split("/").length;if(r!==o+1&&r!==o)throw new Xe("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==i)throw new Xe("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if(e.op==="move"||e.op==="copy"){var s={op:"_get",path:e.from,value:void 0},a=GC([s],n);if(a&&a.name==="OPERATION_PATH_UNRESOLVABLE")throw new Xe("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new Xe("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function GC(e,t,n){try{if(!Array.isArray(e))throw new Xe("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Kp(Tn(t),Tn(e),n||!0);else{n=n||mh;for(var i=0;i0&&(e.patches=[],e.callback&&e.callback(i)),i}function Wv(e,t,n,i,r){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var o=D1(t),s=D1(e),a=!1,u=s.length-1;u>=0;u--){var l=s[u],c=e[l];if(T1(t,l)&&!(t[l]===void 0&&c!==void 0&&Array.isArray(t)===!1)){var f=t[l];typeof c=="object"&&c!=null&&typeof f=="object"&&f!=null&&Array.isArray(c)===Array.isArray(f)?Wv(c,f,n,i+"/"+Cs(l),r):c!==f&&(r&&n.push({op:"test",path:i+"/"+Cs(l),value:Tn(c)}),n.push({op:"replace",path:i+"/"+Cs(l),value:Tn(f)}))}else Array.isArray(e)===Array.isArray(t)?(r&&n.push({op:"test",path:i+"/"+Cs(l),value:Tn(c)}),n.push({op:"remove",path:i+"/"+Cs(l)}),a=!0):(r&&n.push({op:"test",path:i,value:e}),n.push({op:"replace",path:i,value:t}))}if(!(!a&&o.length==s.length))for(var u=0;u0)return[b,i+d.join(`, +`+y),c].join(` +`+u)}return x}(t,"",0)};const r0=zL(iP);function $n(e,t,n){return e.fields=t||[],e.fname=n,e}function Je(e){return e==null?null:e.fname}function Bt(e){return e==null?null:e.fields}function YC(e){return e.length===1?rP(e[0]):oP(e)}const rP=e=>function(t){return t[e]},oP=e=>{const t=e.length;return function(n){for(let i=0;is?l():s=a+1:u==="["?(a>s&&l(),r=s=a+1):u==="]"&&(r||R("Access path missing open bracket: "+e),r>0&&l(),r=0,s=a+1)}return r&&R("Access path missing closing bracket: "+e),i&&R("Access path missing closing quote: "+e),a>s&&(a++,l()),t}function Zn(e,t,n){const i=dr(e);return e=i.length===1?i[0]:e,$n((n&&n.get||YC)(i),[e],t||e)}const mf=Zn("id"),Wt=$n(e=>e,[],"identity"),bo=$n(()=>0,[],"zero"),Zu=$n(()=>1,[],"one"),ei=$n(()=>!0,[],"true"),co=$n(()=>!1,[],"false");function sP(e,t,n){const i=[t].concat([].slice.call(n));console[e].apply(console,i)}const XC=0,Hv=1,Gv=2,VC=3,KC=4;function Yv(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:sP,i=e||XC;return{level(r){return arguments.length?(i=+r,this):i},error(){return i>=Hv&&n(t||"error","ERROR",arguments),this},warn(){return i>=Gv&&n(t||"warn","WARN",arguments),this},info(){return i>=VC&&n(t||"log","INFO",arguments),this},debug(){return i>=KC&&n(t||"log","DEBUG",arguments),this}}}var P=Array.isArray;function V(e){return e===Object(e)}const m_=e=>e!=="__proto__";function el(){for(var e=arguments.length,t=new Array(e),n=0;n{for(const o in r)if(o==="signals")i.signals=aP(i.signals,r.signals);else{const s=o==="legend"?{layout:1}:o==="style"?!0:null;tl(i,o,r[o],s)}return i},{})}function tl(e,t,n,i){if(!m_(t))return;let r,o;if(V(n)&&!P(n)){o=V(e[t])?e[t]:e[t]={};for(r in n)i&&(i===!0||i[r])?tl(o,r,n[r]):m_(r)&&(o[r]=n[r])}else e[t]=n}function aP(e,t){if(e==null)return t;const n={},i=[];function r(o){n[o.name]||(n[o.name]=1,i.push(o))}return t.forEach(r),e.forEach(r),i}function xe(e){return e[e.length-1]}function Pt(e){return e==null||e===""?null:+e}const JC=e=>t=>e*Math.exp(t),QC=e=>t=>Math.log(e*t),ZC=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),eF=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,yh=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function Jp(e,t,n,i){const r=n(e[0]),o=n(xe(e)),s=(o-r)*t;return[i(r-s),i(o-s)]}function tF(e,t){return Jp(e,t,Pt,Wt)}function nF(e,t){var n=Math.sign(e[0]);return Jp(e,t,QC(n),JC(n))}function iF(e,t,n){return Jp(e,t,yh(n),yh(1/n))}function rF(e,t,n){return Jp(e,t,ZC(n),eF(n))}function Qp(e,t,n,i,r){const o=i(e[0]),s=i(xe(e)),a=t!=null?i(t):(o+s)/2;return[r(a+(o-a)*n),r(a+(s-a)*n)]}function Xv(e,t,n){return Qp(e,t,n,Pt,Wt)}function Vv(e,t,n){const i=Math.sign(e[0]);return Qp(e,t,n,QC(i),JC(i))}function vh(e,t,n,i){return Qp(e,t,n,yh(i),yh(1/i))}function Kv(e,t,n,i){return Qp(e,t,n,ZC(i),eF(i))}function oF(e){return 1+~~(new Date(e).getMonth()/3)}function sF(e){return 1+~~(new Date(e).getUTCMonth()/3)}function Y(e){return e!=null?P(e)?e:[e]:[]}function aF(e,t,n){let i=e[0],r=e[1],o;return r=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-o),i+o]}function ce(e){return typeof e=="function"}const uP="descending";function Jv(e,t,n){n=n||{},t=Y(t)||[];const i=[],r=[],o={},s=n.comparator||lP;return Y(e).forEach((a,u)=>{a!=null&&(i.push(t[u]===uP?-1:1),r.push(a=ce(a)?a:Zn(a,null,n)),(Bt(a)||[]).forEach(l=>o[l]=1))}),r.length===0?null:$n(s(r,i),Object.keys(o))}const Zp=(e,t)=>(et||t==null)&&e!=null?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0),lP=(e,t)=>e.length===1?cP(e[0],t[0]):fP(e,t,e.length),cP=(e,t)=>function(n,i){return Zp(e(n),e(i))*t},fP=(e,t,n)=>(t.push(0),function(i,r){let o,s=0,a=-1;for(;s===0&&++ae}function Qv(e,t){let n;return i=>{n&&clearTimeout(n),n=setTimeout(()=>(t(i),n=null),e)}}function le(e){for(let t,n,i=1,r=arguments.length;is&&(s=r))}else{for(r=t(e[n]);ns&&(s=r))}return[o,s]}function uF(e,t){const n=e.length;let i=-1,r,o,s,a,u;if(t==null){for(;++i=o){r=s=o;break}if(i===n)return[-1,-1];for(a=u=i;++io&&(r=o,a=i),s=o){r=s=o;break}if(i===n)return[-1,-1];for(a=u=i;++io&&(r=o,a=i),s{r.set(o,e[o])}),r}function lF(e,t,n,i,r,o){if(!n&&n!==0)return o;const s=+n;let a=e[0],u=xe(e),l;uo&&(s=r,r=o,o=s),n=n===void 0||n,i=i===void 0||i,(n?r<=e:ra.replace(/\\(.)/g,"$1")):Y(e));const i=e&&e.length,r=n&&n.get||YC,o=a=>r(t?[a]:dr(a));let s;if(!i)s=function(){return""};else if(i===1){const a=o(e[0]);s=function(u){return""+a(u)}}else{const a=e.map(o);s=function(u){let l=""+a[0](u),c=0;for(;++c{t={},n={},i=0},o=(s,a)=>(++i>e&&(n=t,t={},i=1),t[s]=a);return r(),{clear:r,has:s=>re(t,s)||re(n,s),get:s=>re(t,s)?t[s]:re(n,s)?o(s,n[s]):void 0,set:(s,a)=>re(t,s)?t[s]=a:o(s,a)}}function pF(e,t,n,i){const r=t.length,o=n.length;if(!o)return t;if(!r)return n;const s=i||new t.constructor(r+o);let a=0,u=0,l=0;for(;a0?n[u++]:t[a++];for(;a=0;)n+=e;return n}function gF(e,t,n,i){const r=n||" ",o=e+"",s=t-o.length;return s<=0?o:i==="left"?Kl(r,s)+o:i==="center"?Kl(r,~~(s/2))+o+Kl(r,Math.ceil(s/2)):o+Kl(r,s)}function yf(e){return e&&xe(e)-e[0]||0}function H(e){return P(e)?"["+e.map(H)+"]":V(e)||X(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function eb(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const pP=e=>Ee(e)||Fo(e)?e:Date.parse(e);function tb(e,t){return t=t||pP,e==null||e===""?null:t(e)}function nb(e){return e==null||e===""?null:e+""}function Ai(e){const t={},n=e.length;for(let i=0;i9999?"+"+fn(e,6):fn(e,4)}function yP(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),i=e.getUTCSeconds(),r=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":mP(e.getUTCFullYear())+"-"+fn(e.getUTCMonth()+1,2)+"-"+fn(e.getUTCDate(),2)+(r?"T"+fn(t,2)+":"+fn(n,2)+":"+fn(i,2)+"."+fn(r,3)+"Z":i?"T"+fn(t,2)+":"+fn(n,2)+":"+fn(i,2)+"Z":n||t?"T"+fn(t,2)+":"+fn(n,2)+"Z":"")}function vP(e){var t=new RegExp('["'+e+` +\r]`),n=e.charCodeAt(0);function i(f,d){var h,p,g=r(f,function(m,y){if(h)return h(m,y-1);p=m,h=d?gP(m,d):yF(m)});return g.columns=p||[],g}function r(f,d){var h=[],p=f.length,g=0,m=0,y,v=p<=0,b=!1;f.charCodeAt(p-1)===Sl&&--p,f.charCodeAt(p-1)===a0&&--p;function x(){if(v)return o0;if(b)return b=!1,y_;var _,E=g,S;if(f.charCodeAt(E)===s0){for(;g++=p?v=!0:(S=f.charCodeAt(g++))===Sl?b=!0:S===a0&&(b=!0,f.charCodeAt(g)===Sl&&++g),f.slice(E+1,_-1).replace(/""/g,'"')}for(;g1)i=AP(e,t,n);else for(r=0,i=new Array(o=e.arcs.length);rt?1:e>=t?0:NaN}function kP(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function il(e){let t,n,i;e.length!==2?(t=jr,n=(a,u)=>jr(e(a),u),i=(a,u)=>e(a)-u):(t=e===jr||e===kP?e:CP,n=e,i=e);function r(a,u,l=0,c=a.length){if(l>>1;n(a[f],u)<0?l=f+1:c=f}while(l>>1;n(a[f],u)<=0?l=f+1:c=f}while(ll&&i(a[f-1],u)>-i(a[f],u)?f-1:f}return{left:r,center:s,right:o}}function CP(){return 0}function bF(e){return e===null?NaN:+e}function*FP(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(i=+i)>=i&&(yield i)}}const xF=il(jr),Ro=xF.right,MP=xF.left;il(bF).center;function TP(e,t){let n=0,i,r=0,o=0;if(t===void 0)for(let s of e)s!=null&&(s=+s)>=s&&(i=s-r,r+=i/++n,o+=i*(s-r));else{let s=-1;for(let a of e)(a=t(a,++s,e))!=null&&(a=+a)>=a&&(i=a-r,r+=i/++n,o+=i*(a-r))}if(n>1)return o/(n-1)}function DP(e,t){const n=TP(e,t);return n&&Math.sqrt(n)}class nn{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let i=0;for(let r=0;r0){for(s=t[--n];n>0&&(i=s,r=t[--n],s=i+r,o=r-(s-i),!o););n>0&&(o<0&&t[n-1]<0||o>0&&t[n-1]>0)&&(r=o*2,i=s+r,r==i-s&&(s=i))}return s}}class x_ extends Map{constructor(t,n=_F){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[i,r]of t)this.set(i,r)}get(t){return super.get(L1(this,t))}has(t){return super.has(L1(this,t))}set(t,n){return super.set(wF(this,t),n)}delete(t){return super.delete(EF(this,t))}}class bh extends Set{constructor(t,n=_F){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const i of t)this.add(i)}has(t){return super.has(L1(this,t))}add(t){return super.add(wF(this,t))}delete(t){return super.delete(EF(this,t))}}function L1({_intern:e,_key:t},n){const i=t(n);return e.has(i)?e.get(i):n}function wF({_intern:e,_key:t},n){const i=t(n);return e.has(i)?e.get(i):(e.set(i,n),n)}function EF({_intern:e,_key:t},n){const i=t(n);return e.has(i)&&(n=e.get(i),e.delete(i)),n}function _F(e){return e!==null&&typeof e=="object"?e.valueOf():e}function NP(e,t){return Array.from(t,n=>e[n])}function OP(e=jr){if(e===jr)return SF;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const i=e(t,n);return i||i===0?i:(e(n,n)===0)-(e(t,t)===0)}}function SF(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const RP=Math.sqrt(50),LP=Math.sqrt(10),PP=Math.sqrt(2);function xh(e,t,n){const i=(t-e)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),s=o>=RP?10:o>=LP?5:o>=PP?2:1;let a,u,l;return r<0?(l=Math.pow(10,-r)/s,a=Math.round(e*l),u=Math.round(t*l),a/lt&&--u,l=-l):(l=Math.pow(10,r)*s,a=Math.round(e/l),u=Math.round(t/l),a*lt&&--u),u0))return[];if(e===t)return[e];const i=t=r))return[];const a=o-r+1,u=new Array(a);if(i)if(s<0)for(let l=0;l=i)&&(n=i);else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(n=r)&&(n=r)}return n}function z1(e,t){let n;if(t===void 0)for(const i of e)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function $F(e,t,n=0,i=1/0,r){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(e.length-1,i)),!(n<=t&&t<=i))return e;for(r=r===void 0?SF:OP(r);i>n;){if(i-n>600){const u=i-n+1,l=t-n+1,c=Math.log(u),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),h=Math.max(n,Math.floor(t-l*f/u+d)),p=Math.min(i,Math.floor(t+(u-l)*f/u+d));$F(e,t,h,p,r)}const o=e[t];let s=n,a=i;for($l(e,n,t),r(e[i],o)>0&&$l(e,n,i);s0;)--a}r(e[n],o)===0?$l(e,n,a):(++a,$l(e,a,i)),a<=t&&(n=a+1),t<=a&&(i=a-1)}return e}function $l(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function B1(e,t,n){if(e=Float64Array.from(FP(e,n)),!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return z1(e);if(t>=1)return qs(e);var i,r=(i-1)*t,o=Math.floor(r),s=qs($F(e,o).subarray(0,o+1)),a=z1(e.subarray(o+1));return s+(a-s)*(r-o)}}function AF(e,t,n=bF){if(!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return+n(e[0],0,e);if(t>=1)return+n(e[i-1],i-1,e);var i,r=(i-1)*t,o=Math.floor(r),s=+n(e[o],o,e),a=+n(e[o+1],o+1,e);return s+(a-s)*(r-o)}}function IP(e,t){let n=0,i=0;if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&(++n,i+=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(o=+o)>=o&&(++n,i+=o)}if(n)return i/n}function kF(e,t){return B1(e,.5,t)}function*zP(e){for(const t of e)yield*t}function CF(e){return Array.from(zP(e))}function Dn(e,t,n){e=+e,t=+t,n=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(r);++i=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function wh(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function bu(e){return e=wh(Math.abs(e)),e?e[1]:NaN}function WP(e,t){return function(n,i){for(var r=n.length,o=[],s=0,a=e[0],u=0;r>0&&a>0&&(u+a+1>i&&(a=Math.max(1,i-u)),o.push(n.substring(r-=a,r+a)),!((u+=a+1)>i));)a=e[s=(s+1)%e.length];return o.reverse().join(t)}}function HP(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var GP=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qs(e){if(!(t=GP.exec(e)))throw new Error("invalid format: "+e);var t;return new ib({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Qs.prototype=ib.prototype;function ib(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}ib.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 YP(e){e:for(var t=e.length,n=1,i=-1,r;n0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(r+1):e}var MF;function XP(e,t){var n=wh(e,t);if(!n)return e+"";var i=n[0],r=n[1],o=r-(MF=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+wh(e,Math.max(0,t+o-1))[0]}function w_(e,t){var n=wh(e,t);if(!n)return e+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const E_={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:qP,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>w_(e*100,t),r:w_,s:XP,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function __(e){return e}var S_=Array.prototype.map,$_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function TF(e){var t=e.grouping===void 0||e.thousands===void 0?__:WP(S_.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",r=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?__:HP(S_.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",a=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f){f=Qs(f);var d=f.fill,h=f.align,p=f.sign,g=f.symbol,m=f.zero,y=f.width,v=f.comma,b=f.precision,x=f.trim,w=f.type;w==="n"?(v=!0,w="g"):E_[w]||(b===void 0&&(b=12),x=!0,w="g"),(m||d==="0"&&h==="=")&&(m=!0,d="0",h="=");var _=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",E=g==="$"?i:/[%p]/.test(w)?s:"",S=E_[w],$=/[defgprs%]/.test(w);b=b===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function F(k){var N=_,A=E,M,C,T;if(w==="c")A=S(k)+A,k="";else{k=+k;var L=k<0||1/k<0;if(k=isNaN(k)?u:S(Math.abs(k),b),x&&(k=YP(k)),L&&+k==0&&p!=="+"&&(L=!1),N=(L?p==="("?p:a:p==="-"||p==="("?"":p)+N,A=(w==="s"?$_[8+MF/3]:"")+A+(L&&p==="("?")":""),$){for(M=-1,C=k.length;++MT||T>57){A=(T===46?r+k.slice(M+1):k.slice(M))+A,k=k.slice(0,M);break}}}v&&!m&&(k=t(k,1/0));var I=N.length+k.length+A.length,z=I>1)+N+k+A+z.slice(I);break;default:k=z+N+k+A;break}return o(k)}return F.toString=function(){return f+""},F}function c(f,d){var h=l((f=Qs(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(bu(d)/3)))*3,g=Math.pow(10,-p),m=$_[8+p/3];return function(y){return h(g*y)+m}}return{format:l,formatPrefix:c}}var sd,eg,rb;VP({thousands:",",grouping:[3],currency:["$",""]});function VP(e){return sd=TF(e),eg=sd.format,rb=sd.formatPrefix,sd}function DF(e){return Math.max(0,-bu(Math.abs(e)))}function NF(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(bu(t)/3)))*3-bu(Math.abs(e)))}function OF(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,bu(t)-bu(e))+1}const u0=new Date,l0=new Date;function ut(e,t,n,i){function r(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return r.floor=o=>(e(o=new Date(+o)),o),r.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),r.round=o=>{const s=r(o),a=r.ceil(o);return o-s(t(o=new Date(+o),s==null?1:Math.floor(s)),o),r.range=(o,s,a)=>{const u=[];if(o=r.ceil(o),a=a==null?1:Math.floor(a),!(o0))return u;let l;do u.push(l=new Date(+o)),t(o,a),e(o);while(lut(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;t(s,-1),!o(s););else for(;--a>=0;)for(;t(s,1),!o(s););}),n&&(r.count=(o,s)=>(u0.setTime(+o),l0.setTime(+s),e(u0),e(l0),Math.floor(n(u0,l0))),r.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?r.filter(i?s=>i(s)%o===0:s=>r.count(0,s)%o===0):r)),r}const xu=ut(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);xu.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ut(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):xu);xu.range;const Lr=1e3,Yn=Lr*60,Pr=Yn*60,Vr=Pr*24,ob=Vr*7,A_=Vr*30,c0=Vr*365,Ir=ut(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Lr)},(e,t)=>(t-e)/Lr,e=>e.getUTCSeconds());Ir.range;const tg=ut(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lr)},(e,t)=>{e.setTime(+e+t*Yn)},(e,t)=>(t-e)/Yn,e=>e.getMinutes());tg.range;const ng=ut(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Yn)},(e,t)=>(t-e)/Yn,e=>e.getUTCMinutes());ng.range;const ig=ut(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lr-e.getMinutes()*Yn)},(e,t)=>{e.setTime(+e+t*Pr)},(e,t)=>(t-e)/Pr,e=>e.getHours());ig.range;const rg=ut(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Pr)},(e,t)=>(t-e)/Pr,e=>e.getUTCHours());rg.range;const qr=ut(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Yn)/Vr,e=>e.getDate()-1);qr.range;const Mo=ut(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Vr,e=>e.getUTCDate()-1);Mo.range;const RF=ut(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Vr,e=>Math.floor(e/Vr));RF.range;function wa(e){return ut(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Yn)/ob)}const rl=wa(0),Eh=wa(1),KP=wa(2),JP=wa(3),wu=wa(4),QP=wa(5),ZP=wa(6);rl.range;Eh.range;KP.range;JP.range;wu.range;QP.range;ZP.range;function Ea(e){return ut(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/ob)}const ol=Ea(0),_h=Ea(1),e8=Ea(2),t8=Ea(3),Eu=Ea(4),n8=Ea(5),i8=Ea(6);ol.range;_h.range;e8.range;t8.range;Eu.range;n8.range;i8.range;const Lc=ut(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Lc.range;const Pc=ut(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Pc.range;const rr=ut(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());rr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ut(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});rr.range;const or=ut(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());or.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ut(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});or.range;function LF(e,t,n,i,r,o){const s=[[Ir,1,Lr],[Ir,5,5*Lr],[Ir,15,15*Lr],[Ir,30,30*Lr],[o,1,Yn],[o,5,5*Yn],[o,15,15*Yn],[o,30,30*Yn],[r,1,Pr],[r,3,3*Pr],[r,6,6*Pr],[r,12,12*Pr],[i,1,Vr],[i,2,2*Vr],[n,1,ob],[t,1,A_],[t,3,3*A_],[e,1,c0]];function a(l,c,f){const d=cm).right(s,d);if(h===s.length)return e.every(Lo(l/c0,c/c0,f));if(h===0)return xu.every(Math.max(Lo(l,c,f),1));const[p,g]=s[d/s[h-1][2](e[t]=1+n,e),{});function ab(e){const t=Y(e).slice(),n={};return t.length||R("Missing time unit."),t.forEach(r=>{re(f0,r)?n[r]=1:R(`Invalid time unit: ${r}.`)}),(n[ot]||n[Lt]?1:0)+(n[bn]||n[Ut]||n[xn]?1:0)+(n[sr]?1:0)>1&&R(`Incompatible time units: ${e}`),t.sort((r,o)=>f0[r]-f0[o]),t}const u8={[At]:"%Y ",[bn]:"Q%q ",[Ut]:"%b ",[xn]:"%d ",[ot]:"W%U ",[Lt]:"%a ",[sr]:"%j ",[Pn]:"%H:00",[In]:"00:%M",[ti]:":%S",[ki]:".%L",[`${At}-${Ut}`]:"%Y-%m ",[`${At}-${Ut}-${xn}`]:"%Y-%m-%d ",[`${Pn}-${In}`]:"%H:%M"};function PF(e,t){const n=le({},u8,t),i=ab(e),r=i.length;let o="",s=0,a,u;for(s=0;ss;--a)if(u=i.slice(s,a).join("-"),n[u]!=null){o+=n[u],s=a;break}return o.trim()}const Ts=new Date;function ub(e){return Ts.setFullYear(e),Ts.setMonth(0),Ts.setDate(1),Ts.setHours(0,0,0,0),Ts}function IF(e){return BF(new Date(e))}function zF(e){return U1(new Date(e))}function BF(e){return qr.count(ub(e.getFullYear())-1,e)}function U1(e){return rl.count(ub(e.getFullYear())-1,e)}function j1(e){return ub(e).getDay()}function l8(e,t,n,i,r,o,s){if(0<=e&&e<100){const a=new Date(-1,t,n,i,r,o,s);return a.setFullYear(e),a}return new Date(e,t,n,i,r,o,s)}function UF(e){return qF(new Date(e))}function jF(e){return q1(new Date(e))}function qF(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return Mo.count(t-1,e)}function q1(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return ol.count(t-1,e)}function W1(e){return Ts.setTime(Date.UTC(e,0,1)),Ts.getUTCDay()}function c8(e,t,n,i,r,o,s){if(0<=e&&e<100){const a=new Date(Date.UTC(-1,t,n,i,r,o,s));return a.setUTCFullYear(n.y),a}return new Date(Date.UTC(e,t,n,i,r,o,s))}function WF(e,t,n,i,r){const o=t||1,s=xe(e),a=(y,v,b)=>(b=b||y,f8(n[b],i[b],y===s&&o,v)),u=new Date,l=Ai(e),c=l[At]?a(At):Ht(2012),f=l[Ut]?a(Ut):l[bn]?a(bn):bo,d=l[ot]&&l[Lt]?a(Lt,1,ot+Lt):l[ot]?a(ot,1):l[Lt]?a(Lt,1):l[xn]?a(xn,1):l[sr]?a(sr,1):Zu,h=l[Pn]?a(Pn):bo,p=l[In]?a(In):bo,g=l[ti]?a(ti):bo,m=l[ki]?a(ki):bo;return function(y){u.setTime(+y);const v=c(u);return r(v,f(u),d(u,v),h(u),p(u),g(u),m(u))}}function f8(e,t,n,i){const r=n<=1?e:i?(o,s)=>i+n*Math.floor((e(o,s)-i)/n):(o,s)=>n*Math.floor(e(o,s)/n);return t?(o,s)=>t(r(o,s),s):r}function _u(e,t,n){return t+e*7-(n+6)%7}const d8={[At]:e=>e.getFullYear(),[bn]:e=>Math.floor(e.getMonth()/3),[Ut]:e=>e.getMonth(),[xn]:e=>e.getDate(),[Pn]:e=>e.getHours(),[In]:e=>e.getMinutes(),[ti]:e=>e.getSeconds(),[ki]:e=>e.getMilliseconds(),[sr]:e=>BF(e),[ot]:e=>U1(e),[ot+Lt]:(e,t)=>_u(U1(e),e.getDay(),j1(t)),[Lt]:(e,t)=>_u(1,e.getDay(),j1(t))},h8={[bn]:e=>3*e,[ot]:(e,t)=>_u(e,0,j1(t))};function HF(e,t){return WF(e,t||1,d8,h8,l8)}const p8={[At]:e=>e.getUTCFullYear(),[bn]:e=>Math.floor(e.getUTCMonth()/3),[Ut]:e=>e.getUTCMonth(),[xn]:e=>e.getUTCDate(),[Pn]:e=>e.getUTCHours(),[In]:e=>e.getUTCMinutes(),[ti]:e=>e.getUTCSeconds(),[ki]:e=>e.getUTCMilliseconds(),[sr]:e=>qF(e),[ot]:e=>q1(e),[Lt]:(e,t)=>_u(1,e.getUTCDay(),W1(t)),[ot+Lt]:(e,t)=>_u(q1(e),e.getUTCDay(),W1(t))},g8={[bn]:e=>3*e,[ot]:(e,t)=>_u(e,0,W1(t))};function GF(e,t){return WF(e,t||1,p8,g8,c8)}const m8={[At]:rr,[bn]:Lc.every(3),[Ut]:Lc,[ot]:rl,[xn]:qr,[Lt]:qr,[sr]:qr,[Pn]:ig,[In]:tg,[ti]:Ir,[ki]:xu},y8={[At]:or,[bn]:Pc.every(3),[Ut]:Pc,[ot]:ol,[xn]:Mo,[Lt]:Mo,[sr]:Mo,[Pn]:rg,[In]:ng,[ti]:Ir,[ki]:xu};function sl(e){return m8[e]}function al(e){return y8[e]}function YF(e,t,n){return e?e.offset(t,n):void 0}function XF(e,t,n){return YF(sl(e),t,n)}function VF(e,t,n){return YF(al(e),t,n)}function KF(e,t,n,i){return e?e.range(t,n,i):void 0}function JF(e,t,n,i){return KF(sl(e),t,n,i)}function QF(e,t,n,i){return KF(al(e),t,n,i)}const Jl=1e3,Ql=Jl*60,Zl=Ql*60,og=Zl*24,v8=og*7,k_=og*30,H1=og*365,ZF=[At,Ut,xn,Pn,In,ti,ki],ec=ZF.slice(0,-1),tc=ec.slice(0,-1),nc=tc.slice(0,-1),b8=nc.slice(0,-1),x8=[At,ot],C_=[At,Ut],eM=[At],Al=[[ec,1,Jl],[ec,5,5*Jl],[ec,15,15*Jl],[ec,30,30*Jl],[tc,1,Ql],[tc,5,5*Ql],[tc,15,15*Ql],[tc,30,30*Ql],[nc,1,Zl],[nc,3,3*Zl],[nc,6,6*Zl],[nc,12,12*Zl],[b8,1,og],[x8,1,v8],[C_,1,k_],[C_,3,3*k_],[eM,1,H1]];function tM(e){const t=e.extent,n=e.maxbins||40,i=Math.abs(yf(t))/n;let r=il(a=>a[2]).right(Al,i),o,s;return r===Al.length?(o=eM,s=Lo(t[0]/H1,t[1]/H1,n)):r?(r=Al[i/Al[r-1][2]53)return null;"w"in q||(q.w=1),"Z"in q?(Ce=h0(kl(q.y,0,1)),Mt=Ce.getUTCDay(),Ce=Mt>4||Mt===0?_h.ceil(Ce):_h(Ce),Ce=Mo.offset(Ce,(q.V-1)*7),q.y=Ce.getUTCFullYear(),q.m=Ce.getUTCMonth(),q.d=Ce.getUTCDate()+(q.w+6)%7):(Ce=d0(kl(q.y,0,1)),Mt=Ce.getDay(),Ce=Mt>4||Mt===0?Eh.ceil(Ce):Eh(Ce),Ce=qr.offset(Ce,(q.V-1)*7),q.y=Ce.getFullYear(),q.m=Ce.getMonth(),q.d=Ce.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),Mt="Z"in q?h0(kl(q.y,0,1)).getUTCDay():d0(kl(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(Mt+5)%7:q.w+q.U*7-(Mt+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,h0(q)):d0(q)}}function S(K,de,pe,q){for(var Et=0,Ce=de.length,Mt=pe.length,Gt,ms;Et=Mt)return-1;if(Gt=de.charCodeAt(Et++),Gt===37){if(Gt=de.charAt(Et++),ms=w[Gt in F_?de.charAt(Et++):Gt],!ms||(q=ms(K,pe,q))<0)return-1}else if(Gt!=pe.charCodeAt(q++))return-1}return q}function $(K,de,pe){var q=l.exec(de.slice(pe));return q?(K.p=c.get(q[0].toLowerCase()),pe+q[0].length):-1}function F(K,de,pe){var q=h.exec(de.slice(pe));return q?(K.w=p.get(q[0].toLowerCase()),pe+q[0].length):-1}function k(K,de,pe){var q=f.exec(de.slice(pe));return q?(K.w=d.get(q[0].toLowerCase()),pe+q[0].length):-1}function N(K,de,pe){var q=y.exec(de.slice(pe));return q?(K.m=v.get(q[0].toLowerCase()),pe+q[0].length):-1}function A(K,de,pe){var q=g.exec(de.slice(pe));return q?(K.m=m.get(q[0].toLowerCase()),pe+q[0].length):-1}function M(K,de,pe){return S(K,t,de,pe)}function C(K,de,pe){return S(K,n,de,pe)}function T(K,de,pe){return S(K,i,de,pe)}function L(K){return s[K.getDay()]}function I(K){return o[K.getDay()]}function z(K){return u[K.getMonth()]}function Z(K){return a[K.getMonth()]}function ee(K){return r[+(K.getHours()>=12)]}function fe(K){return 1+~~(K.getMonth()/3)}function _e(K){return s[K.getUTCDay()]}function me(K){return o[K.getUTCDay()]}function Ie(K){return u[K.getUTCMonth()]}function Sr(K){return a[K.getUTCMonth()]}function Ia(K){return r[+(K.getUTCHours()>=12)]}function gs(K){return 1+~~(K.getUTCMonth()/3)}return{format:function(K){var de=_(K+="",b);return de.toString=function(){return K},de},parse:function(K){var de=E(K+="",!1);return de.toString=function(){return K},de},utcFormat:function(K){var de=_(K+="",x);return de.toString=function(){return K},de},utcParse:function(K){var de=E(K+="",!0);return de.toString=function(){return K},de}}}var F_={"-":"",_:" ",0:"0"},xt=/^\s*\d+/,w8=/^%/,E8=/[\\^$*+?|[\]().{}]/g;function $e(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",o=r.length;return i+(o[t.toLowerCase(),n]))}function S8(e,t,n){var i=xt.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function $8(e,t,n){var i=xt.exec(t.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function A8(e,t,n){var i=xt.exec(t.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function k8(e,t,n){var i=xt.exec(t.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function C8(e,t,n){var i=xt.exec(t.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function M_(e,t,n){var i=xt.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function T_(e,t,n){var i=xt.exec(t.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function F8(e,t,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function M8(e,t,n){var i=xt.exec(t.slice(n,n+1));return i?(e.q=i[0]*3-3,n+i[0].length):-1}function T8(e,t,n){var i=xt.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function D_(e,t,n){var i=xt.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function D8(e,t,n){var i=xt.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function N_(e,t,n){var i=xt.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function N8(e,t,n){var i=xt.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function O8(e,t,n){var i=xt.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function R8(e,t,n){var i=xt.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function L8(e,t,n){var i=xt.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function P8(e,t,n){var i=w8.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function I8(e,t,n){var i=xt.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function z8(e,t,n){var i=xt.exec(t.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function O_(e,t){return $e(e.getDate(),t,2)}function B8(e,t){return $e(e.getHours(),t,2)}function U8(e,t){return $e(e.getHours()%12||12,t,2)}function j8(e,t){return $e(1+qr.count(rr(e),e),t,3)}function iM(e,t){return $e(e.getMilliseconds(),t,3)}function q8(e,t){return iM(e,t)+"000"}function W8(e,t){return $e(e.getMonth()+1,t,2)}function H8(e,t){return $e(e.getMinutes(),t,2)}function G8(e,t){return $e(e.getSeconds(),t,2)}function Y8(e){var t=e.getDay();return t===0?7:t}function X8(e,t){return $e(rl.count(rr(e)-1,e),t,2)}function rM(e){var t=e.getDay();return t>=4||t===0?wu(e):wu.ceil(e)}function V8(e,t){return e=rM(e),$e(wu.count(rr(e),e)+(rr(e).getDay()===4),t,2)}function K8(e){return e.getDay()}function J8(e,t){return $e(Eh.count(rr(e)-1,e),t,2)}function Q8(e,t){return $e(e.getFullYear()%100,t,2)}function Z8(e,t){return e=rM(e),$e(e.getFullYear()%100,t,2)}function eI(e,t){return $e(e.getFullYear()%1e4,t,4)}function tI(e,t){var n=e.getDay();return e=n>=4||n===0?wu(e):wu.ceil(e),$e(e.getFullYear()%1e4,t,4)}function nI(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+$e(t/60|0,"0",2)+$e(t%60,"0",2)}function R_(e,t){return $e(e.getUTCDate(),t,2)}function iI(e,t){return $e(e.getUTCHours(),t,2)}function rI(e,t){return $e(e.getUTCHours()%12||12,t,2)}function oI(e,t){return $e(1+Mo.count(or(e),e),t,3)}function oM(e,t){return $e(e.getUTCMilliseconds(),t,3)}function sI(e,t){return oM(e,t)+"000"}function aI(e,t){return $e(e.getUTCMonth()+1,t,2)}function uI(e,t){return $e(e.getUTCMinutes(),t,2)}function lI(e,t){return $e(e.getUTCSeconds(),t,2)}function cI(e){var t=e.getUTCDay();return t===0?7:t}function fI(e,t){return $e(ol.count(or(e)-1,e),t,2)}function sM(e){var t=e.getUTCDay();return t>=4||t===0?Eu(e):Eu.ceil(e)}function dI(e,t){return e=sM(e),$e(Eu.count(or(e),e)+(or(e).getUTCDay()===4),t,2)}function hI(e){return e.getUTCDay()}function pI(e,t){return $e(_h.count(or(e)-1,e),t,2)}function gI(e,t){return $e(e.getUTCFullYear()%100,t,2)}function mI(e,t){return e=sM(e),$e(e.getUTCFullYear()%100,t,2)}function yI(e,t){return $e(e.getUTCFullYear()%1e4,t,4)}function vI(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Eu(e):Eu.ceil(e),$e(e.getUTCFullYear()%1e4,t,4)}function bI(){return"+0000"}function L_(){return"%"}function P_(e){return+e}function I_(e){return Math.floor(+e/1e3)}var za,lb,aM,cb,uM;xI({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 xI(e){return za=nM(e),lb=za.format,aM=za.parse,cb=za.utcFormat,uM=za.utcParse,za}function ic(e){const t={};return n=>t[n]||(t[n]=e(n))}function wI(e,t){return n=>{const i=e(n),r=i.indexOf(t);if(r<0)return i;let o=EI(i,r);const s=or;)if(i[o]!=="0"){++o;break}return i.slice(0,o)+s}}function EI(e,t){let n=e.lastIndexOf("e"),i;if(n>0)return n;for(n=e.length;--n>t;)if(i=e.charCodeAt(n),i>=48&&i<=57)return n+1}function lM(e){const t=ic(e.format),n=e.formatPrefix;return{format:t,formatPrefix:n,formatFloat(i){const r=Qs(i||",");if(r.precision==null){switch(r.precision=12,r.type){case"%":r.precision-=2;break;case"e":r.precision-=1;break}return wI(t(r),t(".1f")(1)[1])}else return t(r)},formatSpan(i,r,o,s){s=Qs(s??",f");const a=Lo(i,r,o),u=Math.max(Math.abs(i),Math.abs(r));let l;if(s.precision==null)switch(s.type){case"s":return isNaN(l=NF(a,u))||(s.precision=l),n(s,u);case"":case"e":case"g":case"p":case"r":{isNaN(l=OF(a,u))||(s.precision=l-(s.type==="e"));break}case"f":case"%":{isNaN(l=DF(a))||(s.precision=l-(s.type==="%")*2);break}}return t(s)}}}let G1;cM();function cM(){return G1=lM({format:eg,formatPrefix:rb})}function fM(e){return lM(TF(e))}function Sh(e){return arguments.length?G1=fM(e):G1}function z_(e,t,n){n=n||{},V(n)||R(`Invalid time multi-format specifier: ${n}`);const i=t(ti),r=t(In),o=t(Pn),s=t(xn),a=t(ot),u=t(Ut),l=t(bn),c=t(At),f=e(n[ki]||".%L"),d=e(n[ti]||":%S"),h=e(n[In]||"%I:%M"),p=e(n[Pn]||"%I %p"),g=e(n[xn]||n[Lt]||"%a %d"),m=e(n[ot]||"%b %d"),y=e(n[Ut]||"%B"),v=e(n[bn]||"%B"),b=e(n[At]||"%Y");return x=>(i(x)X(i)?t(i):z_(t,sl,i),utcFormat:i=>X(i)?n(i):z_(n,al,i),timeParse:ic(e.parse),utcParse:ic(e.utcParse)}}let Y1;hM();function hM(){return Y1=dM({format:lb,parse:aM,utcFormat:cb,utcParse:uM})}function pM(e){return dM(nM(e))}function Ic(e){return arguments.length?Y1=pM(e):Y1}const X1=(e,t)=>le({},e,t);function gM(e,t){const n=e?fM(e):Sh(),i=t?pM(t):Ic();return X1(n,i)}function fb(e,t){const n=arguments.length;return n&&n!==2&&R("defaultLocale expects either zero or two arguments."),n?X1(Sh(e),Ic(t)):X1(Sh(),Ic())}function _I(){return cM(),hM(),fb()}const SI=/^(data:|([A-Za-z]+:)?\/\/)/,$I=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,AI=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,B_="file://";function kI(e,t){return n=>({options:n||{},sanitize:FI,load:CI,fileAccess:!!t,file:MI(t),http:DI(e)})}async function CI(e,t){const n=await this.sanitize(e,t),i=n.href;return n.localFile?this.file(i):this.http(i,t)}async function FI(e,t){t=le({},this.options,t);const n=this.fileAccess,i={href:null};let r,o,s;const a=$I.test(e.replace(AI,""));(e==null||typeof e!="string"||!a)&&R("Sanitize failure, invalid URI: "+H(e));const u=SI.test(e);return(s=t.baseURL)&&!u&&(!e.startsWith("/")&&!s.endsWith("/")&&(e="/"+e),e=s+e),o=(r=e.startsWith(B_))||t.mode==="file"||t.mode!=="http"&&!u&&n,r?e=e.slice(B_.length):e.startsWith("//")&&(t.defaultProtocol==="file"?(e=e.slice(2),o=!0):e=(t.defaultProtocol||"http")+":"+e),Object.defineProperty(i,"localFile",{value:!!o}),i.href=e,t.target&&(i.target=t.target+""),t.rel&&(i.rel=t.rel+""),t.context==="image"&&t.crossOrigin&&(i.crossOrigin=t.crossOrigin+""),i}function MI(e){return e?t=>new Promise((n,i)=>{e.readFile(t,(r,o)=>{r?i(r):n(o)})}):TI}async function TI(){R("No file system access.")}function DI(e){return e?async function(t,n){const i=le({},this.options.http,n),r=n&&n.response,o=await e(t,i);return o.ok?ce(o[r])?o[r]():o.text():R(o.status+""+o.statusText)}:NI}async function NI(){R("No HTTP fetch method available.")}const OI=e=>e!=null&&e===e,RI=e=>e==="true"||e==="false"||e===!0||e===!1,LI=e=>!Number.isNaN(Date.parse(e)),mM=e=>!Number.isNaN(+e)&&!(e instanceof Date),PI=e=>mM(e)&&Number.isInteger(+e),V1={boolean:eb,integer:Pt,number:Pt,date:tb,string:nb,unknown:Wt},ad=[RI,PI,mM,LI],II=["boolean","integer","number","date"];function yM(e,t){if(!e||!e.length)return"unknown";const n=e.length,i=ad.length,r=ad.map((o,s)=>s+1);for(let o=0,s=0,a,u;oo===0?s:o,0)-1]}function vM(e,t){return t.reduce((n,i)=>(n[i]=yM(e,i),n),{})}function U_(e){const t=function(n,i){const r={delimiter:e};return db(n,i?le(i,r):r)};return t.responseType="text",t}function db(e,t){return t.header&&(e=t.header.map(H).join(t.delimiter)+` +`+e),vP(t.delimiter).parse(e+"")}db.responseType="text";function zI(e){return typeof Buffer=="function"&&ce(Buffer.isBuffer)?Buffer.isBuffer(e):!1}function hb(e,t){const n=t&&t.property?Zn(t.property):Wt;return V(e)&&!zI(e)?BI(n(e),t):n(JSON.parse(e))}hb.responseType="json";function BI(e,t){return!P(e)&&cF(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}const UI={interior:(e,t)=>e!==t,exterior:(e,t)=>e===t};function bM(e,t){let n,i,r,o;return e=hb(e,t),t&&t.feature?(n=EP,r=t.feature):t&&t.mesh?(n=SP,r=t.mesh,o=UI[t.filter]):R("Missing TopoJSON feature or mesh parameter."),i=(i=e.objects[r])?n(e,i,o):R("Invalid TopoJSON object: "+r),i&&i.features||[i]}bM.responseType="json";const Hd={dsv:db,csv:U_(","),tsv:U_(" "),json:hb,topojson:bM};function pb(e,t){return arguments.length>1?(Hd[e]=t,this):re(Hd,e)?Hd[e]:null}function xM(e){const t=pb(e);return t&&t.responseType||"text"}function wM(e,t,n,i){t=t||{};const r=pb(t.type||"json");return r||R("Unknown data format type: "+t.type),e=r(e,t),t.parse&&jI(e,t.parse,n,i),re(e,"columns")&&delete e.columns,e}function jI(e,t,n,i){if(!e.length)return;const r=Ic();n=n||r.timeParse,i=i||r.utcParse;let o=e.columns||Object.keys(e[0]),s,a,u,l,c,f;t==="auto"&&(t=vM(e,o)),o=Object.keys(t);const d=o.map(h=>{const p=t[h];let g,m;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return g=p.split(/:(.+)?/,2),m=g[1],(m[0]==="'"&&m[m.length-1]==="'"||m[0]==='"'&&m[m.length-1]==='"')&&(m=m.slice(1,-1)),(g[0]==="utc"?i:n)(m);if(!V1[p])throw Error("Illegal format pattern: "+h+":"+p);return V1[p]});for(u=0,c=e.length,f=o.length;u{const o=t(r);return i[o]||(i[o]=1,n.push(r)),n},n.remove=r=>{const o=t(r);if(i[o]){i[o]=0;const s=n.indexOf(r);s>=0&&n.splice(s,1)}return n},n}async function Gd(e,t){try{await t(e)}catch(n){e.error(n)}}const EM=Symbol("vega_id");let qI=1;function ug(e){return!!(e&&ne(e))}function ne(e){return e[EM]}function _M(e,t){return e[EM]=t,e}function Me(e){const t=e===Object(e)?e:{data:e};return ne(t)?t:_M(t,qI++)}function gb(e){return lg(e,Me({}))}function lg(e,t){for(const n in e)t[n]=e[n];return t}function SM(e,t){return _M(t,ne(e))}function _a(e,t){return e?t?(n,i)=>e(n,i)||ne(t(n))-ne(t(i)):(n,i)=>e(n,i)||ne(n)-ne(i):null}function $M(e){return e&&e.constructor===Sa}function Sa(){const e=[],t=[],n=[],i=[],r=[];let o=null,s=!1;return{constructor:Sa,insert(a){const u=Y(a),l=u.length;for(let c=0;c{p(v)&&(l[ne(v)]=-1)});for(f=0,d=e.length;f0&&(y(g,p,h.value),a.modifies(p));for(f=0,d=r.length;f{p(v)&&l[ne(v)]>0&&y(v,h.field,h.value)}),a.modifies(h.field);if(s)a.mod=t.length||i.length?u.filter(v=>l[ne(v)]>0):u.slice();else for(m in c)a.mod.push(c[m]);return(o||o==null&&(t.length||i.length))&&a.clean(!0),a}}}const Yd="_:mod:_";function cg(){Object.defineProperty(this,Yd,{writable:!0,value:{}})}cg.prototype={set(e,t,n,i){const r=this,o=r[e],s=r[Yd];return t!=null&&t>=0?(o[t]!==n||i)&&(o[t]=n,s[t+":"+e]=-1,s[e]=-1):(o!==n||i)&&(r[e]=n,s[e]=P(n)?1+n.length:-1),r},modified(e,t){const n=this[Yd];if(arguments.length){if(P(e)){for(let i=0;i=0?t+1{h instanceof Pe?(h!==this&&(t&&h.targets().add(this),o.push(h)),r.push({op:h,name:f,index:d})):i.set(f,d,h)};for(s in e)if(a=e[s],s===HI)Y(a).forEach(f=>{f instanceof Pe?f!==this&&(f.targets().add(this),o.push(f)):R("Pulse parameters must be operator instances.")}),this.source=a;else if(P(a))for(i.set(s,-1,Array(u=a.length)),l=0;l{const n=Date.now();return n-t>e?(t=n,1):0})},debounce(e){const t=fo();return this.targets().add(fo(null,null,Qv(e,n=>{const i=n.dataflow;t.receive(n),i&&i.run&&i.run()}))),t},between(e,t){let n=!1;return e.targets().add(fo(null,null,()=>n=!0)),t.targets().add(fo(null,null,()=>n=!1)),this.filter(()=>n)},detach(){this._filter=ei,this._targets=null}};function QI(e,t,n,i){const r=this,o=fo(n,i),s=function(l){l.dataflow=r;try{o.receive(l)}catch(c){r.error(c)}finally{r.run()}};let a;typeof e=="string"&&typeof document<"u"?a=document.querySelectorAll(e):a=Y(e);const u=a.length;for(let l=0;lt=i);return n.requests=0,n.done=()=>{--n.requests===0&&(e._pending=null,t(e))},e._pending=n}const r9={skip:!0};function o9(e,t,n,i,r){return(e instanceof Pe?a9:s9)(this,e,t,n,i,r),this}function s9(e,t,n,i,r,o){const s=le({},o,r9);let a,u;ce(n)||(n=Ht(n)),i===void 0?a=l=>e.touch(n(l)):ce(i)?(u=new Pe(null,i,r,!1),a=l=>{u.evaluate(l);const c=n(l),f=u.value;$M(f)?e.pulse(c,f,o):e.update(c,f,s)}):a=l=>e.update(n(l),i,s),t.apply(a)}function a9(e,t,n,i,r,o){if(i===void 0)t.targets().add(n);else{const s=o||{},a=new Pe(null,u9(n,i),r,!1);a.modified(s.force),a.rank=t.rank,t.targets().add(a),n&&(a.skip(!0),a.value=n.value,a.targets().add(n),e.connect(n,[a]))}}function u9(e,t){return t=ce(t)?t:Ht(t),e?function(n,i){const r=t(n,i);return e.skip()||(e.skip(r!==this.value).value=r),r}:t}function l9(e){e.rank=++this._rank}function c9(e){const t=[e];let n,i,r;for(;t.length;)if(this.rank(n=t.pop()),i=n._targets)for(r=i.length;--r>=0;)t.push(n=i[r]),n===e&&R("Cycle detected in dataflow graph.")}const $h={},Wi=1,go=2,Fr=4,f9=Wi|go,q_=Wi|Fr,Ba=Wi|go|Fr,W_=8,Ml=16,H_=32,G_=64;function To(e,t,n){this.dataflow=e,this.stamp=t??-1,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=n||null}function p0(e,t){const n=[];return po(e,t,i=>n.push(i)),n}function Y_(e,t){const n={};return e.visit(t,i=>{n[ne(i)]=1}),i=>n[ne(i)]?null:i}function ud(e,t){return e?(n,i)=>e(n,i)&&t(n,i):t}To.prototype={StopPropagation:$h,ADD:Wi,REM:go,MOD:Fr,ADD_REM:f9,ADD_MOD:q_,ALL:Ba,REFLOW:W_,SOURCE:Ml,NO_SOURCE:H_,NO_FIELDS:G_,fork(e){return new To(this.dataflow).init(this,e)},clone(){const e=this.fork(Ba);return e.add=e.add.slice(),e.rem=e.rem.slice(),e.mod=e.mod.slice(),e.source&&(e.source=e.source.slice()),e.materialize(Ba|Ml)},addAll(){let e=this;return!e.source||e.add===e.rem||!e.rem.length&&e.source.length===e.add.length||(e=new To(this.dataflow).init(this),e.add=e.source,e.rem=[]),e},init(e,t){const n=this;return n.stamp=e.stamp,n.encode=e.encode,e.fields&&!(t&G_)&&(n.fields=e.fields),t&Wi?(n.addF=e.addF,n.add=e.add):(n.addF=null,n.add=[]),t&go?(n.remF=e.remF,n.rem=e.rem):(n.remF=null,n.rem=[]),t&Fr?(n.modF=e.modF,n.mod=e.mod):(n.modF=null,n.mod=[]),t&H_?(n.srcF=null,n.source=null):(n.srcF=e.srcF,n.source=e.source,e.cleans&&(n.cleans=e.cleans)),n},runAfter(e){this.dataflow.runAfter(e)},changed(e){const t=e||Ba;return t&Wi&&this.add.length||t&go&&this.rem.length||t&Fr&&this.mod.length},reflow(e){if(e)return this.fork(Ba).reflow();const t=this.add.length,n=this.source&&this.source.length;return n&&n!==t&&(this.mod=this.source,t&&this.filter(Fr,Y_(this,Wi))),this},clean(e){return arguments.length?(this.cleans=!!e,this):this.cleans},modifies(e){const t=this.fields||(this.fields={});return P(e)?e.forEach(n=>t[n]=!0):t[e]=!0,this},modified(e,t){const n=this.fields;return(t||this.mod.length)&&n?arguments.length?P(e)?e.some(i=>n[i]):n[e]:!!n:!1},filter(e,t){const n=this;return e&Wi&&(n.addF=ud(n.addF,t)),e&go&&(n.remF=ud(n.remF,t)),e&Fr&&(n.modF=ud(n.modF,t)),e&Ml&&(n.srcF=ud(n.srcF,t)),n},materialize(e){e=e||Ba;const t=this;return e&Wi&&t.addF&&(t.add=p0(t.add,t.addF),t.addF=null),e&go&&t.remF&&(t.rem=p0(t.rem,t.remF),t.remF=null),e&Fr&&t.modF&&(t.mod=p0(t.mod,t.modF),t.modF=null),e&Ml&&t.srcF&&(t.source=t.source.filter(t.srcF),t.srcF=null),t},visit(e,t){const n=this,i=t;if(e&Ml)return po(n.source,n.srcF,i),n;e&Wi&&po(n.add,n.addF,i),e&go&&po(n.rem,n.remF,i),e&Fr&&po(n.mod,n.modF,i);const r=n.source;if(e&W_&&r){const o=n.add.length+n.mod.length;o===r.length||(o?po(r,Y_(n,q_),i):po(r,n.srcF,i))}return n}};function mb(e,t,n,i){const r=this;let o=0;this.dataflow=e,this.stamp=t,this.fields=null,this.encode=i||null,this.pulses=n;for(const s of n)if(s.stamp===t){if(s.fields){const a=r.fields||(r.fields={});for(const u in s.fields)a[u]=1}s.changed(r.ADD)&&(o|=r.ADD),s.changed(r.REM)&&(o|=r.REM),s.changed(r.MOD)&&(o|=r.MOD)}this.changes=o}W(mb,To,{fork(e){const t=new To(this.dataflow).init(this,e&this.NO_FIELDS);return e!==void 0&&(e&t.ADD&&this.visit(t.ADD,n=>t.add.push(n)),e&t.REM&&this.visit(t.REM,n=>t.rem.push(n)),e&t.MOD&&this.visit(t.MOD,n=>t.mod.push(n))),t},changed(e){return this.changes&e},modified(e){const t=this,n=t.fields;return n&&t.changes&t.MOD?P(e)?e.some(i=>n[i]):n[e]:0},filter(){R("MultiPulse does not support filtering.")},materialize(){R("MultiPulse does not support materialization.")},visit(e,t){const n=this,i=n.pulses,r=i.length;let o=0;if(e&n.SOURCE)for(;oi._enqueue(c,!0)),i._touched=ag(mf);let s=0,a,u,l;try{for(;i._heap.size()>0;){if(a=i._heap.pop(),a.rank!==a.qrank){i._enqueue(a,!0);continue}u=a.run(i._getPulse(a,e)),u.then?u=await u:u.async&&(r.push(u.async),u=$h),u!==$h&&a._targets&&a._targets.forEach(c=>i._enqueue(c)),++s}}catch(c){i._heap.clear(),l=c}if(i._input={},i._pulse=null,i.debug(`Pulse ${o}: ${s} operators`),l&&(i._postrun=[],i.error(l)),i._postrun.length){const c=i._postrun.sort((f,d)=>d.priority-f.priority);i._postrun=[];for(let f=0;fi.runAsync(null,()=>{c.forEach(f=>{try{f(i)}catch(d){i.error(d)}})})),i}async function h9(e,t,n){for(;this._running;)await this._running;const i=()=>this._running=null;return(this._running=this.evaluate(e,t,n)).then(i,i),this._running}function p9(e,t,n){return this._pulse?AM(this):(this.evaluate(e,t,n),this)}function g9(e,t,n){if(this._pulse||t)this._postrun.push({priority:n||0,callback:e});else try{e(this)}catch(i){this.error(i)}}function AM(e){return e.error("Dataflow already running. Use runAsync() to chain invocations."),e}function m9(e,t){const n=e.stampr.pulse),t):this._input[e.id]||v9(this._pulse,n&&n.pulse)}function v9(e,t){return t&&t.stamp===e.stamp?t:(e=e.fork(),t&&t!==$h&&(e.source=t.source),e)}const yb={skip:!1,force:!1};function b9(e,t){const n=t||yb;return this._pulse?this._enqueue(e):this._touched.add(e),n.skip&&e.skip(!0),this}function x9(e,t,n){const i=n||yb;return(e.set(t)||i.force)&&this.touch(e,i),this}function w9(e,t,n){this.touch(e,n||yb);const i=new To(this,this._clock+(this._pulse?0:1)),r=e.pulse&&e.pulse.source||[];return i.target=e,this._input[e.id]=t.pulse(i,r),this}function E9(e){let t=[];return{clear:()=>t=[],size:()=>t.length,peek:()=>t[0],push:n=>(t.push(n),kM(t,0,t.length-1,e)),pop:()=>{const n=t.pop();let i;return t.length?(i=t[0],t[0]=n,_9(t,0,e)):i=n,i}}}function kM(e,t,n,i){let r,o;const s=e[n];for(;n>t;){if(o=n-1>>1,r=e[o],i(s,r)<0){e[n]=r,n=o;continue}break}return e[n]=s}function _9(e,t,n){const i=t,r=e.length,o=e[t];let s=(t<<1)+1,a;for(;s=0&&(s=a),e[t]=e[s],t=s,s=(t<<1)+1;return e[t]=o,kM(e,i,t,n)}function uu(){this.logger(Yv()),this.logLevel(Hv),this._clock=0,this._rank=0,this._locale=fb();try{this._loader=sg()}catch{}this._touched=ag(mf),this._input={},this._pulse=null,this._heap=E9((e,t)=>e.qrank-t.qrank),this._postrun=[]}function Tl(e){return function(){return this._log[e].apply(this,arguments)}}uu.prototype={stamp(){return this._clock},loader(e){return arguments.length?(this._loader=e,this):this._loader},locale(e){return arguments.length?(this._locale=e,this):this._locale},logger(e){return arguments.length?(this._log=e,this):this._log},error:Tl("error"),warn:Tl("warn"),info:Tl("info"),debug:Tl("debug"),logLevel:Tl("level"),cleanThreshold:1e4,add:VI,connect:KI,rank:l9,rerank:c9,pulse:w9,touch:b9,update:x9,changeset:Sa,ingest:e9,parse:ZI,preload:n9,request:t9,events:QI,on:o9,evaluate:d9,run:p9,runAsync:h9,runAfter:g9,_enqueue:m9,_getPulse:y9};function D(e,t){Pe.call(this,e,null,t)}W(D,Pe,{run(e){if(e.stampthis.pulse=n):t!==e.StopPropagation&&(this.pulse=t),t},evaluate(e){const t=this.marshall(e.stamp),n=this.transform(t,e);return t.clear(),n},transform(){}});const Su={};function CM(e){const t=FM(e);return t&&t.Definition||null}function FM(e){return e=e&&e.toLowerCase(),re(Su,e)?Su[e]:null}function*MM(e,t){if(t==null)for(let n of e)n!=null&&n!==""&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of e)i=t(i,++n,e),i!=null&&i!==""&&(i=+i)>=i&&(yield i)}}function vb(e,t,n){const i=Float64Array.from(MM(e,n));return i.sort(jr),t.map(r=>AF(i,r))}function bb(e,t){return vb(e,[.25,.5,.75],t)}function xb(e,t){const n=e.length,i=DP(e,t),r=bb(e,t),o=(r[2]-r[0])/1.34;return 1.06*(Math.min(i,o)||i||Math.abs(r[0])||1)*Math.pow(n,-.2)}function TM(e){const t=e.maxbins||20,n=e.base||10,i=Math.log(n),r=e.divide||[5,2];let o=e.extent[0],s=e.extent[1],a,u,l,c,f,d;const h=e.span||s-o||Math.abs(o)||1;if(e.step)a=e.step;else if(e.steps){for(c=h/t,f=0,d=e.steps.length;ft;)a*=n;for(f=0,d=r.length;f=l&&h/c<=t&&(a=c)}c=Math.log(a);const p=c>=0?0:~~(-c/i)+1,g=Math.pow(n,-p-1);return(e.nice||e.nice===void 0)&&(c=Math.floor(o/a+g)*a,o=od);const r=e.length,o=new Float64Array(r);let s=0,a=1,u=i(e[0]),l=u,c=u+t,f;for(;a=c){for(l=(u+l)/2;s>1);sr;)e[s--]=e[i]}i=r,r=o}return e}function A9(e){return function(){return e=(1103515245*e+12345)%2147483647,e/2147483647}}function k9(e,t){t==null&&(t=e,e=0);let n,i,r;const o={min(s){return arguments.length?(n=s||0,r=i-n,o):n},max(s){return arguments.length?(i=s||0,r=i-n,o):i},sample(){return n+Math.floor(r*ni())},pdf(s){return s===Math.floor(s)&&s>=n&&s=i?1:(a-n+1)/r},icdf(s){return s>=0&&s<=1?n-1+Math.floor(s*r):NaN}};return o.min(e).max(t)}const OM=Math.sqrt(2*Math.PI),C9=Math.SQRT2;let Dl=NaN;function dg(e,t){e=e||0,t=t??1;let n=0,i=0,r,o;if(Dl===Dl)n=Dl,Dl=NaN;else{do n=ni()*2-1,i=ni()*2-1,r=n*n+i*i;while(r===0||r>1);o=Math.sqrt(-2*Math.log(r)/r),n*=o,Dl=i*o}return e+n*t}function wb(e,t,n){n=n??1;const i=(e-(t||0))/n;return Math.exp(-.5*i*i)/(n*OM)}function hg(e,t,n){t=t||0,n=n??1;const i=(e-t)/n,r=Math.abs(i);let o;if(r>37)o=0;else{const s=Math.exp(-r*r/2);let a;r<7.07106781186547?(a=.0352624965998911*r+.700383064443688,a=a*r+6.37396220353165,a=a*r+33.912866078383,a=a*r+112.079291497871,a=a*r+221.213596169931,a=a*r+220.206867912376,o=s*a,a=.0883883476483184*r+1.75566716318264,a=a*r+16.064177579207,a=a*r+86.7807322029461,a=a*r+296.564248779674,a=a*r+637.333633378831,a=a*r+793.826512519948,a=a*r+440.413735824752,o=o/a):(a=r+.65,a=r+4/a,a=r+3/a,a=r+2/a,a=r+1/a,o=s/a/2.506628274631)}return i>0?1-o:o}function pg(e,t,n){return e<0||e>1?NaN:(t||0)+(n??1)*C9*F9(2*e-1)}function F9(e){let t=-Math.log((1-e)*(1+e)),n;return t<6.25?(t-=3.125,n=-364441206401782e-35,n=-16850591381820166e-35+n*t,n=128584807152564e-32+n*t,n=11157877678025181e-33+n*t,n=-1333171662854621e-31+n*t,n=20972767875968562e-33+n*t,n=6637638134358324e-30+n*t,n=-4054566272975207e-29+n*t,n=-8151934197605472e-29+n*t,n=26335093153082323e-28+n*t,n=-12975133253453532e-27+n*t,n=-5415412054294628e-26+n*t,n=10512122733215323e-25+n*t,n=-4112633980346984e-24+n*t,n=-29070369957882005e-24+n*t,n=42347877827932404e-23+n*t,n=-13654692000834679e-22+n*t,n=-13882523362786469e-21+n*t,n=.00018673420803405714+n*t,n=-.000740702534166267+n*t,n=-.006033670871430149+n*t,n=.24015818242558962+n*t,n=1.6536545626831027+n*t):t<16?(t=Math.sqrt(t)-3.25,n=22137376921775787e-25,n=9075656193888539e-23+n*t,n=-27517406297064545e-23+n*t,n=18239629214389228e-24+n*t,n=15027403968909828e-22+n*t,n=-4013867526981546e-21+n*t,n=29234449089955446e-22+n*t,n=12475304481671779e-21+n*t,n=-47318229009055734e-21+n*t,n=6828485145957318e-20+n*t,n=24031110387097894e-21+n*t,n=-.0003550375203628475+n*t,n=.0009532893797373805+n*t,n=-.0016882755560235047+n*t,n=.002491442096107851+n*t,n=-.003751208507569241+n*t,n=.005370914553590064+n*t,n=1.0052589676941592+n*t,n=3.0838856104922208+n*t):Number.isFinite(t)?(t=Math.sqrt(t)-5,n=-27109920616438573e-27,n=-2555641816996525e-25+n*t,n=15076572693500548e-25+n*t,n=-3789465440126737e-24+n*t,n=761570120807834e-23+n*t,n=-1496002662714924e-23+n*t,n=2914795345090108e-23+n*t,n=-6771199775845234e-23+n*t,n=22900482228026655e-23+n*t,n=-99298272942317e-20+n*t,n=4526062597223154e-21+n*t,n=-1968177810553167e-20+n*t,n=7599527703001776e-20+n*t,n=-.00021503011930044477+n*t,n=-.00013871931833623122+n*t,n=1.0103004648645344+n*t,n=4.849906401408584+n*t):n=1/0,n*e}function Eb(e,t){let n,i;const r={mean(o){return arguments.length?(n=o||0,r):n},stdev(o){return arguments.length?(i=o??1,r):i},sample:()=>dg(n,i),pdf:o=>wb(o,n,i),cdf:o=>hg(o,n,i),icdf:o=>pg(o,n,i)};return r.mean(e).stdev(t)}function _b(e,t){const n=Eb();let i=0;const r={data(o){return arguments.length?(e=o,i=o?o.length:0,r.bandwidth(t)):e},bandwidth(o){return arguments.length?(t=o,!t&&e&&(t=xb(e)),r):t},sample(){return e[~~(ni()*i)]+t*n.sample()},pdf(o){let s=0,a=0;for(;aSb(n,i),pdf:o=>$b(o,n,i),cdf:o=>Ab(o,n,i),icdf:o=>kb(o,n,i)};return r.mean(e).stdev(t)}function LM(e,t){let n=0,i;function r(s){const a=[];let u=0,l;for(l=0;l=t&&e<=n?1/(n-t):0}function Mb(e,t,n){return n==null&&(n=t??1,t=0),en?1:(e-t)/(n-t)}function Tb(e,t,n){return n==null&&(n=t??1,t=0),e>=0&&e<=1?t+e*(n-t):NaN}function PM(e,t){let n,i;const r={min(o){return arguments.length?(n=o||0,r):n},max(o){return arguments.length?(i=o??1,r):i},sample:()=>Cb(n,i),pdf:o=>Fb(o,n,i),cdf:o=>Mb(o,n,i),icdf:o=>Tb(o,n,i)};return t==null&&(t=e??1,e=0),r.min(e).max(t)}function Db(e,t,n){let i=0,r=0;for(const o of e){const s=n(o);t(o)==null||s==null||isNaN(s)||(i+=(s-i)/++r)}return{coef:[i],predict:()=>i,rSquared:0}}function vf(e,t,n,i){const r=i-e*e,o=Math.abs(r)<1e-24?0:(n-e*t)/r;return[t-o*e,o]}function gg(e,t,n,i){e=e.filter(h=>{let p=t(h),g=n(h);return p!=null&&(p=+p)>=p&&g!=null&&(g=+g)>=g}),i&&e.sort((h,p)=>t(h)-t(p));const r=e.length,o=new Float64Array(r),s=new Float64Array(r);let a=0,u=0,l=0,c,f,d;for(d of e)o[a]=c=+t(d),s[a]=f=+n(d),++a,u+=(c-u)/a,l+=(f-l)/a;for(a=0;a=o&&s!=null&&(s=+s)>=s&&i(o,s,++r)}function ul(e,t,n,i,r){let o=0,s=0;return bf(e,t,n,(a,u)=>{const l=u-r(a),c=u-i;o+=l*l,s+=c*c}),1-o/s}function Nb(e,t,n){let i=0,r=0,o=0,s=0,a=0;bf(e,t,n,(c,f)=>{++a,i+=(c-i)/a,r+=(f-r)/a,o+=(c*f-o)/a,s+=(c*c-s)/a});const u=vf(i,r,o,s),l=c=>u[0]+u[1]*c;return{coef:u,predict:l,rSquared:ul(e,t,n,r,l)}}function IM(e,t,n){let i=0,r=0,o=0,s=0,a=0;bf(e,t,n,(c,f)=>{++a,c=Math.log(c),i+=(c-i)/a,r+=(f-r)/a,o+=(c*f-o)/a,s+=(c*c-s)/a});const u=vf(i,r,o,s),l=c=>u[0]+u[1]*Math.log(c);return{coef:u,predict:l,rSquared:ul(e,t,n,r,l)}}function zM(e,t,n){const[i,r,o,s]=gg(e,t,n);let a=0,u=0,l=0,c=0,f=0,d,h,p;bf(e,t,n,(v,b)=>{d=i[f++],h=Math.log(b),p=d*b,a+=(b*h-a)/f,u+=(p-u)/f,l+=(p*h-l)/f,c+=(d*p-c)/f});const[g,m]=vf(u/s,a/s,l/s,c/s),y=v=>Math.exp(g+m*(v-o));return{coef:[Math.exp(g-m*o),m],predict:y,rSquared:ul(e,t,n,s,y)}}function BM(e,t,n){let i=0,r=0,o=0,s=0,a=0,u=0;bf(e,t,n,(f,d)=>{const h=Math.log(f),p=Math.log(d);++u,i+=(h-i)/u,r+=(p-r)/u,o+=(h*p-o)/u,s+=(h*h-s)/u,a+=(d-a)/u});const l=vf(i,r,o,s),c=f=>l[0]*Math.pow(f,l[1]);return l[0]=Math.exp(l[0]),{coef:l,predict:c,rSquared:ul(e,t,n,a,c)}}function Ob(e,t,n){const[i,r,o,s]=gg(e,t,n),a=i.length;let u=0,l=0,c=0,f=0,d=0,h,p,g,m;for(h=0;h(E=E-o,b*E*E+x*E+w+s);return{coef:[w-x*o+b*o*o+s,x-2*b*o,b],predict:_,rSquared:ul(e,t,n,s,_)}}function UM(e,t,n,i){if(i===0)return Db(e,t,n);if(i===1)return Nb(e,t,n);if(i===2)return Ob(e,t,n);const[r,o,s,a]=gg(e,t,n),u=r.length,l=[],c=[],f=i+1;let d,h,p,g,m;for(d=0;d{b-=s;let x=a+y[0]+y[1]*b+y[2]*b*b;for(d=3;d=0;--o)for(a=t[o],u=1,r[o]+=a,s=1;s<=o;++s)u*=(o+1-s)/s,r[o-s]+=a*Math.pow(n,s)*u;return r[0]+=i,r}function T9(e){const t=e.length-1,n=[];let i,r,o,s,a;for(i=0;iMath.abs(e[i][s])&&(s=r);for(o=i;o=i;o--)e[o][r]-=e[o][i]*e[i][r]/e[i][i]}for(r=t-1;r>=0;--r){for(a=0,o=r+1;or[b]-y?v:b;let w=0,_=0,E=0,S=0,$=0;const F=1/Math.abs(r[x]-y||1);for(let A=v;A<=b;++A){const M=r[A],C=o[A],T=D9(Math.abs(y-M)*F)*d[A],L=M*T;w+=T,_+=L,E+=C*T,S+=C*L,$+=M*L}const[k,N]=vf(_/w,E/w,S/w,$/w);c[m]=k+N*y,f[m]=Math.abs(o[m]-c[m]),N9(r,m+1,p)}if(h===X_)break;const g=kF(f);if(Math.abs(g)=1?V_:(v=1-y*y)*v}return O9(r,c,s,a)}function D9(e){return(e=1-e*e*e)*e*e}function N9(e,t,n){const i=e[t];let r=n[0],o=n[1]+1;if(!(o>=e.length))for(;t>r&&e[o]-i<=i-e[r];)n[0]=++r,n[1]=o,++o}function O9(e,t,n,i){const r=e.length,o=[];let s=0,a=0,u=[],l;for(;s[g,e(g)],o=t[0],s=t[1],a=s-o,u=a/i,l=[r(o)],c=[];if(n===i){for(let g=1;g0;)c.push(r(o+g/n*a))}let f=l[0],d=c[c.length-1];const h=1/a,p=L9(f[1],c);for(;d;){const g=r((f[0]+d[0])/2);g[0]-f[0]>=u&&P9(f,g,d,h,p)>R9?c.push(g):(f=d,l.push(d),c.pop()),d=c[c.length-1]}return l}function L9(e,t){let n=e,i=e;const r=t.length;for(let o=0;oi&&(i=s)}return 1/(i-n)}function P9(e,t,n,i,r){const o=Math.atan2(r*(n[1]-e[1]),i*(n[0]-e[0])),s=Math.atan2(r*(t[1]-e[1]),i*(t[0]-e[0]));return Math.abs(o-s)}function I9(e){return t=>{const n=e.length;let i=1,r=String(e[0](t));for(;i{},z9={init:g0,add:g0,rem:g0,idx:0},zc={values:{init:e=>e.cell.store=!0,value:e=>e.cell.data.values(),idx:-1},count:{value:e=>e.cell.num},__count__:{value:e=>e.missing+e.valid},missing:{value:e=>e.missing},valid:{value:e=>e.valid},sum:{init:e=>e.sum=0,value:e=>e.valid?e.sum:void 0,add:(e,t)=>e.sum+=+t,rem:(e,t)=>e.sum-=t},product:{init:e=>e.product=1,value:e=>e.valid?e.product:void 0,add:(e,t)=>e.product*=t,rem:(e,t)=>e.product/=t},mean:{init:e=>e.mean=0,value:e=>e.valid?e.mean:void 0,add:(e,t)=>(e.mean_d=t-e.mean,e.mean+=e.mean_d/e.valid),rem:(e,t)=>(e.mean_d=t-e.mean,e.mean-=e.valid?e.mean_d/e.valid:e.mean)},average:{value:e=>e.valid?e.mean:void 0,req:["mean"],idx:1},variance:{init:e=>e.dev=0,value:e=>e.valid>1?e.dev/(e.valid-1):void 0,add:(e,t)=>e.dev+=e.mean_d*(t-e.mean),rem:(e,t)=>e.dev-=e.mean_d*(t-e.mean),req:["mean"],idx:1},variancep:{value:e=>e.valid>1?e.dev/e.valid:void 0,req:["variance"],idx:2},stdev:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:e=>e.valid>1?Math.sqrt(e.dev/e.valid):void 0,req:["variance"],idx:2},stderr:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid*(e.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:e=>e.cell.data.distinct(e.get),req:["values"],idx:3},ci0:{value:e=>e.cell.data.ci0(e.get),req:["values"],idx:3},ci1:{value:e=>e.cell.data.ci1(e.get),req:["values"],idx:3},median:{value:e=>e.cell.data.q2(e.get),req:["values"],idx:3},q1:{value:e=>e.cell.data.q1(e.get),req:["values"],idx:3},q3:{value:e=>e.cell.data.q3(e.get),req:["values"],idx:3},min:{init:e=>e.min=void 0,value:e=>e.min=Number.isNaN(e.min)?e.cell.data.min(e.get):e.min,add:(e,t)=>{(t{t<=e.min&&(e.min=NaN)},req:["values"],idx:4},max:{init:e=>e.max=void 0,value:e=>e.max=Number.isNaN(e.max)?e.cell.data.max(e.get):e.max,add:(e,t)=>{(t>e.max||e.max===void 0)&&(e.max=t)},rem:(e,t)=>{t>=e.max&&(e.max=NaN)},req:["values"],idx:4},argmin:{init:e=>e.argmin=void 0,value:e=>e.argmin||e.cell.data.argmin(e.get),add:(e,t,n)=>{t{t<=e.min&&(e.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:e=>e.argmax=void 0,value:e=>e.argmax||e.cell.data.argmax(e.get),add:(e,t,n)=>{t>e.max&&(e.argmax=n)},rem:(e,t)=>{t>=e.max&&(e.argmax=void 0)},req:["max","values"],idx:3},exponential:{init:(e,t)=>{e.exp=0,e.exp_r=t},value:e=>e.valid?e.exp*(1-e.exp_r)/(1-e.exp_r**e.valid):void 0,add:(e,t)=>e.exp=e.exp_r*e.exp+t,rem:(e,t)=>e.exp=(e.exp-t/e.exp_r**(e.valid-1))/e.exp_r},exponentialb:{value:e=>e.valid?e.exp*(1-e.exp_r):void 0,req:["exponential"],idx:1}},xf=Object.keys(zc).filter(e=>e!=="__count__");function B9(e,t){return(n,i)=>le({name:e,aggregate_param:i,out:n||e},z9,t)}[...xf,"__count__"].forEach(e=>{zc[e]=B9(e,zc[e])});function WM(e,t,n){return zc[e](n,t)}function HM(e,t){return e.idx-t.idx}function U9(e){const t={};e.forEach(i=>t[i.name]=i);const n=i=>{i.req&&i.req.forEach(r=>{t[r]||n(t[r]=zc[r]())})};return e.forEach(n),Object.values(t).sort(HM)}function j9(){this.valid=0,this.missing=0,this._ops.forEach(e=>e.aggregate_param==null?e.init(this):e.init(this,e.aggregate_param))}function q9(e,t){if(e==null||e===""){++this.missing;return}e===e&&(++this.valid,this._ops.forEach(n=>n.add(this,e,t)))}function W9(e,t){if(e==null||e===""){--this.missing;return}e===e&&(--this.valid,this._ops.forEach(n=>n.rem(this,e,t)))}function H9(e){return this._out.forEach(t=>e[t.out]=t.value(this)),e}function GM(e,t){const n=t||Wt,i=U9(e),r=e.slice().sort(HM);function o(s){this._ops=i,this._out=r,this.cell=s,this.init()}return o.prototype.init=j9,o.prototype.add=q9,o.prototype.rem=W9,o.prototype.set=H9,o.prototype.get=n,o.fields=e.map(s=>s.out),o}function Rb(e){this._key=e?Zn(e):ne,this.reset()}const Ft=Rb.prototype;Ft.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null};Ft.add=function(e){this._add.push(e)};Ft.rem=function(e){this._rem.push(e)};Ft.values=function(){if(this._get=null,this._rem.length===0)return this._add;const e=this._add,t=this._rem,n=this._key,i=e.length,r=t.length,o=Array(i-r),s={};let a,u,l;for(a=0;a=0;)o=e(t[i])+"",re(n,o)||(n[o]=1,++r);return r};Ft.extent=function(e){if(this._get!==e||!this._ext){const t=this.values(),n=uF(t,e);this._ext=[t[n[0]],t[n[1]]],this._get=e}return this._ext};Ft.argmin=function(e){return this.extent(e)[0]||{}};Ft.argmax=function(e){return this.extent(e)[1]||{}};Ft.min=function(e){const t=this.extent(e)[0];return t!=null?e(t):void 0};Ft.max=function(e){const t=this.extent(e)[1];return t!=null?e(t):void 0};Ft.quartile=function(e){return(this._get!==e||!this._q)&&(this._q=bb(this.values(),e),this._get=e),this._q};Ft.q1=function(e){return this.quartile(e)[0]};Ft.q2=function(e){return this.quartile(e)[1]};Ft.q3=function(e){return this.quartile(e)[2]};Ft.ci=function(e){return(this._get!==e||!this._ci)&&(this._ci=DM(this.values(),1e3,.05,e),this._get=e),this._ci};Ft.ci0=function(e){return this.ci(e)[0]};Ft.ci1=function(e){return this.ci(e)[1]};function Po(e){D.call(this,null,e),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}Po.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:xf},{name:"aggregate_params",type:"number",null:!0,array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]};W(Po,D,{transform(e,t){const n=this,i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=e.modified();return n.stamp=i.stamp,n.value&&(r||t.modified(n._inputs,!0))?(n._prev=n.value,n.value=r?n.init(e):Object.create(null),t.visit(t.SOURCE,o=>n.add(o))):(n.value=n.value||n.init(e),t.visit(t.REM,o=>n.rem(o)),t.visit(t.ADD,o=>n.add(o))),i.modifies(n._outputs),n._drop=e.drop!==!1,e.cross&&n._dims.length>1&&(n._drop=!1,n.cross()),t.clean()&&n._drop&&i.clean(!0).runAfter(()=>this.clean()),n.changes(i)},cross(){const e=this,t=e.value,n=e._dnames,i=n.map(()=>({})),r=n.length;function o(a){let u,l,c,f;for(u in a)for(c=a[u].tuple,l=0;l{const b=Je(v);return r(v),n.push(b),b}),this.cellkey=e.key?e.key:K1(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const o=e.fields||[null],s=e.ops||["count"],a=e.aggregate_params||[null],u=e.as||[],l=o.length,c={};let f,d,h,p,g,m,y;for(l!==s.length&&R("Unmatched number of fields and aggregate ops."),y=0;yGM(v,v.field)),Object.create(null)},cellkey:K1(),cell(e,t){let n=this.value[e];return n?n.num===0&&this._drop&&n.stamp{const f=i(c);c[a]=f,c[u]=f==null?null:r+o*(1+(f-r)/o)}:c=>c[a]=i(c)),t.modifies(n?s:a)},_bins(e){if(this.value&&!e.modified())return this.value;const t=e.field,n=TM(e),i=n.step;let r=n.start,o=r+Math.ceil((n.stop-r)/i)*i,s,a;(s=e.anchor)!=null&&(a=s-(r+i*Math.floor((s-r)/i)),r+=a,o+=a);const u=function(l){let c=Pt(t(l));return c==null?null:co?1/0:(c=Math.max(r,Math.min(c,o-i)),r+i*Math.floor(G9+(c-r)/i))};return u.start=r,u.stop=n.stop,u.step=i,this.value=$n(u,Bt(t),e.name||"bin_"+Je(t))}});function YM(e,t,n){const i=e;let r=t||[],o=n||[],s={},a=0;return{add:u=>o.push(u),remove:u=>s[i(u)]=++a,size:()=>r.length,data:(u,l)=>(a&&(r=r.filter(c=>!s[i(c)]),s={},a=0),l&&u&&r.sort(u),o.length&&(r=u?pF(u,r,o.sort(u)):r.concat(o),o=[]),r)}}function Pb(e){D.call(this,[],e)}Pb.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]};W(Pb,D,{transform(e,t){const n=t.fork(t.ALL),i=YM(ne,this.value,n.materialize(n.ADD).add),r=e.sort,o=t.changed()||r&&(e.modified("sort")||t.modified(r.fields));return n.visit(n.REM,i.remove),this.modified(o),this.value=n.source=i.data(_a(r),o),t.source&&t.source.root&&(this.value.root=t.source.root),n}});function XM(e){Pe.call(this,null,Y9,e)}W(XM,Pe);function Y9(e){return this.value&&!e.modified()?this.value:Jv(e.fields,e.orders)}function Ib(e){D.call(this,null,e)}Ib.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]};function X9(e,t,n){switch(t){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase();break}return e.match(n)}W(Ib,D,{transform(e,t){const n=f=>d=>{for(var h=X9(a(d),e.case,o)||[],p,g=0,m=h.length;gr[f]=1+(r[f]||0)),c=n(f=>r[f]-=1);return i?t.visit(t.SOURCE,l):(t.visit(t.ADD,l),t.visit(t.REM,c)),this._finish(t,u)},_parameterCheck(e,t){let n=!1;return(e.modified("stopwords")||!this._stop)&&(this._stop=new RegExp("^"+(e.stopwords||"")+"$","i"),n=!0),(e.modified("pattern")||!this._match)&&(this._match=new RegExp(e.pattern||"[\\w']+","g"),n=!0),(e.modified("field")||t.modified(e.field.fields))&&(n=!0),n&&(this._counts={}),n},_finish(e,t){const n=this._counts,i=this._tuples||(this._tuples={}),r=t[0],o=t[1],s=e.fork(e.NO_SOURCE|e.NO_FIELDS);let a,u,l;for(a in n)u=i[a],l=n[a]||0,!u&&l?(i[a]=u=Me({}),u[r]=a,u[o]=l,s.add.push(u)):l===0?(u&&s.rem.push(u),n[a]=null,i[a]=null):u[o]!==l&&(u[o]=l,s.mod.push(u));return s.modifies(t)}});function zb(e){D.call(this,null,e)}zb.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]};W(zb,D,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.as||["a","b"],r=i[0],o=i[1],s=!this.value||t.changed(t.ADD_REM)||e.modified("as")||e.modified("filter");let a=this.value;return s?(a&&(n.rem=a),a=t.materialize(t.SOURCE).source,n.add=this.value=V9(a,r,o,e.filter||ei)):n.mod=a,n.source=this.value,n.modifies(i)}});function V9(e,t,n,i){for(var r=[],o={},s=e.length,a=0,u,l;aVM(o,t))):typeof i[r]===J_&&i[r](e[r]);return i}function Bb(e){D.call(this,null,e)}const KM=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}],Q9={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:KM},{name:"weights",type:"number",array:!0}]};Bb.Definition={type:"Density",metadata:{generates:!0},params:[{name:"extent",type:"number",array:!0,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:KM.concat(Q9)},{name:"as",type:"string",array:!0,default:["value","density"]}]};W(Bb,D,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const i=VM(e.distribution,Z9(t)),r=e.steps||e.minsteps||25,o=e.steps||e.maxsteps||200;let s=e.method||"pdf";s!=="pdf"&&s!=="cdf"&&R("Invalid density method: "+s),!e.extent&&!i.data&&R("Missing density extent parameter."),s=i[s];const a=e.as||["value","density"],u=e.extent||ir(i.data()),l=mg(s,u,r,o).map(c=>{const f={};return f[a[0]]=c[0],f[a[1]]=c[1],Me(f)});this.value&&(n.rem=this.value),this.value=n.add=n.source=l}return n}});function Z9(e){return()=>e.materialize(e.SOURCE).source}function JM(e,t){return e?e.map((n,i)=>t[i]||Je(n)):null}function Ub(e,t,n){const i=[],r=f=>f(u);let o,s,a,u,l,c;if(t==null)i.push(e.map(n));else for(o={},s=0,a=e.length;syf(ir(e,t))/30;W(jb,D,{transform(e,t){if(this.value&&!(e.modified()||t.changed()))return t;const n=t.materialize(t.SOURCE).source,i=Ub(t.source,e.groupby,Wt),r=e.smooth||!1,o=e.field,s=e.step||ez(n,o),a=_a((p,g)=>o(p)-o(g)),u=e.as||QM,l=i.length;let c=1/0,f=-1/0,d=0,h;for(;df&&(f=g),p[++h][u]=g}return this.value={start:c,stop:f,step:s},t.reflow(!0).modifies(u)}});function ZM(e){Pe.call(this,null,tz,e),this.modified(!0)}W(ZM,Pe);function tz(e){const t=e.expr;return this.value&&!e.modified("expr")?this.value:$n(n=>t(n,e),Bt(t),Je(t))}function qb(e){D.call(this,[void 0,void 0],e)}qb.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]};W(qb,D,{transform(e,t){const n=this.value,i=e.field,r=t.changed()||t.modified(i.fields)||e.modified("field");let o=n[0],s=n[1];if((r||o==null)&&(o=1/0,s=-1/0),t.visit(r?t.SOURCE:t.ADD,a=>{const u=Pt(i(a));u!=null&&(us&&(s=u))}),!Number.isFinite(o)||!Number.isFinite(s)){let a=Je(i);a&&(a=` for field "${a}"`),t.dataflow.warn(`Infinite extent${a}: [${o}, ${s}]`),o=s=void 0}this.value=[o,s]}});function Wb(e,t){Pe.call(this,e),this.parent=t,this.count=0}W(Wb,Pe,{connect(e){return this.detachSubflow=e.detachSubflow,this.targets().add(e),e.source=this},add(e){this.count+=1,this.value.add.push(e)},rem(e){this.count-=1,this.value.rem.push(e)},mod(e){this.value.mod.push(e)},init(e){this.value.init(e,e.NO_SOURCE)},evaluate(){return this.value}});function yg(e){D.call(this,{},e),this._keys=nl();const t=this._targets=[];t.active=0,t.forEach=n=>{for(let i=0,r=t.active;ii&&i.count>0);this.initTargets(n)}},initTargets(e){const t=this._targets,n=t.length,i=e?e.length:0;let r=0;for(;rthis.subflow(u,r,t);return this._group=e.group||{},this.initTargets(),t.visit(t.REM,u=>{const l=ne(u),c=o.get(l);c!==void 0&&(o.delete(l),a(c).rem(u))}),t.visit(t.ADD,u=>{const l=i(u);o.set(ne(u),l),a(l).add(u)}),s||t.modified(i.fields)?t.visit(t.MOD,u=>{const l=ne(u),c=o.get(l),f=i(u);c===f?a(f).mod(u):(o.set(l,f),a(c).rem(u),a(f).add(u))}):t.changed(t.MOD)&&t.visit(t.MOD,u=>{a(o.get(ne(u))).mod(u)}),s&&t.visit(t.REFLOW,u=>{const l=ne(u),c=o.get(l),f=i(u);c!==f&&(o.set(l,f),a(c).rem(u),a(f).add(u))}),t.clean()?n.runAfter(()=>{this.clean(),o.clean()}):o.empty>n.cleanThreshold&&n.runAfter(o.clean),t}});function e3(e){Pe.call(this,null,nz,e)}W(e3,Pe);function nz(e){return this.value&&!e.modified()?this.value:P(e.name)?Y(e.name).map(t=>Zn(t)):Zn(e.name,e.as)}function Hb(e){D.call(this,nl(),e)}Hb.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]};W(Hb,D,{transform(e,t){const n=t.dataflow,i=this.value,r=t.fork(),o=r.add,s=r.rem,a=r.mod,u=e.expr;let l=!0;t.visit(t.REM,f=>{const d=ne(f);i.has(d)?i.delete(d):s.push(f)}),t.visit(t.ADD,f=>{u(f,e)?o.push(f):i.set(ne(f),1)});function c(f){const d=ne(f),h=u(f,e),p=i.get(d);h&&p?(i.delete(d),o.push(f)):!h&&!p?(i.set(d,1),s.push(f)):l&&h&&!p&&a.push(f)}return t.visit(t.MOD,c),e.modified()&&(l=!1,t.visit(t.REFLOW,c)),i.empty>n.cleanThreshold&&n.runAfter(i.clean),r}});function Gb(e){D.call(this,[],e)}Gb.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]};W(Gb,D,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.fields,r=JM(i,e.as||[]),o=e.index||null,s=r.length;return n.rem=this.value,t.visit(t.SOURCE,a=>{const u=i.map(p=>p(a)),l=u.reduce((p,g)=>Math.max(p,g.length),0);let c=0,f,d,h;for(;c{for(let c=0,f;cs[i]=n(s,e))}});function t3(e){D.call(this,[],e)}W(t3,D,{transform(e,t){const n=t.fork(t.ALL),i=e.generator;let r=this.value,o=e.size-r.length,s,a,u;if(o>0){for(s=[];--o>=0;)s.push(u=Me(i(e))),r.push(u);n.add=n.add.length?n.materialize(n.ADD).add.concat(s):s}else a=r.slice(0,-o),n.rem=n.rem.length?n.materialize(n.REM).rem.concat(a):a,r=r.slice(-o);return n.source=this.value=r,n}});const ld={value:"value",median:kF,mean:IP,min:z1,max:qs},iz=[];function Vb(e){D.call(this,[],e)}Vb.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]};function rz(e){var t=e.method||ld.value,n;if(ld[t]==null)R("Unrecognized imputation method: "+t);else return t===ld.value?(n=e.value!==void 0?e.value:0,()=>n):ld[t]}function oz(e){const t=e.field;return n=>n?t(n):NaN}W(Vb,D,{transform(e,t){var n=t.fork(t.ALL),i=rz(e),r=oz(e),o=Je(e.field),s=Je(e.key),a=(e.groupby||[]).map(Je),u=sz(t.source,e.groupby,e.key,e.keyvals),l=[],c=this.value,f=u.domain.length,d,h,p,g,m,y,v,b,x,w;for(m=0,b=u.length;my(m),o=[],s=i?i.slice():[],a={},u={},l,c,f,d,h,p,g,m;for(s.forEach((y,v)=>a[y]=v+1),d=0,g=e.length;dn.add(o))):(r=n.value=n.value||this.init(e),t.visit(t.REM,o=>n.rem(o)),t.visit(t.ADD,o=>n.add(o))),n.changes(),t.visit(t.SOURCE,o=>{le(o,r[n.cellkey(o)].tuple)}),t.reflow(i).modifies(this._outputs)},changes(){const e=this._adds,t=this._mods;let n,i;for(n=0,i=this._alen;n{const p=_b(h,s)[a],g=e.counts?h.length:1,m=c||ir(h);mg(p,m,f,d).forEach(y=>{const v={};for(let b=0;b(this._pending=Y(r.data),o=>o.touch(this)))}:n.request(e.url,e.format).then(i=>m0(this,t,Y(i.data)))}});function uz(e){return e.modified("async")&&!(e.modified("values")||e.modified("url")||e.modified("format"))}function m0(e,t,n){n.forEach(Me);const i=t.fork(t.NO_FIELDS&t.NO_SOURCE);return i.rem=e.value,e.value=i.source=i.add=n,e._pending=null,i.rem.length&&i.clean(!0),i}function Qb(e){D.call(this,{},e)}Qb.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]};W(Qb,D,{transform(e,t){const n=e.fields,i=e.index,r=e.values,o=e.default==null?null:e.default,s=e.modified(),a=n.length;let u=s?t.SOURCE:t.ADD,l=t,c=e.as,f,d,h;return r?(d=r.length,a>1&&!c&&R('Multi-field lookup requires explicit "as" parameter.'),c&&c.length!==a*d&&R('The "as" parameter has too few output field names.'),c=c||r.map(Je),f=function(p){for(var g=0,m=0,y,v;gt.modified(p.fields)),u|=h?t.MOD:0),t.visit(u,f),l.modifies(c)}});function r3(e){Pe.call(this,null,lz,e)}W(r3,Pe);function lz(e){if(this.value&&!e.modified())return this.value;const t=e.extents,n=t.length;let i=1/0,r=-1/0,o,s;for(o=0;or&&(r=s[1]);return[i,r]}function o3(e){Pe.call(this,null,cz,e)}W(o3,Pe);function cz(e){return this.value&&!e.modified()?this.value:e.values.reduce((t,n)=>t.concat(n),[])}function s3(e){D.call(this,null,e)}W(s3,D,{transform(e,t){return this.modified(e.modified()),this.value=e,t.fork(t.NO_SOURCE|t.NO_FIELDS)}});function Zb(e){Po.call(this,e)}Zb.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:xf,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]};W(Zb,Po,{_transform:Po.prototype.transform,transform(e,t){return this._transform(fz(e,t),t)}});function fz(e,t){const n=e.field,i=e.value,r=(e.op==="count"?"__count__":e.op)||"sum",o=Bt(n).concat(Bt(i)),s=hz(n,e.limit||0,t);return t.changed()&&e.set("__pivot__",null,null,!0),{key:e.key,groupby:e.groupby,ops:s.map(()=>r),fields:s.map(a=>dz(a,n,i,o)),as:s.map(a=>a+""),modified:e.modified.bind(e)}}function dz(e,t,n,i){return $n(r=>t(r)===e?n(r):NaN,i,e+"")}function hz(e,t,n){const i={},r=[];return n.visit(n.SOURCE,o=>{const s=e(o);i[s]||(i[s]=1,r.push(s))}),r.sort(Zp),t?r.slice(0,t):r}function a3(e){yg.call(this,e)}W(a3,yg,{transform(e,t){const n=e.subflow,i=e.field,r=o=>this.subflow(ne(o),n,t,o);return(e.modified("field")||i&&t.modified(Bt(i)))&&R("PreFacet does not support field modification."),this.initTargets(),i?(t.visit(t.MOD,o=>{const s=r(o);i(o).forEach(a=>s.mod(a))}),t.visit(t.ADD,o=>{const s=r(o);i(o).forEach(a=>s.add(Me(a)))}),t.visit(t.REM,o=>{const s=r(o);i(o).forEach(a=>s.rem(a))})):(t.visit(t.MOD,o=>r(o).mod(o)),t.visit(t.ADD,o=>r(o).add(o)),t.visit(t.REM,o=>r(o).rem(o))),t.clean()&&t.runAfter(()=>this.clean()),t}});function ex(e){D.call(this,null,e)}ex.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]};W(ex,D,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.fields,r=JM(e.fields,e.as||[]),o=i?(a,u)=>pz(a,u,i,r):lg;let s;return this.value?s=this.value:(t=t.addAll(),s=this.value={}),t.visit(t.REM,a=>{const u=ne(a);n.rem.push(s[u]),s[u]=null}),t.visit(t.ADD,a=>{const u=o(a,Me({}));s[ne(a)]=u,n.add.push(u)}),t.visit(t.MOD,a=>{n.mod.push(o(a,s[ne(a)]))}),n}});function pz(e,t,n,i){for(let r=0,o=n.length;r{const d=vb(f,l);for(let h=0;h{const o=ne(r);n.rem.push(i[o]),i[o]=null}),t.visit(t.ADD,r=>{const o=gb(r);i[ne(r)]=o,n.add.push(o)}),t.visit(t.MOD,r=>{const o=i[ne(r)];for(const s in r)o[s]=r[s],n.modifies(s);n.mod.push(o)})),n}});function nx(e){D.call(this,[],e),this.count=0}nx.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]};W(nx,D,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.modified("size"),r=e.size,o=this.value.reduce((c,f)=>(c[ne(f)]=1,c),{});let s=this.value,a=this.count,u=0;function l(c){let f,d;s.length=u&&(f=s[d],o[ne(f)]&&n.rem.push(f),s[d]=c)),++a}if(t.rem.length&&(t.visit(t.REM,c=>{const f=ne(c);o[f]&&(o[f]=-1,n.rem.push(c)),--a}),s=s.filter(c=>o[ne(c)]!==-1)),(t.rem.length||i)&&s.length{o[ne(c)]||l(c)}),u=-1),i&&s.length>r){const c=s.length-r;for(let f=0;f{o[ne(c)]&&n.mod.push(c)}),t.add.length&&t.visit(t.ADD,l),(t.add.length||u<0)&&(n.add=s.filter(c=>!o[ne(c)])),this.count=a,this.value=n.source=s,n}});function ix(e){D.call(this,null,e)}ix.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]};W(ix,D,{transform(e,t){if(this.value&&!e.modified())return;const n=t.materialize().fork(t.MOD),i=e.as||"data";return n.rem=this.value?t.rem.concat(this.value):t.rem,this.value=Dn(e.start,e.stop,e.step||1).map(r=>{const o={};return o[i]=r,Me(o)}),n.add=t.add.concat(this.value),n}});function c3(e){D.call(this,null,e),this.modified(!0)}W(c3,D,{transform(e,t){return this.value=t.source,t.changed()?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}});function rx(e){D.call(this,null,e)}const f3=["unit0","unit1"];rx.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:sb,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:f3}]};W(rx,D,{transform(e,t){const n=e.field,i=e.interval!==!1,r=e.timezone==="utc",o=this._floor(e,t),s=(r?al:sl)(o.unit).offset,a=e.as||f3,u=a[0],l=a[1],c=o.step;let f=o.start||1/0,d=o.stop||-1/0,h=t.ADD;return(e.modified()||t.changed(t.REM)||t.modified(Bt(n)))&&(t=t.reflow(!0),h=t.SOURCE,f=1/0,d=-1/0),t.visit(h,p=>{const g=n(p);let m,y;g==null?(p[u]=null,i&&(p[l]=null)):(p[u]=m=y=o(g),i&&(p[l]=y=s(m,c)),md&&(d=y))}),o.start=f,o.stop=d,t.modifies(i?a:u)},_floor(e,t){const n=e.timezone==="utc",{units:i,step:r}=e.units?{units:e.units,step:e.step||1}:tM({extent:e.extent||ir(t.materialize(t.SOURCE).source,e.field),maxbins:e.maxbins}),o=ab(i),s=this.value||{},a=(n?GF:HF)(o,r);return a.unit=xe(o),a.units=o,a.step=r,a.start=s.start,a.stop=s.stop,this.value=a}});function d3(e){D.call(this,nl(),e)}W(d3,D,{transform(e,t){const n=t.dataflow,i=e.field,r=this.value,o=a=>r.set(i(a),a);let s=!0;return e.modified("field")||t.modified(i.fields)?(r.clear(),t.visit(t.SOURCE,o)):t.changed()?(t.visit(t.REM,a=>r.delete(i(a))),t.visit(t.ADD,o)):s=!1,this.modified(s),r.empty>n.cleanThreshold&&n.runAfter(r.clean),t.fork()}});function h3(e){D.call(this,null,e)}W(h3,D,{transform(e,t){(!this.value||e.modified("field")||e.modified("sort")||t.changed()||e.sort&&t.modified(e.sort.fields))&&(this.value=(e.sort?t.source.slice().sort(_a(e.sort)):t.source).map(e.field))}});function mz(e,t,n,i){const r=Bc[e](t,n);return{init:r.init||bo,update:function(o,s){s[i]=r.next(o)}}}const Bc={row_number:function(){return{next:e=>e.index+1}},rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,i=t.data;return n&&t.compare(i[n-1],i[n])?e=n+1:e}}},dense_rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,i=t.data;return n&&t.compare(i[n-1],i[n])?++e:e}}},percent_rank:function(){const e=Bc.rank(),t=e.next;return{init:e.init,next:n=>(t(n)-1)/(n.data.length-1)}},cume_dist:function(){let e;return{init:()=>e=0,next:t=>{const n=t.data,i=t.compare;let r=t.index;if(e0||R("ntile num must be greater than zero.");const n=Bc.cume_dist(),i=n.next;return{init:n.init,next:r=>Math.ceil(t*i(r))}},lag:function(e,t){return t=+t||1,{next:n=>{const i=n.index-t;return i>=0?e(n.data[i]):null}}},lead:function(e,t){return t=+t||1,{next:n=>{const i=n.index+t,r=n.data;return ie(t.data[t.i0])}},last_value:function(e){return{next:t=>e(t.data[t.i1-1])}},nth_value:function(e,t){return t=+t,t>0||R("nth_value nth must be greater than zero."),{next:n=>{const i=n.i0+(t-1);return it=null,next:n=>{const i=e(n.data[n.index]);return i!=null?t=i:t}}},next_value:function(e){let t,n;return{init:()=>(t=null,n=-1),next:i=>{const r=i.data;return i.index<=n?t:(n=yz(e,r,i.index))<0?(n=r.length,t=null):t=e(r[n])}}}};function yz(e,t,n){for(let i=t.length;nu[g]=1)}h(e.sort),t.forEach((p,g)=>{const m=n[g],y=i[g],v=r[g]||null,b=Je(m),x=qM(p,b,o[g]);if(h(m),s.push(x),re(Bc,p))a.push(mz(p,m,y,x));else{if(m==null&&p!=="count"&&R("Null aggregate field specified."),p==="count"){c.push(x);return}d=!1;let w=l[b];w||(w=l[b]=[],w.field=m,f.push(w)),w.push(WM(p,v,x))}}),(c.length||f.length)&&(this.cell=bz(f,c,d)),this.inputs=Object.keys(u)}const g3=p3.prototype;g3.init=function(){this.windows.forEach(e=>e.init()),this.cell&&this.cell.init()};g3.update=function(e,t){const n=this.cell,i=this.windows,r=e.data,o=i&&i.length;let s;if(n){for(s=e.p0;sGM(u,u.field));const i={num:0,agg:null,store:!1,count:t};if(!n)for(var r=e.length,o=i.agg=Array(r),s=0;sthis.group(r(a));let s=this.state;(!s||n)&&(s=this.state=new p3(e)),n||t.modified(s.inputs)?(this.value={},t.visit(t.SOURCE,a=>o(a).add(a))):(t.visit(t.REM,a=>o(a).remove(a)),t.visit(t.ADD,a=>o(a).add(a)));for(let a=0,u=this._mlen;a0&&!r(o[n],o[n-1])&&(e.i0=t.left(o,o[n])),i1?0:e<-1?$u:Math.acos(e)}function Z_(e){return e>=1?Ah:e<=-1?-Ah:Math.asin(e)}const J1=Math.PI,Q1=2*J1,Fs=1e-6,Az=Q1-Fs;function y3(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return y3;const n=10**t;return function(i){this._+=i[0];for(let r=1,o=i.length;rFs)if(!(Math.abs(f*u-l*c)>Fs)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let h=i-s,p=r-a,g=u*u+l*l,m=h*h+p*p,y=Math.sqrt(g),v=Math.sqrt(d),b=o*Math.tan((J1-Math.acos((g+d-m)/(2*y*v)))/2),x=b/v,w=b/y;Math.abs(x-1)>Fs&&this._append`L${t+x*c},${n+x*f}`,this._append`A${o},${o},0,0,${+(f*h>c*p)},${this._x1=t+w*u},${this._y1=n+w*l}`}}arc(t,n,i,r,o,s){if(t=+t,n=+n,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(r),u=i*Math.sin(r),l=t+a,c=n+u,f=1^s,d=s?r-o:o-r;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Fs||Math.abs(this._y1-c)>Fs)&&this._append`L${l},${c}`,i&&(d<0&&(d=d%Q1+Q1),d>Az?this._append`A${i},${i},0,1,${f},${t-a},${n-u}A${i},${i},0,1,${f},${this._x1=l},${this._y1=c}`:d>Fs&&this._append`A${i},${i},0,${+(d>=J1)},${f},${this._x1=t+i*Math.cos(o)},${this._y1=n+i*Math.sin(o)}`)}rect(t,n,i,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}};function vg(){return new sx}vg.prototype=sx.prototype;function bg(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);t=i}return e},()=>new sx(t)}function Cz(e){return e.innerRadius}function Fz(e){return e.outerRadius}function Mz(e){return e.startAngle}function Tz(e){return e.endAngle}function Dz(e){return e&&e.padAngle}function Nz(e,t,n,i,r,o,s,a){var u=n-e,l=i-t,c=s-r,f=a-o,d=f*u-c*l;if(!(d*dM*M+C*C&&(S=F,$=k),{cx:S,cy:$,x01:-c,y01:-f,x11:S*(r/w-1),y11:$*(r/w-1)}}function Oz(){var e=Cz,t=Fz,n=Te(0),i=null,r=Mz,o=Tz,s=Dz,a=null,u=bg(l);function l(){var c,f,d=+e.apply(this,arguments),h=+t.apply(this,arguments),p=r.apply(this,arguments)-Ah,g=o.apply(this,arguments)-Ah,m=Q_(g-p),y=g>p;if(a||(a=c=u()),hNt))a.moveTo(0,0);else if(m>m3-Nt)a.moveTo(h*ys(p),h*zi(p)),a.arc(0,0,h,p,g,!y),d>Nt&&(a.moveTo(d*ys(g),d*zi(g)),a.arc(0,0,d,g,p,y));else{var v=p,b=g,x=p,w=g,_=m,E=m,S=s.apply(this,arguments)/2,$=S>Nt&&(i?+i.apply(this,arguments):Ps(d*d+h*h)),F=y0(Q_(h-d)/2,+n.apply(this,arguments)),k=F,N=F,A,M;if($>Nt){var C=Z_($/d*zi(S)),T=Z_($/h*zi(S));(_-=C*2)>Nt?(C*=y?1:-1,x+=C,w-=C):(_=0,x=w=(p+g)/2),(E-=T*2)>Nt?(T*=y?1:-1,v+=T,b-=T):(E=0,v=b=(p+g)/2)}var L=h*ys(v),I=h*zi(v),z=d*ys(w),Z=d*zi(w);if(F>Nt){var ee=h*ys(b),fe=h*zi(b),_e=d*ys(x),me=d*zi(x),Ie;if(m<$u)if(Ie=Nz(L,I,_e,me,ee,fe,z,Z)){var Sr=L-Ie[0],Ia=I-Ie[1],gs=ee-Ie[0],K=fe-Ie[1],de=1/zi($z((Sr*gs+Ia*K)/(Ps(Sr*Sr+Ia*Ia)*Ps(gs*gs+K*K)))/2),pe=Ps(Ie[0]*Ie[0]+Ie[1]*Ie[1]);k=y0(F,(d-pe)/(de-1)),N=y0(F,(h-pe)/(de+1))}else k=N=0}E>Nt?N>Nt?(A=cd(_e,me,L,I,h,N,y),M=cd(ee,fe,z,Z,h,N,y),a.moveTo(A.cx+A.x01,A.cy+A.y01),NNt)||!(_>Nt)?a.lineTo(z,Z):k>Nt?(A=cd(z,Z,ee,fe,d,-k,y),M=cd(L,I,_e,me,d,-k,y),a.lineTo(A.cx+A.x01,A.cy+A.y01),k=h;--p)a.point(b[p],x[p]);a.lineEnd(),a.areaEnd()}y&&(b[d]=+e(m,d,f),x[d]=+t(m,d,f),a.point(i?+i(m,d,f):b[d],n?+n(m,d,f):x[d]))}if(v)return a=null,v+""||null}function c(){return E3().defined(r).curve(s).context(o)}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:Te(+f),i=null,l):e},l.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Te(+f),l):e},l.x1=function(f){return arguments.length?(i=f==null?null:typeof f=="function"?f:Te(+f),l):i},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:Te(+f),n=null,l):t},l.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Te(+f),l):t},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Te(+f),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(i).y(t)},l.defined=function(f){return arguments.length?(r=typeof f=="function"?f:Te(!!f),l):r},l.curve=function(f){return arguments.length?(s=f,o!=null&&(a=s(o)),l):s},l.context=function(f){return arguments.length?(f==null?o=a=null:a=s(o=f),l):o},l}const Rz={draw(e,t){const n=Ps(t/$u);e.moveTo(n,0),e.arc(0,0,n,0,m3)}};function Lz(e,t){let n=null,i=bg(r);e=typeof e=="function"?e:Te(e||Rz),t=typeof t=="function"?t:Te(t===void 0?64:+t);function r(){let o;if(n||(n=o=i()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return r.type=function(o){return arguments.length?(e=typeof o=="function"?o:Te(o),r):e},r.size=function(o){return arguments.length?(t=typeof o=="function"?o:Te(+o),r):t},r.context=function(o){return arguments.length?(n=o??null,r):n},r}function Io(){}function kh(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function xg(e){this._context=e}xg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:kh(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:kh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Pz(e){return new xg(e)}function S3(e){this._context=e}S3.prototype={areaStart:Io,areaEnd:Io,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:kh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Iz(e){return new S3(e)}function $3(e){this._context=e}$3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:kh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zz(e){return new $3(e)}function A3(e,t){this._basis=new xg(e),this._beta=t}A3.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var i=e[0],r=t[0],o=e[n]-i,s=t[n]-r,a=-1,u;++a<=n;)u=a/n,this._basis.point(this._beta*e[a]+(1-this._beta)*(i+u*o),this._beta*t[a]+(1-this._beta)*(r+u*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Bz=function e(t){function n(i){return t===1?new xg(i):new A3(i,t)}return n.beta=function(i){return e(+i)},n}(.85);function Ch(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function ux(e,t){this._context=e,this._k=(1-t)/6}ux.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ch(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ch(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Uz=function e(t){function n(i){return new ux(i,t)}return n.tension=function(i){return e(+i)},n}(0);function lx(e,t){this._context=e,this._k=(1-t)/6}lx.prototype={areaStart:Io,areaEnd:Io,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ch(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const jz=function e(t){function n(i){return new lx(i,t)}return n.tension=function(i){return e(+i)},n}(0);function cx(e,t){this._context=e,this._k=(1-t)/6}cx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ch(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const qz=function e(t){function n(i){return new cx(i,t)}return n.tension=function(i){return e(+i)},n}(0);function fx(e,t,n){var i=e._x1,r=e._y1,o=e._x2,s=e._y2;if(e._l01_a>Nt){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,r=(r*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>Nt){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*l+e._x1*e._l23_2a-t*e._l12_2a)/c,s=(s*l+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(i,r,o,s,e._x2,e._y2)}function k3(e,t){this._context=e,this._alpha=t}k3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:fx(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Wz=function e(t){function n(i){return t?new k3(i,t):new ux(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function C3(e,t){this._context=e,this._alpha=t}C3.prototype={areaStart:Io,areaEnd:Io,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:fx(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Hz=function e(t){function n(i){return t?new C3(i,t):new lx(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function F3(e,t){this._context=e,this._alpha=t}F3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:fx(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Gz=function e(t){function n(i){return t?new F3(i,t):new cx(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function M3(e){this._context=e}M3.prototype={areaStart:Io,areaEnd:Io,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Yz(e){return new M3(e)}function eS(e){return e<0?-1:1}function tS(e,t,n){var i=e._x1-e._x0,r=t-e._x1,o=(e._y1-e._y0)/(i||r<0&&-0),s=(n-e._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(eS(o)+eS(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function nS(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function v0(e,t,n){var i=e._x0,r=e._y0,o=e._x1,s=e._y1,a=(o-i)/3;e._context.bezierCurveTo(i+a,r+a*t,o-a,s-a*n,o,s)}function Fh(e){this._context=e}Fh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:v0(this,this._t0,nS(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,v0(this,nS(this,n=tS(this,e,t)),n);break;default:v0(this,this._t0,n=tS(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function T3(e){this._context=new D3(e)}(T3.prototype=Object.create(Fh.prototype)).point=function(e,t){Fh.prototype.point.call(this,t,e)};function D3(e){this._context=e}D3.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,i,r,o){this._context.bezierCurveTo(t,e,i,n,o,r)}};function Xz(e){return new Fh(e)}function Vz(e){return new T3(e)}function N3(e){this._context=e}N3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var i=iS(e),r=iS(t),o=0,s=1;s=0;--t)r[t]=(s[t]-r[t+1])/o[t];for(o[n-1]=(e[n]+r[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Jz(e){return new wg(e,.5)}function Qz(e){return new wg(e,0)}function Zz(e){return new wg(e,1)}function Do(e,t){if(typeof document<"u"&&document.createElement){const n=document.createElement("canvas");if(n&&n.getContext)return n.width=e,n.height=t,n}return null}const e7=()=>typeof Image<"u"?Image:null;function hr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ts(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Z1=Symbol("implicit");function dx(){var e=new x_,t=[],n=[],i=Z1;function r(o){let s=e.get(o);if(s===void 0){if(i!==Z1)return i;e.set(o,s=t.push(o)-1)}return n[s%n.length]}return r.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new x_;for(const s of o)e.has(s)||e.set(s,t.push(s)-1);return r},r.range=function(o){return arguments.length?(n=Array.from(o),r):n.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return dx(t,n).unknown(i)},hr.apply(r,arguments),r}function ll(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function wf(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function ns(){}var Zs=.7,Au=1/Zs,lu="\\s*([+-]?\\d+)\\s*",Uc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ji="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",t7=/^#([0-9a-f]{3,8})$/,n7=new RegExp(`^rgb\\(${lu},${lu},${lu}\\)$`),i7=new RegExp(`^rgb\\(${Ji},${Ji},${Ji}\\)$`),r7=new RegExp(`^rgba\\(${lu},${lu},${lu},${Uc}\\)$`),o7=new RegExp(`^rgba\\(${Ji},${Ji},${Ji},${Uc}\\)$`),s7=new RegExp(`^hsl\\(${Uc},${Ji},${Ji}\\)$`),a7=new RegExp(`^hsla\\(${Uc},${Ji},${Ji},${Uc}\\)$`),rS={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ll(ns,jc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:oS,formatHex:oS,formatHex8:u7,formatHsl:l7,formatRgb:sS,toString:sS});function oS(){return this.rgb().formatHex()}function u7(){return this.rgb().formatHex8()}function l7(){return O3(this).formatHsl()}function sS(){return this.rgb().formatRgb()}function jc(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=t7.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?aS(t):n===3?new ht(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?fd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?fd(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=n7.exec(e))?new ht(t[1],t[2],t[3],1):(t=i7.exec(e))?new ht(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=r7.exec(e))?fd(t[1],t[2],t[3],t[4]):(t=o7.exec(e))?fd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=s7.exec(e))?cS(t[1],t[2]/100,t[3]/100,1):(t=a7.exec(e))?cS(t[1],t[2]/100,t[3]/100,t[4]):rS.hasOwnProperty(e)?aS(rS[e]):e==="transparent"?new ht(NaN,NaN,NaN,0):null}function aS(e){return new ht(e>>16&255,e>>8&255,e&255,1)}function fd(e,t,n,i){return i<=0&&(e=t=n=NaN),new ht(e,t,n,i)}function hx(e){return e instanceof ns||(e=jc(e)),e?(e=e.rgb(),new ht(e.r,e.g,e.b,e.opacity)):new ht}function zo(e,t,n,i){return arguments.length===1?hx(e):new ht(e,t,n,i??1)}function ht(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}ll(ht,zo,wf(ns,{brighter(e){return e=e==null?Au:Math.pow(Au,e),new ht(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Zs:Math.pow(Zs,e),new ht(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ht(Ws(this.r),Ws(this.g),Ws(this.b),Mh(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:uS,formatHex:uS,formatHex8:c7,formatRgb:lS,toString:lS}));function uS(){return`#${Is(this.r)}${Is(this.g)}${Is(this.b)}`}function c7(){return`#${Is(this.r)}${Is(this.g)}${Is(this.b)}${Is((isNaN(this.opacity)?1:this.opacity)*255)}`}function lS(){const e=Mh(this.opacity);return`${e===1?"rgb(":"rgba("}${Ws(this.r)}, ${Ws(this.g)}, ${Ws(this.b)}${e===1?")":`, ${e})`}`}function Mh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ws(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Is(e){return e=Ws(e),(e<16?"0":"")+e.toString(16)}function cS(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new yi(e,t,n,i)}function O3(e){if(e instanceof yi)return new yi(e.h,e.s,e.l,e.opacity);if(e instanceof ns||(e=jc(e)),!e)return new yi;if(e instanceof yi)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),o=Math.max(t,n,i),s=NaN,a=o-r,u=(o+r)/2;return a?(t===o?s=(n-i)/a+(n0&&u<1?0:s,new yi(s,a,u,e.opacity)}function Th(e,t,n,i){return arguments.length===1?O3(e):new yi(e,t,n,i??1)}function yi(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}ll(yi,Th,wf(ns,{brighter(e){return e=e==null?Au:Math.pow(Au,e),new yi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Zs:Math.pow(Zs,e),new yi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new ht(b0(e>=240?e-240:e+120,r,i),b0(e,r,i),b0(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new yi(fS(this.h),dd(this.s),dd(this.l),Mh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Mh(this.opacity);return`${e===1?"hsl(":"hsla("}${fS(this.h)}, ${dd(this.s)*100}%, ${dd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function fS(e){return e=(e||0)%360,e<0?e+360:e}function dd(e){return Math.max(0,Math.min(1,e||0))}function b0(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const R3=Math.PI/180,L3=180/Math.PI,Dh=18,P3=.96422,I3=1,z3=.82521,B3=4/29,cu=6/29,U3=3*cu*cu,f7=cu*cu*cu;function j3(e){if(e instanceof Qi)return new Qi(e.l,e.a,e.b,e.opacity);if(e instanceof zr)return q3(e);e instanceof ht||(e=hx(e));var t=_0(e.r),n=_0(e.g),i=_0(e.b),r=x0((.2225045*t+.7168786*n+.0606169*i)/I3),o,s;return t===n&&n===i?o=s=r:(o=x0((.4360747*t+.3850649*n+.1430804*i)/P3),s=x0((.0139322*t+.0971045*n+.7141733*i)/z3)),new Qi(116*r-16,500*(o-r),200*(r-s),e.opacity)}function Nh(e,t,n,i){return arguments.length===1?j3(e):new Qi(e,t,n,i??1)}function Qi(e,t,n,i){this.l=+e,this.a=+t,this.b=+n,this.opacity=+i}ll(Qi,Nh,wf(ns,{brighter(e){return new Qi(this.l+Dh*(e??1),this.a,this.b,this.opacity)},darker(e){return new Qi(this.l-Dh*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=P3*w0(t),e=I3*w0(e),n=z3*w0(n),new ht(E0(3.1338561*t-1.6168667*e-.4906146*n),E0(-.9787684*t+1.9161415*e+.033454*n),E0(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function x0(e){return e>f7?Math.pow(e,1/3):e/U3+B3}function w0(e){return e>cu?e*e*e:U3*(e-B3)}function E0(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function _0(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function d7(e){if(e instanceof zr)return new zr(e.h,e.c,e.l,e.opacity);if(e instanceof Qi||(e=j3(e)),e.a===0&&e.b===0)return new zr(NaN,0=1?(n=1,t-1):Math.floor(n*t),r=e[i],o=e[i+1],s=i>0?e[i-1]:2*r-o,a=i()=>e;function X3(e,t){return function(n){return e+n*t}}function p7(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function Sg(e,t){var n=t-e;return n?X3(e,n>180||n<-180?n-360*Math.round(n/360):n):_g(isNaN(e)?t:e)}function g7(e){return(e=+e)==1?pt:function(t,n){return n-t?p7(t,n,e):_g(isNaN(t)?n:t)}}function pt(e,t){var n=t-e;return n?X3(e,n):_g(isNaN(e)?t:e)}const ty=function e(t){var n=g7(t);function i(r,o){var s=n((r=zo(r)).r,(o=zo(o)).r),a=n(r.g,o.g),u=n(r.b,o.b),l=pt(r.opacity,o.opacity);return function(c){return r.r=s(c),r.g=a(c),r.b=u(c),r.opacity=l(c),r+""}}return i.gamma=e,i}(1);function V3(e){return function(t){var n=t.length,i=new Array(n),r=new Array(n),o=new Array(n),s,a;for(s=0;sn&&(o=t.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,u.push({i:s,x:gi(i,r)})),n=S0.lastIndex;return n180?c+=360:c-l>180&&(l+=360),d.push({i:f.push(r(f)+"rotate(",null,i)-2,x:gi(l,c)})):c&&f.push(r(f)+"rotate("+c+i)}function a(l,c,f,d){l!==c?d.push({i:f.push(r(f)+"skewX(",null,i)-2,x:gi(l,c)}):c&&f.push(r(f)+"skewX("+c+i)}function u(l,c,f,d,h,p){if(l!==f||c!==d){var g=h.push(r(h)+"scale(",null,",",null,")");p.push({i:g-4,x:gi(l,f)},{i:g-2,x:gi(c,d)})}else(f!==1||d!==1)&&h.push(r(h)+"scale("+f+","+d+")")}return function(l,c){var f=[],d=[];return l=e(l),c=e(c),o(l.translateX,l.translateY,c.translateX,c.translateY,f,d),s(l.rotate,c.rotate,f,d),a(l.skewX,c.skewX,f,d),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,d),l=c=null,function(h){for(var p=-1,g=d.length,m;++pt&&(n=e,e=t,t=n),function(i){return Math.max(e,Math.min(t,i))}}function j7(e,t,n){var i=e[0],r=e[1],o=t[0],s=t[1];return r2?q7:j7,u=l=null,f}function f(d){return d==null||isNaN(d=+d)?o:(u||(u=a(e.map(i),t,n)))(i(s(d)))}return f.invert=function(d){return s(r((l||(l=a(t,e.map(i),gi)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,ry),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),n=Ef,c()},f.clamp=function(d){return arguments.length?(s=d?!0:mn,c()):s!==mn},f.interpolate=function(d){return arguments.length?(n=d,c()):n},f.unknown=function(d){return arguments.length?(o=d,f):o},function(d,h){return i=d,r=h,c()}}function sT(){return $g()(mn,mn)}function aT(e,t,n,i){var r=Lo(e,t,n),o;switch(i=Qs(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(o=NF(r,s))&&(i.precision=o),rb(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(o=OF(r,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=o-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(o=DF(r))&&(i.precision=o-(i.type==="%")*2);break}}return eg(i)}function $a(e){var t=e.domain;return e.ticks=function(n){var i=t();return P1(i[0],i[i.length-1],n??10)},e.tickFormat=function(n,i){var r=t();return aT(r[0],r[r.length-1],n??10,i)},e.nice=function(n){n==null&&(n=10);var i=t(),r=0,o=i.length-1,s=i[r],a=i[o],u,l,c=10;for(a0;){if(l=I1(s,a,n),l===u)return i[r]=s,i[o]=a,t(i);if(l>0)s=Math.floor(s/l)*l,a=Math.ceil(a/l)*l;else if(l<0)s=Math.ceil(s*l)/l,a=Math.floor(a*l)/l;else break;u=l}return e},e}function uT(){var e=sT();return e.copy=function(){return _f(e,uT())},hr.apply(e,arguments),$a(e)}function lT(e){var t;function n(i){return i==null||isNaN(i=+i)?t:i}return n.invert=n,n.domain=n.range=function(i){return arguments.length?(e=Array.from(i,ry),n):e.slice()},n.unknown=function(i){return arguments.length?(t=i,n):t},n.copy=function(){return lT(e).unknown(t)},e=arguments.length?Array.from(e,ry):[0,1],$a(n)}function cT(e,t){e=e.slice();var n=0,i=e.length-1,r=e[n],o=e[i],s;return oMath.pow(e,t)}function X7(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function xS(e){return(t,n)=>-e(-t,n)}function vx(e){const t=e(vS,bS),n=t.domain;let i=10,r,o;function s(){return r=X7(i),o=Y7(i),n()[0]<0?(r=xS(r),o=xS(o),e(W7,H7)):e(vS,bS),t}return t.base=function(a){return arguments.length?(i=+a,s()):i},t.domain=function(a){return arguments.length?(n(a),s()):n()},t.ticks=a=>{const u=n();let l=u[0],c=u[u.length-1];const f=c0){for(;d<=h;++d)for(p=1;pc)break;y.push(g)}}else for(;d<=h;++d)for(p=i-1;p>=1;--p)if(g=d>0?p/o(-d):p*o(d),!(gc)break;y.push(g)}y.length*2{if(a==null&&(a=10),u==null&&(u=i===10?"s":","),typeof u!="function"&&(!(i%1)&&(u=Qs(u)).precision==null&&(u.trim=!0),u=eg(u)),a===1/0)return u;const l=Math.max(1,i*a/t.ticks().length);return c=>{let f=c/o(Math.round(r(c)));return f*in(cT(n(),{floor:a=>o(Math.floor(r(a))),ceil:a=>o(Math.ceil(r(a)))})),t}function fT(){const e=vx($g()).domain([1,10]);return e.copy=()=>_f(e,fT()).base(e.base()),hr.apply(e,arguments),e}function wS(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ES(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function bx(e){var t=1,n=e(wS(t),ES(t));return n.constant=function(i){return arguments.length?e(wS(t=+i),ES(t)):t},$a(n)}function dT(){var e=bx($g());return e.copy=function(){return _f(e,dT()).constant(e.constant())},hr.apply(e,arguments)}function _S(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function V7(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function K7(e){return e<0?-e*e:e*e}function xx(e){var t=e(mn,mn),n=1;function i(){return n===1?e(mn,mn):n===.5?e(V7,K7):e(_S(n),_S(1/n))}return t.exponent=function(r){return arguments.length?(n=+r,i()):n},$a(t)}function wx(){var e=xx($g());return e.copy=function(){return _f(e,wx()).exponent(e.exponent())},hr.apply(e,arguments),e}function J7(){return wx.apply(null,arguments).exponent(.5)}function hT(){var e=[],t=[],n=[],i;function r(){var s=0,a=Math.max(1,t.length);for(n=new Array(a-1);++s0?n[a-1]:e[0],a=n?[i[n-1],t]:[i[l-1],i[l]]},s.unknown=function(u){return arguments.length&&(o=u),s},s.thresholds=function(){return i.slice()},s.copy=function(){return pT().domain([e,t]).range(r).unknown(o)},hr.apply($a(s),arguments)}function gT(){var e=[.5],t=[0,1],n,i=1;function r(o){return o!=null&&o<=o?t[Ro(e,o,0,i)]:n}return r.domain=function(o){return arguments.length?(e=Array.from(o),i=Math.min(e.length,t.length-1),r):e.slice()},r.range=function(o){return arguments.length?(t=Array.from(o),i=Math.min(e.length,t.length-1),r):t.slice()},r.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},r.unknown=function(o){return arguments.length?(n=o,r):n},r.copy=function(){return gT().domain(e).range(t).unknown(n)},hr.apply(r,arguments)}function Q7(e){return new Date(e)}function Z7(e){return e instanceof Date?+e:+new Date(+e)}function Ex(e,t,n,i,r,o,s,a,u,l){var c=sT(),f=c.invert,d=c.domain,h=l(".%L"),p=l(":%S"),g=l("%I:%M"),m=l("%I %p"),y=l("%a %d"),v=l("%b %d"),b=l("%B"),x=l("%Y");function w(_){return(u(_)<_?h:a(_)<_?p:s(_)<_?g:o(_)<_?m:i(_)<_?r(_)<_?y:v:n(_)<_?b:x)(_)}return c.invert=function(_){return new Date(f(_))},c.domain=function(_){return arguments.length?d(Array.from(_,Z7)):d().map(Q7)},c.ticks=function(_){var E=d();return e(E[0],E[E.length-1],_??10)},c.tickFormat=function(_,E){return E==null?w:l(E)},c.nice=function(_){var E=d();return(!_||typeof _.range!="function")&&(_=t(E[0],E[E.length-1],_??10)),_?d(cT(E,_)):c},c.copy=function(){return _f(c,Ex(e,t,n,i,r,o,s,a,u,l))},c}function eB(){return hr.apply(Ex(s8,a8,rr,Lc,rl,qr,ig,tg,Ir,lb).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function tB(){return hr.apply(Ex(r8,o8,or,Pc,ol,Mo,rg,ng,Ir,cb).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ag(){var e=0,t=1,n,i,r,o,s=mn,a=!1,u;function l(f){return f==null||isNaN(f=+f)?u:s(r===0?.5:(f=(o(f)-n)*r,a?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([e,t]=f,n=o(e=+e),i=o(t=+t),r=n===i?0:1/(i-n),l):[e,t]},l.clamp=function(f){return arguments.length?(a=!!f,l):a},l.interpolator=function(f){return arguments.length?(s=f,l):s};function c(f){return function(d){var h,p;return arguments.length?([h,p]=d,s=f(h,p),l):[s(0),s(1)]}}return l.range=c(is),l.rangeRound=c(Ef),l.unknown=function(f){return arguments.length?(u=f,l):u},function(f){return o=f,n=f(e),i=f(t),r=n===i?0:1/(i-n),l}}function rs(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function _x(){var e=$a(Ag()(mn));return e.copy=function(){return rs(e,_x())},ts.apply(e,arguments)}function mT(){var e=vx(Ag()).domain([1,10]);return e.copy=function(){return rs(e,mT()).base(e.base())},ts.apply(e,arguments)}function yT(){var e=bx(Ag());return e.copy=function(){return rs(e,yT()).constant(e.constant())},ts.apply(e,arguments)}function Sx(){var e=xx(Ag());return e.copy=function(){return rs(e,Sx()).exponent(e.exponent())},ts.apply(e,arguments)}function nB(){return Sx.apply(null,arguments).exponent(.5)}function kg(){var e=0,t=.5,n=1,i=1,r,o,s,a,u,l=mn,c,f=!1,d;function h(g){return isNaN(g=+g)?d:(g=.5+((g=+c(g))-o)*(i*g0?i:1:0}const rB="identity",ku="linear",Kr="log",Sf="pow",$f="sqrt",Cg="symlog",ea="time",ta="utc",Zi="sequential",cl="diverging",Cu="quantile",Fg="quantize",Mg="threshold",kx="ordinal",sy="point",wT="band",Cx="bin-ordinal",lt="continuous",Af="discrete",kf="discretizing",si="interpolating",Fx="temporal";function oB(e){return function(t){let n=t[0],i=t[1],r;return i=i&&n[u]<=r&&(o<0&&(o=u),s=u);if(!(o<0))return i=e.invertExtent(n[o]),r=e.invertExtent(n[s]),[i[0]===void 0?i[1]:i[0],r[1]===void 0?r[0]:r[1]]}}function Mx(){const e=dx().unknown(void 0),t=e.domain,n=e.range;let i=[0,1],r,o,s=!1,a=0,u=0,l=.5;delete e.unknown;function c(){const f=t().length,d=i[1]g+r*y);return n(d?m.reverse():m)}return e.domain=function(f){return arguments.length?(t(f),c()):t()},e.range=function(f){return arguments.length?(i=[+f[0],+f[1]],c()):i.slice()},e.rangeRound=function(f){return i=[+f[0],+f[1]],s=!0,c()},e.bandwidth=function(){return o},e.step=function(){return r},e.round=function(f){return arguments.length?(s=!!f,c()):s},e.padding=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),a=u,c()):a},e.paddingInner=function(f){return arguments.length?(a=Math.max(0,Math.min(1,f)),c()):a},e.paddingOuter=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),c()):u},e.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),c()):l},e.invertRange=function(f){if(f[0]==null||f[1]==null)return;const d=i[1]i[1-d])))return y=Math.max(0,Ro(h,g)-1),v=g===m?y:Ro(h,m)-1,g-h[y]>o+1e-10&&++y,d&&(b=y,y=p-v,v=p-b),y>v?void 0:t().slice(y,v+1)},e.invert=function(f){const d=e.invertRange([f,f]);return d&&d[0]},e.copy=function(){return Mx().domain(t()).range(i).round(s).paddingInner(a).paddingOuter(u).align(l)},c()}function ET(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return ET(t())},e}function aB(){return ET(Mx().paddingInner(1))}var uB=Array.prototype.map;function lB(e){return uB.call(e,Pt)}const cB=Array.prototype.slice;function _T(){let e=[],t=[];function n(i){return i==null||i!==i?void 0:t[(Ro(e,i)-1)%t.length]}return n.domain=function(i){return arguments.length?(e=lB(i),n):e.slice()},n.range=function(i){return arguments.length?(t=cB.call(i),n):t.slice()},n.tickFormat=function(i,r){return aT(e[0],xe(e),i??10,r)},n.copy=function(){return _T().domain(n.domain()).range(n.range())},n}const Rh=new Map,ST=Symbol("vega_scale");function $T(e){return e[ST]=!0,e}function fB(e){return e&&e[ST]===!0}function dB(e,t,n){const i=function(){const o=t();return o.invertRange||(o.invertRange=o.invert?oB(o):o.invertExtent?sB(o):void 0),o.type=e,$T(o)};return i.metadata=Ai(Y(n)),i}function Ae(e,t,n){return arguments.length>1?(Rh.set(e,dB(e,t,n)),this):AT(e)?Rh.get(e):void 0}Ae(rB,lT);Ae(ku,uT,lt);Ae(Kr,fT,[lt,Kr]);Ae(Sf,wx,lt);Ae($f,J7,lt);Ae(Cg,dT,lt);Ae(ea,eB,[lt,Fx]);Ae(ta,tB,[lt,Fx]);Ae(Zi,_x,[lt,si]);Ae(`${Zi}-${ku}`,_x,[lt,si]);Ae(`${Zi}-${Kr}`,mT,[lt,si,Kr]);Ae(`${Zi}-${Sf}`,Sx,[lt,si]);Ae(`${Zi}-${$f}`,nB,[lt,si]);Ae(`${Zi}-${Cg}`,yT,[lt,si]);Ae(`${cl}-${ku}`,vT,[lt,si]);Ae(`${cl}-${Kr}`,bT,[lt,si,Kr]);Ae(`${cl}-${Sf}`,$x,[lt,si]);Ae(`${cl}-${$f}`,iB,[lt,si]);Ae(`${cl}-${Cg}`,xT,[lt,si]);Ae(Cu,hT,[kf,Cu]);Ae(Fg,pT,kf);Ae(Mg,gT,kf);Ae(Cx,_T,[Af,kf]);Ae(kx,dx,Af);Ae(wT,Mx,Af);Ae(sy,aB,Af);function AT(e){return Rh.has(e)}function Aa(e,t){const n=Rh.get(e);return n&&n.metadata[t]}function Tx(e){return Aa(e,lt)}function Fu(e){return Aa(e,Af)}function ay(e){return Aa(e,kf)}function kT(e){return Aa(e,Kr)}function hB(e){return Aa(e,Fx)}function CT(e){return Aa(e,si)}function FT(e){return Aa(e,Cu)}const pB=["clamp","base","constant","exponent"];function MT(e,t){const n=t[0],i=xe(t)-n;return function(r){return e(n+r*i)}}function Tg(e,t,n){return yx(Dx(t||"rgb",n),e)}function TT(e,t){const n=new Array(t),i=t+1;for(let r=0;re[a]?s[a](e[a]()):0),s)}function Dx(e,t){const n=z7[gB(e)];return t!=null&&n&&n.gamma?n.gamma(t):n}function gB(e){return"interpolate"+e.toLowerCase().split("-").map(t=>t[0].toUpperCase()+t.slice(1)).join("")}const mB={blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},yB={category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"};function NT(e){const t=e.length/6|0,n=new Array(t);for(let i=0;iTg(NT(e)));function Nx(e,t){return e=e&&e.toLowerCase(),arguments.length>1?(SS[e]=t,this):SS[e]}const Xd="symbol",vB="discrete",bB="gradient",xB=e=>P(e)?e.map(t=>String(t)):String(e),wB=(e,t)=>e[1]-t[1],EB=(e,t)=>t[1]-e[1];function Ox(e,t,n){let i;return Ee(t)&&(e.bins&&(t=Math.max(t,e.bins.length)),n!=null&&(t=Math.min(t,Math.floor(yf(e.domain())/n||1)+1))),V(t)&&(i=t.step,t=t.interval),X(t)&&(t=e.type===ea?sl(t):e.type==ta?al(t):R("Only time and utc scales accept interval strings."),i&&(t=t.every(i))),t}function RT(e,t,n){let i=e.range(),r=i[0],o=xe(i),s=wB;if(r>o&&(i=o,o=r,r=i,s=EB),r=Math.floor(r),o=Math.ceil(o),t=t.map(a=>[a,e(a)]).filter(a=>r<=a[1]&&a[1]<=o).sort(s).map(a=>a[0]),n>0&&t.length>1){const a=[t[0],xe(t)];for(;t.length>n&&t.length>=3;)t=t.filter((u,l)=>!(l%2));t.length<3&&(t=a)}return t}function Rx(e,t){return e.bins?RT(e,e.bins):e.ticks?e.ticks(t):e.domain()}function LT(e,t,n,i,r,o){const s=t.type;let a=xB;if(s===ea||r===ea)a=e.timeFormat(i);else if(s===ta||r===ta)a=e.utcFormat(i);else if(kT(s)){const u=e.formatFloat(i);if(o||t.bins)a=u;else{const l=PT(t,n,!1);a=c=>l(c)?u(c):""}}else if(t.tickFormat){const u=t.domain();a=e.formatSpan(u[0],u[u.length-1],n,i)}else i&&(a=e.format(i));return a}function PT(e,t,n){const i=Rx(e,t),r=e.base(),o=Math.log(r),s=Math.max(1,r*t/i.length),a=u=>{let l=u/Math.pow(r,Math.round(Math.log(u)/o));return l*r1?i[1]-i[0]:i[0],s;for(s=1;suy[e.type]||e.bins;function BT(e,t,n,i,r,o,s){const a=IT[t.type]&&o!==ea&&o!==ta?_B(e,t,r):LT(e,t,n,r,o,s);return i===Xd&&AB(t)?kB(a):i===vB?CB(a):FB(a)}const kB=e=>(t,n,i)=>{const r=$S(i[n+1],$S(i.max,1/0)),o=AS(t,e),s=AS(r,e);return o&&s?o+" – "+s:s?"< "+s:"≥ "+o},$S=(e,t)=>e??t,CB=e=>(t,n)=>n?e(t):null,FB=e=>t=>e(t),AS=(e,t)=>Number.isFinite(e)?t(e):null;function MB(e){const t=e.domain(),n=t.length-1;let i=+t[0],r=+xe(t),o=r-i;if(e.type===Mg){const s=n?o/n:.1;i-=s,r+=s,o=r-i}return s=>(s-i)/o}function TB(e,t,n,i){const r=i||t.type;return X(n)&&hB(r)&&(n=n.replace(/%a/g,"%A").replace(/%b/g,"%B")),!n&&r===ea?e.timeFormat("%A, %d %B %Y, %X"):!n&&r===ta?e.utcFormat("%A, %d %B %Y, %X UTC"):BT(e,t,5,null,n,i,!0)}function UT(e,t,n){n=n||{};const i=Math.max(3,n.maxlen||7),r=TB(e,t,n.format,n.formatType);if(ay(t.type)){const o=zT(t).slice(1).map(r),s=o.length;return`${s} boundar${s===1?"y":"ies"}: ${o.join(", ")}`}else if(Fu(t.type)){const o=t.domain(),s=o.length,a=s>i?o.slice(0,i-2).map(r).join(", ")+", ending with "+o.slice(-1).map(r):o.map(r).join(", ");return`${s} value${s===1?"":"s"}: ${a}`}else{const o=t.domain();return`values from ${r(o[0])} to ${r(xe(o))}`}}let jT=0;function DB(){jT=0}const Lh="p_";function Lx(e){return e&&e.gradient}function qT(e,t,n){const i=e.gradient;let r=e.id,o=i==="radial"?Lh:"";return r||(r=e.id="gradient_"+jT++,i==="radial"?(e.x1=Bi(e.x1,.5),e.y1=Bi(e.y1,.5),e.r1=Bi(e.r1,0),e.x2=Bi(e.x2,.5),e.y2=Bi(e.y2,.5),e.r2=Bi(e.r2,.5),o=Lh):(e.x1=Bi(e.x1,0),e.y1=Bi(e.y1,0),e.x2=Bi(e.x2,1),e.y2=Bi(e.y2,0))),t[r]=e,"url("+(n||"")+"#"+o+r+")"}function Bi(e,t){return e??t}function WT(e,t){var n=[],i;return i={gradient:"linear",x1:e?e[0]:0,y1:e?e[1]:0,x2:t?t[0]:1,y2:t?t[1]:0,stops:n,stop:function(r,o){return n.push({offset:r,color:o}),i}}}const kS={basis:{curve:Pz},"basis-closed":{curve:Iz},"basis-open":{curve:zz},bundle:{curve:Bz,tension:"beta",value:.85},cardinal:{curve:Uz,tension:"tension",value:0},"cardinal-open":{curve:qz,tension:"tension",value:0},"cardinal-closed":{curve:jz,tension:"tension",value:0},"catmull-rom":{curve:Wz,tension:"alpha",value:.5},"catmull-rom-closed":{curve:Hz,tension:"alpha",value:.5},"catmull-rom-open":{curve:Gz,tension:"alpha",value:.5},linear:{curve:ax},"linear-closed":{curve:Yz},monotone:{horizontal:Vz,vertical:Xz},natural:{curve:Kz},step:{curve:Jz},"step-after":{curve:Zz},"step-before":{curve:Qz}};function Px(e,t,n){var i=re(kS,e)&&kS[e],r=null;return i&&(r=i.curve||i[t||"vertical"],i.tension&&n!=null&&(r=r[i.tension](n))),r}const NB={m:2,l:2,h:1,v:1,z:0,c:6,s:4,q:4,t:2,a:7},OB=/[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi,RB=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,LB=/^((\s+,?\s*)|(,\s*))/,PB=/^[01]/;function Mu(e){const t=[];return(e.match(OB)||[]).forEach(i=>{let r=i[0];const o=r.toLowerCase(),s=NB[o],a=IB(o,s,i.slice(1).trim()),u=a.length;if(u1&&(g=Math.sqrt(g),n*=g,i*=g);const m=d/n,y=f/n,v=-f/i,b=d/i,x=m*a+y*u,w=v*a+b*u,_=m*e+y*t,E=v*e+b*t;let $=1/((_-x)*(_-x)+(E-w)*(E-w))-.25;$<0&&($=0);let F=Math.sqrt($);o==r&&(F=-F);const k=.5*(x+_)-F*(E-w),N=.5*(w+E)+F*(_-x),A=Math.atan2(w-N,x-k);let C=Math.atan2(E-N,_-k)-A;C<0&&o===1?C+=Yi:C>0&&o===0&&(C-=Yi);const T=Math.ceil(Math.abs(C/(Ds+.001))),L=[];for(let I=0;I+e}function pd(e,t,n){return Math.max(t,Math.min(e,n))}function YT(){var e=WB,t=HB,n=GB,i=YB,r=$r(0),o=r,s=r,a=r,u=null;function l(c,f,d){var h,p=f??+e.call(this,c),g=d??+t.call(this,c),m=+n.call(this,c),y=+i.call(this,c),v=Math.min(m,y)/2,b=pd(+r.call(this,c),0,v),x=pd(+o.call(this,c),0,v),w=pd(+s.call(this,c),0,v),_=pd(+a.call(this,c),0,v);if(u||(u=h=vg()),b<=0&&x<=0&&w<=0&&_<=0)u.rect(p,g,m,y);else{var E=p+m,S=g+y;u.moveTo(p+b,g),u.lineTo(E-x,g),u.bezierCurveTo(E-lo*x,g,E,g+lo*x,E,g+x),u.lineTo(E,S-_),u.bezierCurveTo(E,S-lo*_,E-lo*_,S,E-_,S),u.lineTo(p+w,S),u.bezierCurveTo(p+lo*w,S,p,S-lo*w,p,S-w),u.lineTo(p,g+b),u.bezierCurveTo(p,g+lo*b,p+lo*b,g,p+b,g),u.closePath()}if(h)return u=null,h+""||null}return l.x=function(c){return arguments.length?(e=$r(c),l):e},l.y=function(c){return arguments.length?(t=$r(c),l):t},l.width=function(c){return arguments.length?(n=$r(c),l):n},l.height=function(c){return arguments.length?(i=$r(c),l):i},l.cornerRadius=function(c,f,d,h){return arguments.length?(r=$r(c),o=f!=null?$r(f):r,a=d!=null?$r(d):r,s=h!=null?$r(h):o,l):r},l.context=function(c){return arguments.length?(u=c??null,l):u},l}function XT(){var e,t,n,i,r=null,o,s,a,u;function l(f,d,h){const p=h/2;if(o){var g=a-d,m=f-s;if(g||m){var y=Math.hypot(g,m),v=(g/=y)*u,b=(m/=y)*u,x=Math.atan2(m,g);r.moveTo(s-v,a-b),r.lineTo(f-g*p,d-m*p),r.arc(f,d,p,x-Math.PI,x),r.lineTo(s+v,a+b),r.arc(s,a,u,x,x+Math.PI)}else r.arc(f,d,p,0,Yi);r.closePath()}else o=1;s=f,a=d,u=p}function c(f){var d,h=f.length,p,g=!1,m;for(r==null&&(r=m=vg()),d=0;d<=h;++d)!(de.x||0,Mf=e=>e.y||0,XB=e=>e.width||0,VB=e=>e.height||0,KB=e=>(e.x||0)+(e.width||0),JB=e=>(e.y||0)+(e.height||0),QB=e=>e.startAngle||0,ZB=e=>e.endAngle||0,eU=e=>e.padAngle||0,tU=e=>e.innerRadius||0,nU=e=>e.outerRadius||0,iU=e=>e.cornerRadius||0,rU=e=>Cf(e.cornerRadiusTopLeft,e.cornerRadius)||0,oU=e=>Cf(e.cornerRadiusTopRight,e.cornerRadius)||0,sU=e=>Cf(e.cornerRadiusBottomRight,e.cornerRadius)||0,aU=e=>Cf(e.cornerRadiusBottomLeft,e.cornerRadius)||0,uU=e=>Cf(e.size,64),lU=e=>e.size||1,Dg=e=>e.defined!==!1,cU=e=>GT(e.shape||"circle"),fU=Oz().startAngle(QB).endAngle(ZB).padAngle(eU).innerRadius(tU).outerRadius(nU).cornerRadius(iU),dU=_3().x(Ff).y1(Mf).y0(JB).defined(Dg),hU=_3().y(Mf).x1(Ff).x0(KB).defined(Dg),pU=E3().x(Ff).y(Mf).defined(Dg),gU=YT().x(Ff).y(Mf).width(XB).height(VB).cornerRadius(rU,oU,sU,aU),mU=Lz().type(cU).size(uU),yU=XT().x(Ff).y(Mf).defined(Dg).size(lU);function Ix(e){return e.cornerRadius||e.cornerRadiusTopLeft||e.cornerRadiusTopRight||e.cornerRadiusBottomRight||e.cornerRadiusBottomLeft}function vU(e,t){return fU.context(e)(t)}function bU(e,t){const n=t[0],i=n.interpolate||"linear";return(n.orient==="horizontal"?hU:dU).curve(Px(i,n.orient,n.tension)).context(e)(t)}function xU(e,t){const n=t[0],i=n.interpolate||"linear";return pU.curve(Px(i,n.orient,n.tension)).context(e)(t)}function fl(e,t,n,i){return gU.context(e)(t,n,i)}function wU(e,t){return(t.mark.shape||t.shape).context(e)(t)}function EU(e,t){return mU.context(e)(t)}function _U(e,t){return yU.context(e)(t)}var VT=1;function KT(){VT=1}function zx(e,t,n){var i=t.clip,r=e._defs,o=t.clip_id||(t.clip_id="clip"+VT++),s=r.clipping[o]||(r.clipping[o]={id:o});return ce(i)?s.path=i(null):Ix(n)?s.path=fl(null,n,0,0):(s.width=n.width||0,s.height=n.height||0),"url(#"+o+")"}function nt(e){this.clear(),e&&this.union(e)}nt.prototype={clone(){return new nt(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2},set(e,t,n,i){return nthis.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},expand(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(e){return this.x1*=e,this.y1*=e,this.x2*=e,this.y2*=e,this},translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},rotate(e,t,n){const i=this.rotatedPoints(e,t,n);return this.clear().add(i[0],i[1]).add(i[2],i[3]).add(i[4],i[5]).add(i[6],i[7])},rotatedPoints(e,t,n){var{x1:i,y1:r,x2:o,y2:s}=this,a=Math.cos(e),u=Math.sin(e),l=t-t*a+n*u,c=n-t*u-n*a;return[a*i-u*r+l,u*i+a*r+c,a*i-u*s+l,u*i+a*s+c,a*o-u*r+l,u*o+a*r+c,a*o-u*s+l,u*o+a*s+c]},union(e){return e.x1this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},intersect(e){return e.x1>this.x1&&(this.x1=e.x1),e.y1>this.y1&&(this.y1=e.y1),e.x2=e.x2&&this.y1<=e.y1&&this.y2>=e.y2},alignsWith(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},intersects(e){return e&&!(this.x2e.x2||this.y2e.y2)},contains(e,t){return!(ethis.x2||tthis.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}};function Ng(e){this.mark=e,this.bounds=this.bounds||new nt}function Og(e){Ng.call(this,e),this.items=this.items||[]}W(Og,Ng);function Bx(e){this._pending=0,this._loader=e||sg()}function TS(e){e._pending+=1}function Nl(e){e._pending-=1}Bx.prototype={pending(){return this._pending},sanitizeURL(e){const t=this;return TS(t),t._loader.sanitize(e,{context:"href"}).then(n=>(Nl(t),n)).catch(()=>(Nl(t),null))},loadImage(e){const t=this,n=e7();return TS(t),t._loader.sanitize(e,{context:"image"}).then(i=>{const r=i.href;if(!r||!n)throw{url:r};const o=new n,s=re(i,"crossOrigin")?i.crossOrigin:"anonymous";return s!=null&&(o.crossOrigin=s),o.onload=()=>Nl(t),o.onerror=()=>Nl(t),o.src=r,o}).catch(i=>(Nl(t),{complete:!1,width:0,height:0,src:i&&i.url||""}))},ready(){const e=this;return new Promise(t=>{function n(i){e.pending()?setTimeout(()=>{n(!0)},10):t(i)}n(!1)})}};function eo(e,t,n){if(t.stroke&&t.opacity!==0&&t.strokeOpacity!==0){const i=t.strokeWidth!=null?+t.strokeWidth:1;e.expand(i+(n?SU(t,i):0))}return e}function SU(e,t){return e.strokeJoin&&e.strokeJoin!=="miter"?0:t}const $U=Yi-1e-8;let Rg,Vd,Kd,zs,ly,Jd,cy,fy;const xo=(e,t)=>Rg.add(e,t),Qd=(e,t)=>xo(Vd=e,Kd=t),DS=e=>xo(e,Rg.y1),NS=e=>xo(Rg.x1,e),Ns=(e,t)=>ly*e+cy*t,Os=(e,t)=>Jd*e+fy*t,C0=(e,t)=>xo(Ns(e,t),Os(e,t)),F0=(e,t)=>Qd(Ns(e,t),Os(e,t));function Tf(e,t){return Rg=e,t?(zs=t*Bo,ly=fy=Math.cos(zs),Jd=Math.sin(zs),cy=-Jd):(ly=fy=1,zs=Jd=cy=0),AU}const AU={beginPath(){},closePath(){},moveTo:F0,lineTo:F0,rect(e,t,n,i){zs?(C0(e+n,t),C0(e+n,t+i),C0(e,t+i),F0(e,t)):(xo(e+n,t+i),Qd(e,t))},quadraticCurveTo(e,t,n,i){const r=Ns(e,t),o=Os(e,t),s=Ns(n,i),a=Os(n,i);OS(Vd,r,s,DS),OS(Kd,o,a,NS),Qd(s,a)},bezierCurveTo(e,t,n,i,r,o){const s=Ns(e,t),a=Os(e,t),u=Ns(n,i),l=Os(n,i),c=Ns(r,o),f=Os(r,o);RS(Vd,s,u,c,DS),RS(Kd,a,l,f,NS),Qd(c,f)},arc(e,t,n,i,r,o){if(i+=zs,r+=zs,Vd=n*Math.cos(r)+e,Kd=n*Math.sin(r)+t,Math.abs(r-i)>$U)xo(e-n,t-n),xo(e+n,t+n);else{const s=l=>xo(n*Math.cos(l)+e,n*Math.sin(l)+t);let a,u;if(s(i),s(r),r!==i)if(i=i%Yi,i<0&&(i+=Yi),r=r%Yi,r<0&&(r+=Yi),rr;++u,a-=Ds)s(a);else for(a=i-i%Ds+Ds,u=0;u<4&&azB?(c=s*s+a*o,c>=0&&(c=Math.sqrt(c),u=(-s+c)/o,l=(-s-c)/o)):u=.5*a/s,0d)return!1;g>f&&(f=g)}else if(h>0){if(g0?(e.globalAlpha=n,e.fillStyle=ZT(e,t,t.fill),!0):!1}var CU=[];function Du(e,t,n){var i=(i=t.strokeWidth)!=null?i:1;return i<=0?!1:(n*=t.strokeOpacity==null?1:t.strokeOpacity,n>0?(e.globalAlpha=n,e.strokeStyle=ZT(e,t,t.stroke),e.lineWidth=i,e.lineCap=t.strokeCap||"butt",e.lineJoin=t.strokeJoin||"miter",e.miterLimit=t.strokeMiterLimit||10,e.setLineDash&&(e.setLineDash(t.strokeDash||CU),e.lineDashOffset=t.strokeDashOffset||0),!0):!1)}function FU(e,t){return e.zindex-t.zindex||e.index-t.index}function qx(e){if(!e.zdirty)return e.zitems;var t=e.items,n=[],i,r,o;for(r=0,o=t.length;r=0;)if(i=t(n[r]))return i;if(n===o){for(n=e.items,r=n.length;--r>=0;)if(!n[r].zindex&&(i=t(n[r])))return i}return null}function Wx(e){return function(t,n,i){Ci(n,r=>{(!i||i.intersects(r.bounds))&&eD(e,t,r,r)})}}function MU(e){return function(t,n,i){n.items.length&&(!i||i.intersects(n.bounds))&&eD(e,t,n.items[0],n.items)}}function eD(e,t,n,i){var r=n.opacity==null?1:n.opacity;r!==0&&(e(t,i)||(Tu(t,n),n.fill&&Ph(t,n,r)&&t.fill(),n.stroke&&Du(t,n,r)&&t.stroke()))}function Lg(e){return e=e||ei,function(t,n,i,r,o,s){return i*=t.pixelRatio,r*=t.pixelRatio,Ih(n,a=>{const u=a.bounds;if(!(u&&!u.contains(o,s)||!u)&&e(t,a,i,r,o,s))return a})}}function Df(e,t){return function(n,i,r,o){var s=Array.isArray(i)?i[0]:i,a=t??s.fill,u=s.stroke&&n.isPointInStroke,l,c;return u&&(l=s.strokeWidth,c=s.strokeCap,n.lineWidth=l??1,n.lineCap=c??"butt"),e(n,i)?!1:a&&n.isPointInPath(r,o)||u&&n.isPointInStroke(r,o)}}function Hx(e){return Lg(Df(e))}function Gs(e,t){return"translate("+e+","+t+")"}function Gx(e){return"rotate("+e+")"}function TU(e,t){return"scale("+e+","+t+")"}function tD(e){return Gs(e.x||0,e.y||0)}function DU(e){return Gs(e.x||0,e.y||0)+(e.angle?" "+Gx(e.angle):"")}function NU(e){return Gs(e.x||0,e.y||0)+(e.angle?" "+Gx(e.angle):"")+(e.scaleX||e.scaleY?" "+TU(e.scaleX||1,e.scaleY||1):"")}function Yx(e,t,n){function i(s,a){s("transform",DU(a)),s("d",t(null,a))}function r(s,a){return t(Tf(s,a.angle),a),eo(s,a).translate(a.x||0,a.y||0)}function o(s,a){var u=a.x||0,l=a.y||0,c=a.angle||0;s.translate(u,l),c&&s.rotate(c*=Bo),s.beginPath(),t(s,a),c&&s.rotate(-c),s.translate(-u,-l)}return{type:e,tag:"path",nested:!1,attr:i,bound:r,draw:Wx(o),pick:Hx(o),isect:n||Ux(o)}}var OU=Yx("arc",vU);function RU(e,t){for(var n=e[0].orient==="horizontal"?t[1]:t[0],i=e[0].orient==="horizontal"?"y":"x",r=e.length,o=1/0,s,a;--r>=0;)e[r].defined!==!1&&(a=Math.abs(e[r][i]-n),a=0;)if(e[i].defined!==!1&&(r=e[i].x-t[0],o=e[i].y-t[1],s=r*r+o*o,s=0;)if(e[n].defined!==!1&&(i=e[n].x-t[0],r=e[n].y-t[1],o=i*i+r*r,i=e[n].size||1,o.5&&t<1.5?.5-Math.abs(t-1):0}function BU(e,t){e("transform",tD(t))}function rD(e,t){const n=iD(t);e("d",fl(null,t,n,n))}function UU(e,t){e("class","background"),e("aria-hidden",!0),rD(e,t)}function jU(e,t){e("class","foreground"),e("aria-hidden",!0),t.strokeForeground?rD(e,t):e("d","")}function qU(e,t,n){const i=t.clip?zx(n,t,t):null;e("clip-path",i)}function WU(e,t){if(!t.clip&&t.items){const n=t.items,i=n.length;for(let r=0;r{const o=r.x||0,s=r.y||0,a=r.strokeForeground,u=r.opacity==null?1:r.opacity;(r.stroke||r.fill)&&u&&(Hc(e,r,o,s),Tu(e,r),r.fill&&Ph(e,r,u)&&e.fill(),r.stroke&&!a&&Du(e,r,u)&&e.stroke()),e.save(),e.translate(o,s),r.clip&&nD(e,r),n&&n.translate(-o,-s),Ci(r,l=>{(l.marktype==="group"||i==null||i.includes(l.marktype))&&this.draw(e,l,n,i)}),n&&n.translate(o,s),e.restore(),a&&r.stroke&&u&&(Hc(e,r,o,s),Tu(e,r),Du(e,r,u)&&e.stroke())})}function VU(e,t,n,i,r,o){if(t.bounds&&!t.bounds.contains(r,o)||!t.items)return null;const s=n*e.pixelRatio,a=i*e.pixelRatio;return Ih(t,u=>{let l,c,f;const d=u.bounds;if(d&&!d.contains(r,o))return;c=u.x||0,f=u.y||0;const h=c+(u.width||0),p=f+(u.height||0),g=u.clip;if(g&&(rh||op))return;if(e.save(),e.translate(c,f),c=r-c,f=o-f,g&&Ix(u)&&!YU(e,u,s,a))return e.restore(),null;const m=u.strokeForeground,y=t.interactive!==!1;return y&&m&&u.stroke&&GU(e,u,s,a)?(e.restore(),u):(l=Ih(u,v=>KU(v,c,f)?this.pick(v,n,i,c,f):null),!l&&y&&(u.fill||!m&&u.stroke)&&HU(e,u,s,a)&&(l=u),e.restore(),l||null)})}function KU(e,t,n){return(e.interactive!==!1||e.marktype==="group")&&e.bounds&&e.bounds.contains(t,n)}var JU={type:"group",tag:"g",nested:!1,attr:BU,bound:WU,draw:XU,pick:VU,isect:JT,content:qU,background:UU,foreground:jU},Gc={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function Vx(e,t){var n=e.image;return(!n||e.url&&e.url!==n.url)&&(n={complete:!1,width:0,height:0},t.loadImage(e.url).then(i=>{e.image=i,e.image.url=e.url})),n}function Kx(e,t){return e.width!=null?e.width:!t||!t.width?0:e.aspect!==!1&&e.height?e.height*t.width/t.height:t.width}function Jx(e,t){return e.height!=null?e.height:!t||!t.height?0:e.aspect!==!1&&e.width?e.width*t.height/t.width:t.height}function Pg(e,t){return e==="center"?t/2:e==="right"?t:0}function Ig(e,t){return e==="middle"?t/2:e==="bottom"?t:0}function QU(e,t,n){const i=Vx(t,n),r=Kx(t,i),o=Jx(t,i),s=(t.x||0)-Pg(t.align,r),a=(t.y||0)-Ig(t.baseline,o),u=!i.src&&i.toDataURL?i.toDataURL():i.src||"";e("href",u,Gc["xmlns:xlink"],"xlink:href"),e("transform",Gs(s,a)),e("width",r),e("height",o),e("preserveAspectRatio",t.aspect===!1?"none":"xMidYMid")}function ZU(e,t){const n=t.image,i=Kx(t,n),r=Jx(t,n),o=(t.x||0)-Pg(t.align,i),s=(t.y||0)-Ig(t.baseline,r);return e.set(o,s,o+i,s+r)}function ej(e,t,n){Ci(t,i=>{if(n&&!n.intersects(i.bounds))return;const r=Vx(i,this);let o=Kx(i,r),s=Jx(i,r);if(o===0||s===0)return;let a=(i.x||0)-Pg(i.align,o),u=(i.y||0)-Ig(i.baseline,s),l,c,f,d;i.aspect!==!1&&(c=r.width/r.height,f=i.width/i.height,c===c&&f===f&&c!==f&&(f{if(!(n&&!n.intersects(i.bounds))){var r=i.opacity==null?1:i.opacity;r&&oD(e,i,r)&&(Tu(e,i),e.stroke())}})}function dj(e,t,n,i){return e.isPointInStroke?oD(e,t,1)&&e.isPointInStroke(n,i):!1}var hj={type:"rule",tag:"line",nested:!1,attr:lj,bound:cj,draw:fj,pick:Lg(dj),isect:QT},pj=Yx("shape",wU),gj=Yx("symbol",EU,jx);const zS=hF();var On={height:pr,measureWidth:Qx,estimateWidth:zh,width:zh,canvas:sD};sD(!0);function sD(e){On.width=e&&No?Qx:zh}function zh(e,t){return aD(jo(e,t),pr(e))}function aD(e,t){return~~(.8*e.length*t)}function Qx(e,t){return pr(e)<=0||!(t=jo(e,t))?0:uD(t,zg(e))}function uD(e,t){const n=`(${t}) ${e}`;let i=zS.get(n);return i===void 0&&(No.font=t,i=No.measureText(e).width,zS.set(n,i)),i}function pr(e){return e.fontSize!=null?+e.fontSize||0:11}function Uo(e){return e.lineHeight!=null?e.lineHeight:pr(e)+2}function mj(e){return P(e)?e.length>1?e:e[0]:e}function Nf(e){return mj(e.lineBreak&&e.text&&!P(e.text)?e.text.split(e.lineBreak):e.text)}function Zx(e){const t=Nf(e);return(P(t)?t.length-1:0)*Uo(e)}function jo(e,t){const n=t==null?"":(t+"").trim();return e.limit>0&&n.length?vj(e,n):n}function yj(e){if(On.width===Qx){const t=zg(e);return n=>uD(n,t)}else if(On.width===zh){const t=pr(e);return n=>aD(n,t)}else return t=>On.width(e,t)}function vj(e,t){var n=+e.limit,i=yj(e);if(i(t)>>1,i(t.slice(u))>n?s=u+1:a=u;return r+t.slice(s)}else{for(;s>>1),i(t.slice(0,u))Math.max(d,On.width(t,h)),0)):f=On.width(t,c),r==="center"?u-=f/2:r==="right"&&(u-=f),e.set(u+=s,l+=a,u+f,l+i),t.angle&&!n)e.rotate(t.angle*Bo,s,a);else if(n===2)return e.rotatedPoints(t.angle*Bo,s,a);return e}function wj(e,t,n){Ci(t,i=>{var r=i.opacity==null?1:i.opacity,o,s,a,u,l,c,f;if(!(n&&!n.intersects(i.bounds)||r===0||i.fontSize<=0||i.text==null||i.text.length===0)){if(e.font=zg(i),e.textAlign=i.align||"left",o=Bg(i),s=o.x1,a=o.y1,i.angle&&(e.save(),e.translate(s,a),e.rotate(i.angle*Bo),s=a=0),s+=i.dx||0,a+=(i.dy||0)+e2(i),c=Nf(i),Tu(e,i),P(c))for(l=Uo(i),u=0;ut;)e.removeChild(n[--i]);return e}function pD(e){return"mark-"+e.marktype+(e.role?" role-"+e.role:"")+(e.name?" "+e.name:"")}function Ug(e,t){const n=t.getBoundingClientRect();return[e.clientX-n.left-(t.clientLeft||0),e.clientY-n.top-(t.clientTop||0)]}function kj(e,t,n,i){var r=e&&e.mark,o,s;if(r&&(o=zn[r.marktype]).tip){for(s=Ug(t,n),s[0]-=i[0],s[1]-=i[1];e=e.mark.group;)s[0]-=e.x||0,s[1]-=e.y||0;e=o.tip(r.items,s)}return e}function qo(e,t){this._active=null,this._handlers={},this._loader=e||sg(),this._tooltip=t||Cj}function Cj(e,t,n,i){e.element().setAttribute("title",i||"")}qo.prototype={initialize(e,t,n){return this._el=e,this._obj=n||null,this.origin(t)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},origin(e){return arguments.length?(this._origin=e||[0,0],this):this._origin.slice()},scene(e){return arguments.length?(this._scene=e,this):this._scene},on(){},off(){},_handlerIndex(e,t,n){for(let i=e?e.length:0;--i>=0;)if(e[i].type===t&&(!n||e[i].handler===n))return i;return-1},handlers(e){const t=this._handlers,n=[];if(e)n.push(...t[this.eventName(e)]);else for(const i in t)n.push(...t[i]);return n},eventName(e){const t=e.indexOf(".");return t<0?e:e.slice(0,t)},handleHref(e,t,n){this._loader.sanitize(n,{context:"href"}).then(i=>{const r=new MouseEvent(e.type,e),o=wo(null,"a");for(const s in i)o.setAttribute(s,i[s]);o.dispatchEvent(r)}).catch(()=>{})},handleTooltip(e,t,n){if(t&&t.tooltip!=null){t=kj(t,e,this.canvas(),this._origin);const i=n&&t&&t.tooltip||null;this._tooltip.call(this._obj,this,e,t,i)}},getItemBoundingClientRect(e){const t=this.canvas();if(!t)return;const n=t.getBoundingClientRect(),i=this._origin,r=e.bounds,o=r.width(),s=r.height();let a=r.x1+i[0]+n.left,u=r.y1+i[1]+n.top;for(;e.mark&&(e=e.mark.group);)a+=e.x||0,u+=e.y||0;return{x:a,y:u,width:o,height:s,left:a,top:u,right:a+o,bottom:u+s}}};function jn(e){this._el=null,this._bgcolor=null,this._loader=new Bx(e)}jn.prototype={initialize(e,t,n,i,r){return this._el=e,this.resize(t,n,i,r)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},background(e){return arguments.length===0?this._bgcolor:(this._bgcolor=e,this)},resize(e,t,n,i){return this._width=e,this._height=t,this._origin=n||[0,0],this._scale=i||1,this},dirty(){},render(e,t){const n=this;return n._call=function(){n._render(e,t)},n._call(),n._call=null,n},_render(){},renderAsync(e,t){const n=this.render(e,t);return this._ready?this._ready.then(()=>n):Promise.resolve(n)},_load(e,t){var n=this,i=n._loader[e](t);if(!n._ready){const r=n._call;n._ready=n._loader.ready().then(o=>{o&&r(),n._ready=null})}return i},sanitizeURL(e){return this._load("sanitizeURL",e)},loadImage(e){return this._load("loadImage",e)}};const Fj="keydown",Mj="keypress",Tj="keyup",gD="dragenter",eh="dragleave",mD="dragover",py="pointerdown",Dj="pointerup",Bh="pointermove",wc="pointerout",yD="pointerover",gy="mousedown",Nj="mouseup",vD="mousemove",my="mouseout",bD="mouseover",Uh="click",Oj="dblclick",Rj="wheel",xD="mousewheel",jh="touchstart",qh="touchmove",Wh="touchend",Lj=[Fj,Mj,Tj,gD,eh,mD,py,Dj,Bh,wc,yD,gy,Nj,vD,my,bD,Uh,Oj,Rj,xD,jh,qh,Wh],yy=Bh,Yc=wc,vy=Uh;function Wo(e,t){qo.call(this,e,t),this._down=null,this._touch=null,this._first=!0,this._events={}}const Pj=e=>e===jh||e===qh||e===Wh?[jh,qh,Wh]:[e];function US(e,t){Pj(t).forEach(n=>Ij(e,n))}function Ij(e,t){const n=e.canvas();n&&!e._events[t]&&(e._events[t]=1,n.addEventListener(t,e[t]?i=>e[t](i):i=>e.fire(t,i)))}function rc(e,t,n){t.forEach(i=>e.fire(i,n))}function jS(e,t,n){return function(i){const r=this._active,o=this.pickEvent(i);o===r?rc(this,e,i):((!r||!r.exit)&&rc(this,n,i),this._active=o,rc(this,t,i),rc(this,e,i))}}function qS(e){return function(t){rc(this,e,t),this._active=null}}W(Wo,qo,{initialize(e,t,n){return this._canvas=e&&i2(e,"canvas"),[Uh,gy,py,Bh,wc,eh].forEach(i=>US(this,i)),qo.prototype.initialize.call(this,e,t,n)},canvas(){return this._canvas},context(){return this._canvas.getContext("2d")},events:Lj,DOMMouseScroll(e){this.fire(xD,e)},pointermove:jS([Bh,vD],[yD,bD],[wc,my]),dragover:jS([mD],[gD],[eh]),pointerout:qS([wc,my]),dragleave:qS([eh]),pointerdown(e){this._down=this._active,this.fire(py,e)},mousedown(e){this._down=this._active,this.fire(gy,e)},click(e){this._down===this._active&&(this.fire(Uh,e),this._down=null)},touchstart(e){this._touch=this.pickEvent(e.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(jh,e,!0)},touchmove(e){this.fire(qh,e,!0)},touchend(e){this.fire(Wh,e,!0),this._touch=null},fire(e,t,n){const i=n?this._touch:this._active,r=this._handlers[e];if(t.vegaType=e,e===vy&&i&&i.href?this.handleHref(t,i,i.href):(e===yy||e===Yc)&&this.handleTooltip(t,i,e!==Yc),r)for(let o=0,s=r.length;o=0&&i.splice(r,1),this},pickEvent(e){const t=Ug(e,this._canvas),n=this._origin;return this.pick(this._scene,t[0],t[1],t[0]-n[0],t[1]-n[1])},pick(e,t,n,i,r){const o=this.context();return zn[e.marktype].pick.call(this,o,e,t,n,i,r)}});function zj(){return typeof window<"u"&&window.devicePixelRatio||1}function Bj(e,t,n,i,r,o){const s=typeof HTMLElement<"u"&&e instanceof HTMLElement&&e.parentNode!=null,a=e.getContext("2d"),u=s?zj():r;e.width=t*u,e.height=n*u;for(const l in o)a[l]=o[l];return s&&u!==1&&(e.style.width=t+"px",e.style.height=n+"px"),a.pixelRatio=u,a.setTransform(u,0,0,u,u*i[0],u*i[1]),e}function Xc(e){jn.call(this,e),this._options={},this._redraw=!1,this._dirty=new nt,this._tempb=new nt}const WS=jn.prototype,Uj=(e,t,n)=>new nt().set(0,0,t,n).translate(-e[0],-e[1]);function jj(e,t,n){return t.expand(1).round(),e.pixelRatio%1&&t.scale(e.pixelRatio).round().scale(1/e.pixelRatio),t.translate(-(n[0]%1),-(n[1]%1)),e.beginPath(),e.rect(t.x1,t.y1,t.width(),t.height()),e.clip(),t}W(Xc,jn,{initialize(e,t,n,i,r,o){return this._options=o||{},this._canvas=this._options.externalContext?null:Do(1,1,this._options.type),e&&this._canvas&&(Hn(e,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),WS.initialize.call(this,e,t,n,i,r)},resize(e,t,n,i){if(WS.resize.call(this,e,t,n,i),this._canvas)Bj(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const r=this._options.externalContext;r||R("CanvasRenderer is missing a valid canvas or context"),r.scale(this._scale,this._scale),r.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this},canvas(){return this._canvas},context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)},dirty(e){const t=this._tempb.clear().union(e.bounds);let n=e.mark.group;for(;n;)t.translate(n.x||0,n.y||0),n=n.mark.group;this._dirty.union(t)},_render(e,t){const n=this.context(),i=this._origin,r=this._width,o=this._height,s=this._dirty,a=Uj(i,r,o);n.save();const u=this._redraw||s.empty()?(this._redraw=!1,a.expand(1)):jj(n,a.intersect(s),i);return this.clear(-i[0],-i[1],r,o),this.draw(n,e,u,t),n.restore(),s.clear(),this},draw(e,t,n,i){if(t.marktype!=="group"&&i!=null&&!i.includes(t.marktype))return;const r=zn[t.marktype];t.clip&&zU(e,t),r.draw.call(this,e,t,n,i),t.clip&&e.restore()},clear(e,t,n,i){const r=this._options,o=this.context();r.type!=="pdf"&&!r.externalContext&&o.clearRect(e,t,n,i),this._bgcolor!=null&&(o.fillStyle=this._bgcolor,o.fillRect(e,t,n,i))}});function r2(e,t){qo.call(this,e,t);const n=this;n._hrefHandler=by(n,(i,r)=>{r&&r.href&&n.handleHref(i,r,r.href)}),n._tooltipHandler=by(n,(i,r)=>{n.handleTooltip(i,r,i.type!==Yc)})}const by=(e,t)=>n=>{let i=n.target.__data__;i=Array.isArray(i)?i[0]:i,n.vegaType=n.type,t.call(e._obj,n,i)};W(r2,qo,{initialize(e,t,n){let i=this._svg;return i&&(i.removeEventListener(vy,this._hrefHandler),i.removeEventListener(yy,this._tooltipHandler),i.removeEventListener(Yc,this._tooltipHandler)),this._svg=i=e&&i2(e,"svg"),i&&(i.addEventListener(vy,this._hrefHandler),i.addEventListener(yy,this._tooltipHandler),i.addEventListener(Yc,this._tooltipHandler)),qo.prototype.initialize.call(this,e,t,n)},canvas(){return this._svg},on(e,t){const n=this.eventName(e),i=this._handlers;if(this._handlerIndex(i[n],e,t)<0){const o={type:e,handler:t,listener:by(this,t)};(i[n]||(i[n]=[])).push(o),this._svg&&this._svg.addEventListener(n,o.listener)}return this},off(e,t){const n=this.eventName(e),i=this._handlers[n],r=this._handlerIndex(i,e,t);return r>=0&&(this._svg&&this._svg.removeEventListener(n,i[r].listener),i.splice(r,1)),this}});const wD="aria-hidden",o2="aria-label",s2="role",a2="aria-roledescription",ED="graphics-object",u2="graphics-symbol",_D=(e,t,n)=>({[s2]:e,[a2]:t,[o2]:n||void 0}),qj=Ai(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),HS={axis:{desc:"axis",caption:Gj},legend:{desc:"legend",caption:Yj},"title-text":{desc:"title",caption:e=>`Title text '${YS(e)}'`},"title-subtitle":{desc:"subtitle",caption:e=>`Subtitle text '${YS(e)}'`}},GS={ariaRole:s2,ariaRoleDescription:a2,description:o2};function SD(e,t){const n=t.aria===!1;if(e(wD,n||void 0),n||t.description==null)for(const i in GS)e(GS[i],void 0);else{const i=t.mark.marktype;e(o2,t.description),e(s2,t.ariaRole||(i==="group"?ED:u2)),e(a2,t.ariaRoleDescription||`${i} mark`)}}function $D(e){return e.aria===!1?{[wD]:!0}:qj[e.role]?null:HS[e.role]?Hj(e,HS[e.role]):Wj(e)}function Wj(e){const t=e.marktype,n=t==="group"||t==="text"||e.items.some(i=>i.description!=null&&i.aria!==!1);return _D(n?ED:u2,`${t} mark container`,e.description)}function Hj(e,t){try{const n=e.items[0],i=t.caption||(()=>"");return _D(t.role||u2,t.desc,n.description||i(n))}catch{return null}}function YS(e){return Y(e.text).join(" ")}function Gj(e){const t=e.datum,n=e.orient,i=t.title?AD(e):null,r=e.context,o=r.scales[t.scale].value,s=r.dataflow.locale(),a=o.type;return`${n==="left"||n==="right"?"Y":"X"}-axis`+(i?` titled '${i}'`:"")+` for a ${Fu(a)?"discrete":a} scale with ${UT(s,o,e)}`}function Yj(e){const t=e.datum,n=t.title?AD(e):null,i=`${t.type||""} legend`.trim(),r=t.scales,o=Object.keys(r),s=e.context,a=s.scales[r[o[0]]].value,u=s.dataflow.locale();return Vj(i)+(n?` titled '${n}'`:"")+` for ${Xj(o)} with ${UT(u,a,e)}`}function AD(e){try{return Y(xe(e.items).items[0].text).join(" ")}catch{return null}}function Xj(e){return e=e.map(t=>t+(t==="fill"||t==="stroke"?" color":"")),e.length<2?e[0]:e.slice(0,-1).join(", ")+" and "+xe(e)}function Vj(e){return e.length?e[0].toUpperCase()+e.slice(1):e}const kD=e=>(e+"").replace(/&/g,"&").replace(//g,">"),Kj=e=>kD(e).replace(/"/g,""").replace(/\t/g," ").replace(/\n/g," ").replace(/\r/g," ");function l2(){let e="",t="",n="";const i=[],r=()=>t=n="",o=u=>{t&&(e+=`${t}>${n}`,r()),i.push(u)},s=(u,l)=>(l!=null&&(t+=` ${u}="${Kj(l)}"`),a),a={open(u){o(u),t="<"+u;for(var l=arguments.length,c=new Array(l>1?l-1:0),f=1;f${n}`:"/>"):e+=``,r(),a},attr:s,text:u=>(n+=kD(u),a),toString:()=>e};return a}const CD=e=>FD(l2(),e)+"";function FD(e,t){if(e.open(t.tagName),t.hasAttributes()){const n=t.attributes,i=n.length;for(let r=0;r{l.dirty=t})),!i.zdirty){if(n.exit){o.nested&&i.items.length?(u=i.items[0],u._svg&&this._update(o,u._svg,u)):n._svg&&(u=n._svg.parentNode,u&&u.removeChild(n._svg)),n._svg=null;continue}n=o.nested?i.items[0]:n,n._update!==t&&(!n._svg||!n._svg.ownerSVGElement?(this._dirtyAll=!1,VS(n,t)):this._update(o,n._svg,n),n._update=t)}return!this._dirtyAll},mark(e,t,n,i){if(!this.isDirty(t))return t._svg;const r=this._svg,o=t.marktype,s=zn[o],a=t.interactive===!1?"none":null,u=s.tag==="g",l=KS(t,e,n,"g",r);if(o!=="group"&&i!=null&&!i.includes(o))return Hn(l,0),t._svg;l.setAttribute("class",pD(t));const c=$D(t);for(const p in c)Vt(l,p,c[p]);u||Vt(l,"pointer-events",a),Vt(l,"clip-path",t.clip?zx(this,t,t.group):null);let f=null,d=0;const h=p=>{const g=this.isDirty(p),m=KS(p,l,f,s.tag,r);g&&(this._update(s,m,p),u&&Zj(this,m,p,i)),f=m,++d};return s.nested?t.items.length&&h(t.items[0]):Ci(t,h),Hn(l,d),l},_update(e,t,n){Br=t,Rt=t.__values__,SD(Ec,n),e.attr(Ec,n,this);const i=tq[e.type];i&&i.call(this,e,t,n),Br&&this.style(Br,n)},style(e,t){if(t!=null){for(const n in Hh){let i=n==="font"?Of(t):t[n];if(i===Rt[n])continue;const r=Hh[n];i==null?e.removeAttribute(r):(Lx(i)&&(i=qT(i,this._defs.gradient,TD())),e.setAttribute(r,i+"")),Rt[n]=i}for(const n in Gh)th(e,Gh[n],t[n])}},defs(){const e=this._svg,t=this._defs;let n=t.el,i=0;for(const r in t.gradient)n||(t.el=n=rt(e,Ol+1,"defs",it)),i=Jj(n,t.gradient[r],i);for(const r in t.clipping)n||(t.el=n=rt(e,Ol+1,"defs",it)),i=Qj(n,t.clipping[r],i);n&&(i===0?(e.removeChild(n),t.el=null):Hn(n,i))},_clearDefs(){const e=this._defs;e.gradient={},e.clipping={}}});function VS(e,t){for(;e&&e.dirty!==t;e=e.mark.group)if(e.dirty=t,e.mark&&e.mark.dirty!==t)e.mark.dirty=t;else return}function Jj(e,t,n){let i,r,o;if(t.gradient==="radial"){let s=rt(e,n++,"pattern",it);Eo(s,{id:Lh+t.id,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),s=rt(s,0,"rect",it),Eo(s,{width:1,height:1,fill:`url(${TD()}#${t.id})`}),e=rt(e,n++,"radialGradient",it),Eo(e,{id:t.id,fx:t.x1,fy:t.y1,fr:t.r1,cx:t.x2,cy:t.y2,r:t.r2})}else e=rt(e,n++,"linearGradient",it),Eo(e,{id:t.id,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2});for(i=0,r=t.stops.length;i{r=e.mark(t,s,r,i),++o}),Hn(t,1+o)}function KS(e,t,n,i,r){let o=e._svg,s;if(!o&&(s=t.ownerDocument,o=wo(s,i,it),e._svg=o,e.mark&&(o.__data__=e,o.__values__={fill:"default"},i==="g"))){const a=wo(s,"path",it);o.appendChild(a),a.__data__=e;const u=wo(s,"g",it);o.appendChild(u),u.__data__=e;const l=wo(s,"path",it);o.appendChild(l),l.__data__=e,l.__values__={fill:"default"}}return(o.ownerSVGElement!==r||eq(o,n))&&t.insertBefore(o,n?n.nextSibling:t.firstChild),o}function eq(e,t){return e.parentNode&&e.parentNode.childNodes.length>1&&e.previousSibling!=t}let Br=null,Rt=null;const tq={group(e,t,n){const i=Br=t.childNodes[2];Rt=i.__values__,e.foreground(Ec,n,this),Rt=t.__values__,Br=t.childNodes[1],e.content(Ec,n,this);const r=Br=t.childNodes[0];e.background(Ec,n,this);const o=n.mark.interactive===!1?"none":null;if(o!==Rt.events&&(Vt(i,"pointer-events",o),Vt(r,"pointer-events",o),Rt.events=o),n.strokeForeground&&n.stroke){const s=n.fill;Vt(i,"display",null),this.style(r,n),Vt(r,"stroke",null),s&&(n.fill=null),Rt=i.__values__,this.style(i,n),s&&(n.fill=s),Br=null}else Vt(i,"display","none")},image(e,t,n){n.smooth===!1?(th(t,"image-rendering","optimizeSpeed"),th(t,"image-rendering","pixelated")):th(t,"image-rendering",null)},text(e,t,n){const i=Nf(n);let r,o,s,a;P(i)?(o=i.map(u=>jo(n,u)),r=o.join(` +`),r!==Rt.text&&(Hn(t,0),s=t.ownerDocument,a=Uo(n),o.forEach((u,l)=>{const c=wo(s,"tspan",it);c.__data__=n,c.textContent=u,l&&(c.setAttribute("x",0),c.setAttribute("dy",a)),t.appendChild(c)}),Rt.text=r)):(o=jo(n,i),o!==Rt.text&&(t.textContent=o,Rt.text=o)),Vt(t,"font-family",Of(n)),Vt(t,"font-size",pr(n)+"px"),Vt(t,"font-style",n.fontStyle),Vt(t,"font-variant",n.fontVariant),Vt(t,"font-weight",n.fontWeight)}};function Ec(e,t,n){t!==Rt[e]&&(n?nq(Br,e,t,n):Vt(Br,e,t),Rt[e]=t)}function th(e,t,n){n!==Rt[t]&&(n==null?e.style.removeProperty(t):e.style.setProperty(t,n+""),Rt[t]=n)}function Eo(e,t){for(const n in t)Vt(e,n,t[n])}function Vt(e,t,n){n!=null?e.setAttribute(t,n):e.removeAttribute(t)}function nq(e,t,n,i){n!=null?e.setAttributeNS(i,t,n):e.removeAttributeNS(i,t)}function TD(){let e;return typeof window>"u"?"":(e=window.location).hash?e.href.slice(0,-e.hash.length):e.href}function c2(e){jn.call(this,e),this._text=null,this._defs={gradient:{},clipping:{}}}W(c2,jn,{svg(){return this._text},_render(e){const t=l2();t.open("svg",le({},Gc,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const n=this._bgcolor;return n&&n!=="transparent"&&n!=="none"&&t.open("rect",{width:this._width,height:this._height,fill:n}).close(),t.open("g",MD,{transform:"translate("+this._origin+")"}),this.mark(t,e),t.close(),this.defs(t),this._text=t.close()+"",this},mark(e,t){const n=zn[t.marktype],i=n.tag,r=[SD,n.attr];e.open("g",{class:pD(t),"clip-path":t.clip?zx(this,t,t.group):null},$D(t),{"pointer-events":i!=="g"&&t.interactive===!1?"none":null});const o=s=>{const a=this.href(s);if(a&&e.open("a",a),e.open(i,this.attr(t,s,r,i!=="g"?i:null)),i==="text"){const u=Nf(s);if(P(u)){const l={x:0,dy:Uo(s)};for(let c=0;cthis.mark(e,f)),e.close(),u&&c?(l&&(s.fill=null),s.stroke=c,e.open("path",this.attr(t,s,n.foreground,"bgrect")).close(),l&&(s.fill=l)):e.open("path",this.attr(t,s,n.foreground,"bgfore")).close()}e.close(),a&&e.close()};return n.nested?t.items&&t.items.length&&o(t.items[0]):Ci(t,o),e.close()},href(e){const t=e.href;let n;if(t){if(n=this._hrefs&&this._hrefs[t])return n;this.sanitizeURL(t).then(i=>{i["xlink:href"]=i.href,i.href=null,(this._hrefs||(this._hrefs={}))[t]=i})}return null},attr(e,t,n,i){const r={},o=(s,a,u,l)=>{r[l||s]=a};return Array.isArray(n)?n.forEach(s=>s(o,t,this)):n(o,t,this),i&&iq(r,t,e,i,this._defs),r},defs(e){const t=this._defs.gradient,n=this._defs.clipping;if(Object.keys(t).length+Object.keys(n).length!==0){e.open("defs");for(const r in t){const o=t[r],s=o.stops;o.gradient==="radial"?(e.open("pattern",{id:Lh+r,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),e.open("rect",{width:"1",height:"1",fill:"url(#"+r+")"}).close(),e.close(),e.open("radialGradient",{id:r,fx:o.x1,fy:o.y1,fr:o.r1,cx:o.x2,cy:o.y2,r:o.r2})):e.open("linearGradient",{id:r,x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2});for(let a=0;a!hi.svgMarkTypes.includes(r));this._svgRenderer.render(e,hi.svgMarkTypes),this._canvasRenderer.render(e,i)},resize(e,t,n,i){return JS.resize.call(this,e,t,n,i),this._svgRenderer.resize(e,t,n,i),this._canvasRenderer.resize(e,t,n,i),this},background(e){return hi.svgOnTop?this._canvasRenderer.background(e):this._svgRenderer.background(e),this}});function f2(e,t){Wo.call(this,e,t)}W(f2,Wo,{initialize(e,t,n){const i=rt(rt(e,0,"div"),hi.svgOnTop?0:1,"div");return Wo.prototype.initialize.call(this,i,t,n)}});const DD="canvas",ND="hybrid",OD="png",RD="svg",LD="none",_o={Canvas:DD,PNG:OD,SVG:RD,Hybrid:ND,None:LD},na={};na[DD]=na[OD]={renderer:Xc,headless:Xc,handler:Wo};na[RD]={renderer:jg,headless:c2,handler:r2};na[ND]={renderer:Yh,headless:Yh,handler:f2};na[LD]={};function qg(e,t){return e=String(e||"").toLowerCase(),arguments.length>1?(na[e]=t,this):na[e]}function PD(e,t,n){const i=[],r=new nt().union(t),o=e.marktype;return o?ID(e,r,n,i):o==="group"?zD(e,r,n,i):R("Intersect scene must be mark node or group item.")}function ID(e,t,n,i){if(oq(e,t,n)){const r=e.items,o=e.marktype,s=r.length;let a=0;if(o==="group")for(;a=0;o--)if(n[o]!=i[o])return!1;for(o=n.length-1;o>=0;o--)if(r=n[o],!d2(e[r],t[r],r))return!1;return typeof e==typeof t}function uq(){KT(),DB()}const Nu="top",vi="left",bi="right",Ho="bottom",lq="top-left",cq="top-right",fq="bottom-left",dq="bottom-right",h2="start",xy="middle",Kt="end",hq="x",pq="y",Wg="group",p2="axis",g2="title",gq="frame",mq="scope",m2="legend",qD="row-header",WD="row-footer",HD="row-title",GD="column-header",YD="column-footer",XD="column-title",yq="padding",vq="symbol",VD="fit",KD="fit-x",JD="fit-y",bq="pad",y2="none",gd="all",wy="each",v2="flush",So="column",$o="row";function QD(e){D.call(this,null,e)}W(QD,D,{transform(e,t){const n=t.dataflow,i=e.mark,r=i.marktype,o=zn[r],s=o.bound;let a=i.bounds,u;if(o.nested)i.items.length&&n.dirty(i.items[0]),a=md(i,s),i.items.forEach(l=>{l.bounds.clear().union(a)});else if(r===Wg||e.modified())switch(t.visit(t.MOD,l=>n.dirty(l)),a.clear(),i.items.forEach(l=>a.union(md(l,s))),i.role){case p2:case m2:case g2:t.reflow()}else u=t.changed(t.REM),t.visit(t.ADD,l=>{a.union(md(l,s))}),t.visit(t.MOD,l=>{u=u||a.alignsWith(l.bounds),n.dirty(l),a.union(md(l,s))}),u&&(a.clear(),i.items.forEach(l=>a.union(l.bounds)));return UD(i),t.modifies("bounds")}});function md(e,t,n){return t(e.bounds.clear(),e,n)}const QS=":vega_identifier:";function b2(e){D.call(this,0,e)}b2.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]};W(b2,D,{transform(e,t){const n=xq(t.dataflow),i=e.as;let r=n.value;return t.visit(t.ADD,o=>o[i]=o[i]||++r),n.set(this.value=r),t}});function xq(e){return e._signals[QS]||(e._signals[QS]=e.add(0))}function ZD(e){D.call(this,null,e)}W(ZD,D,{transform(e,t){let n=this.value;n||(n=t.dataflow.scenegraph().mark(e.markdef,wq(e),e.index),n.group.context=e.context,e.context.group||(e.context.group=n.group),n.source=this.source,n.clip=e.clip,n.interactive=e.interactive,this.value=n);const i=n.marktype===Wg?Og:Ng;return t.visit(t.ADD,r=>i.call(r,n)),(e.modified("clip")||e.modified("interactive"))&&(n.clip=e.clip,n.interactive=!!e.interactive,n.zdirty=!0,t.reflow()),n.items=t.source,t}});function wq(e){const t=e.groups,n=e.parent;return t&&t.size===1?t.get(Object.keys(t.object)[0]):t&&n?t.lookup(n):null}function eN(e){D.call(this,null,e)}const ZS={parity:e=>e.filter((t,n)=>n%2?t.opacity=0:1),greedy:(e,t)=>{let n;return e.filter((i,r)=>!r||!tN(n.bounds,i.bounds,t)?(n=i,1):i.opacity=0)}},tN=(e,t,n)=>n>Math.max(t.x1-e.x2,e.x1-t.x2,t.y1-e.y2,e.y1-t.y2),e$=(e,t)=>{for(var n=1,i=e.length,r=e[0].bounds,o;n{const t=e.bounds;return t.width()>1&&t.height()>1},_q=(e,t,n)=>{var i=e.range(),r=new nt;return t===Nu||t===Ho?r.set(i[0],-1/0,i[1],1/0):r.set(-1/0,i[0],1/0,i[1]),r.expand(n||1),o=>r.encloses(o.bounds)},t$=e=>(e.forEach(t=>t.opacity=1),e),n$=(e,t)=>e.reflow(t.modified()).modifies("opacity");W(eN,D,{transform(e,t){const n=ZS[e.method]||ZS.parity,i=e.separation||0;let r=t.materialize(t.SOURCE).source,o,s;if(!r||!r.length)return;if(!e.method)return e.modified("method")&&(t$(r),t=n$(t,e)),t;if(r=r.filter(Eq),!r.length)return;if(e.sort&&(r=r.slice().sort(e.sort)),o=t$(r),t=n$(t,e),o.length>=3&&e$(o,i)){do o=n(o,i);while(o.length>=3&&e$(o,i));o.length<3&&!xe(r).opacity&&(o.length>1&&(xe(o).opacity=0),xe(r).opacity=1)}e.boundScale&&e.boundTolerance>=0&&(s=_q(e.boundScale,e.boundOrient,+e.boundTolerance),r.forEach(u=>{s(u)||(u.opacity=0)}));const a=o[0].mark.bounds.clear();return r.forEach(u=>{u.opacity&&a.union(u.bounds)}),t}});function nN(e){D.call(this,null,e)}W(nN,D,{transform(e,t){const n=t.dataflow;if(t.visit(t.ALL,i=>n.dirty(i)),t.fields&&t.fields.zindex){const i=t.source&&t.source[0];i&&(i.mark.zdirty=!0)}}});const Ot=new nt;function ru(e,t,n){return e[t]===n?0:(e[t]=n,1)}function Sq(e){var t=e.items[0].orient;return t===vi||t===bi}function $q(e){let t=+e.grid;return[e.ticks?t++:-1,e.labels?t++:-1,t+ +e.domain]}function Aq(e,t,n,i){var r=t.items[0],o=r.datum,s=r.translate!=null?r.translate:.5,a=r.orient,u=$q(o),l=r.range,c=r.offset,f=r.position,d=r.minExtent,h=r.maxExtent,p=o.title&&r.items[u[2]].items[0],g=r.titlePadding,m=r.bounds,y=p&&Zx(p),v=0,b=0,x,w;switch(Ot.clear().union(m),m.clear(),(x=u[0])>-1&&m.union(r.items[x].bounds),(x=u[1])>-1&&m.union(r.items[x].bounds),a){case Nu:v=f||0,b=-c,w=Math.max(d,Math.min(h,-m.y1)),m.add(0,-w).add(l,0),p&&yd(e,p,w,g,y,0,-1,m);break;case vi:v=-c,b=f||0,w=Math.max(d,Math.min(h,-m.x1)),m.add(-w,0).add(0,l),p&&yd(e,p,w,g,y,1,-1,m);break;case bi:v=n+c,b=f||0,w=Math.max(d,Math.min(h,m.x2)),m.add(0,0).add(w,l),p&&yd(e,p,w,g,y,1,1,m);break;case Ho:v=f||0,b=i+c,w=Math.max(d,Math.min(h,m.y2)),m.add(0,0).add(l,w),p&&yd(e,p,w,g,0,0,1,m);break;default:v=r.x,b=r.y}return eo(m.translate(v,b),r),ru(r,"x",v+s)|ru(r,"y",b+s)&&(r.bounds=Ot,e.dirty(r),r.bounds=m,e.dirty(r)),r.mark.bounds.clear().union(m)}function yd(e,t,n,i,r,o,s,a){const u=t.bounds;if(t.auto){const l=s*(n+r+i);let c=0,f=0;e.dirty(t),o?c=(t.x||0)-(t.x=l):f=(t.y||0)-(t.y=l),t.mark.bounds.clear().union(u.translate(-c,-f)),e.dirty(t)}a.union(u)}const i$=(e,t)=>Math.floor(Math.min(e,t)),r$=(e,t)=>Math.ceil(Math.max(e,t));function kq(e){var t=e.items,n=t.length,i=0,r,o;const s={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;i1)for(E=0;E0&&(b[E]+=M/2);if(a&&qe(n.center,$o)&&c!==1)for(E=0;E0&&(x[E]+=C/2);for(E=0;Er&&(e.warn("Grid headers exceed limit: "+r),t=t.slice(0,r)),g+=o,v=0,x=t.length;v=0&&(E=n[b])==null;b-=d);a?(S=h==null?E.x:Math.round(E.bounds.x1+h*E.bounds.width()),$=g):(S=g,$=h==null?E.y:Math.round(E.bounds.y1+h*E.bounds.height())),w.union(_.bounds.translate(S-(_.x||0),$-(_.y||0))),_.x=S,_.y=$,e.dirty(_),m=s(m,w[l])}return m}function s$(e,t,n,i,r,o){if(t){e.dirty(t);var s=n,a=n;i?s=Math.round(r.x1+o*r.width()):a=Math.round(r.y1+o*r.height()),t.bounds.translate(s-(t.x||0),a-(t.y||0)),t.mark.bounds.clear().union(t.bounds),t.x=s,t.y=a,e.dirty(t)}}function Nq(e,t){const n=e[t]||{};return(i,r)=>n[i]!=null?n[i]:e[i]!=null?e[i]:r}function Oq(e,t){let n=-1/0;return e.forEach(i=>{i.offset!=null&&(n=Math.max(n,i.offset))}),n>-1/0?n:t}function Rq(e,t,n,i,r,o,s){const a=Nq(n,t),u=Oq(e,a("offset",0)),l=a("anchor",h2),c=l===Kt?1:l===xy?.5:0,f={align:wy,bounds:a("bounds",v2),columns:a("direction")==="vertical"?1:e.length,padding:a("margin",8),center:a("center"),nodirty:!0};switch(t){case vi:f.anchor={x:Math.floor(i.x1)-u,column:Kt,y:c*(s||i.height()+2*i.y1),row:l};break;case bi:f.anchor={x:Math.ceil(i.x2)+u,y:c*(s||i.height()+2*i.y1),row:l};break;case Nu:f.anchor={y:Math.floor(r.y1)-u,row:Kt,x:c*(o||r.width()+2*r.x1),column:l};break;case Ho:f.anchor={y:Math.ceil(r.y2)+u,x:c*(o||r.width()+2*r.x1),column:l};break;case lq:f.anchor={x:u,y:u};break;case cq:f.anchor={x:o-u,y:u,column:Kt};break;case fq:f.anchor={x:u,y:s-u,row:Kt};break;case dq:f.anchor={x:o-u,y:s-u,column:Kt,row:Kt};break}return f}function Lq(e,t){var n=t.items[0],i=n.datum,r=n.orient,o=n.bounds,s=n.x,a=n.y,u,l;return n._bounds?n._bounds.clear().union(o):n._bounds=o.clone(),o.clear(),Iq(e,n,n.items[0].items[0]),o=Pq(n,o),u=2*n.padding,l=2*n.padding,o.empty()||(u=Math.ceil(o.width()+u),l=Math.ceil(o.height()+l)),i.type===vq&&zq(n.items[0].items[0].items[0].items),r!==y2&&(n.x=s=0,n.y=a=0),n.width=u,n.height=l,eo(o.set(s,a,s+u,a+l),n),n.mark.bounds.clear().union(o),n}function Pq(e,t){return e.items.forEach(n=>t.union(n.bounds)),t.x1=e.padding,t.y1=e.padding,t}function Iq(e,t,n){var i=t.padding,r=i-n.x,o=i-n.y;if(!t.datum.title)(r||o)&&Rl(e,n,r,o);else{var s=t.items[1].items[0],a=s.anchor,u=t.titlePadding||0,l=i-s.x,c=i-s.y;switch(s.orient){case vi:r+=Math.ceil(s.bounds.width())+u;break;case bi:case Ho:break;default:o+=s.bounds.height()+u}switch((r||o)&&Rl(e,n,r,o),s.orient){case vi:c+=ja(t,n,s,a,1,1);break;case bi:l+=ja(t,n,s,Kt,0,0)+u,c+=ja(t,n,s,a,1,1);break;case Ho:l+=ja(t,n,s,a,0,0),c+=ja(t,n,s,Kt,-1,0,1)+u;break;default:l+=ja(t,n,s,a,0,0)}(l||c)&&Rl(e,s,l,c),(l=Math.round(s.bounds.x1-i))<0&&(Rl(e,n,-l,0),Rl(e,s,-l,0))}}function ja(e,t,n,i,r,o,s){const a=e.datum.type!=="symbol",u=n.datum.vgrad,l=a&&(o||!u)&&!s?t.items[0]:t,c=l.bounds[r?"y2":"x2"]-e.padding,f=u&&o?c:0,d=u&&o?0:c,h=r<=0?0:Zx(n);return Math.round(i===h2?f:i===Kt?d-h:.5*(c-h))}function Rl(e,t,n,i){t.x+=n,t.y+=i,t.bounds.translate(n,i),t.mark.bounds.translate(n,i),e.dirty(t)}function zq(e){const t=e.reduce((n,i)=>(n[i.column]=Math.max(i.bounds.x2-i.x,n[i.column]||0),n),{});e.forEach(n=>{n.width=t[n.column],n.height=n.bounds.y2-n.y})}function Bq(e,t,n,i,r){var o=t.items[0],s=o.frame,a=o.orient,u=o.anchor,l=o.offset,c=o.padding,f=o.items[0].items[0],d=o.items[1]&&o.items[1].items[0],h=a===vi||a===bi?i:n,p=0,g=0,m=0,y=0,v=0,b;if(s!==Wg?a===vi?(p=r.y2,h=r.y1):a===bi?(p=r.y1,h=r.y2):(p=r.x1,h=r.x2):a===vi&&(p=i,h=0),b=u===h2?p:u===Kt?h:(p+h)/2,d&&d.text){switch(a){case Nu:case Ho:v=f.bounds.height()+c;break;case vi:y=f.bounds.width()+c;break;case bi:y=-f.bounds.width()-c;break}Ot.clear().union(d.bounds),Ot.translate(y-(d.x||0),v-(d.y||0)),ru(d,"x",y)|ru(d,"y",v)&&(e.dirty(d),d.bounds.clear().union(Ot),d.mark.bounds.clear().union(Ot),e.dirty(d)),Ot.clear().union(d.bounds)}else Ot.clear();switch(Ot.union(f.bounds),a){case Nu:g=b,m=r.y1-Ot.height()-l;break;case vi:g=r.x1-Ot.width()-l,m=b;break;case bi:g=r.x2+Ot.width()+l,m=b;break;case Ho:g=b,m=r.y2+l;break;default:g=o.x,m=o.y}return ru(o,"x",g)|ru(o,"y",m)&&(Ot.translate(g,m),e.dirty(o),o.bounds.clear().union(Ot),t.bounds.clear().union(Ot),e.dirty(o)),o.bounds}function rN(e){D.call(this,null,e)}W(rN,D,{transform(e,t){const n=t.dataflow;return e.mark.items.forEach(i=>{e.layout&&Mq(n,i,e.layout),jq(n,i,e)}),Uq(e.mark.group)?t.reflow():t}});function Uq(e){return e&&e.mark.role!=="legend-entry"}function jq(e,t,n){var i=t.items,r=Math.max(0,t.width||0),o=Math.max(0,t.height||0),s=new nt().set(0,0,r,o),a=s.clone(),u=s.clone(),l=[],c,f,d,h,p,g;for(p=0,g=i.length;p{d=y.orient||bi,d!==y2&&(m[d]||(m[d]=[])).push(y)});for(const y in m){const v=m[y];iN(e,v,Rq(v,y,n.legends,a,u,r,o))}l.forEach(y=>{const v=y.bounds;if(v.equals(y._bounds)||(y.bounds=y._bounds,e.dirty(y),y.bounds=v,e.dirty(y)),n.autosize&&(n.autosize.type===VD||n.autosize.type===KD||n.autosize.type===JD))switch(y.orient){case vi:case bi:s.add(v.x1,0).add(v.x2,0);break;case Nu:case Ho:s.add(0,v.y1).add(0,v.y2)}else s.union(v)})}s.union(a).union(u),c&&s.union(Bq(e,c,r,o,s)),t.clip&&s.set(0,0,t.width||0,t.height||0),qq(e,t,s,n)}function qq(e,t,n,i){const r=i.autosize||{},o=r.type;if(e._autosize<1||!o)return;let s=e._width,a=e._height,u=Math.max(0,t.width||0),l=Math.max(0,Math.ceil(-n.x1)),c=Math.max(0,t.height||0),f=Math.max(0,Math.ceil(-n.y1));const d=Math.max(0,Math.ceil(n.x2-u)),h=Math.max(0,Math.ceil(n.y2-c));if(r.contains===yq){const p=e.padding();s-=p.left+p.right,a-=p.top+p.bottom}o===y2?(l=0,f=0,u=s,c=a):o===VD?(u=Math.max(0,s-l-d),c=Math.max(0,a-f-h)):o===KD?(u=Math.max(0,s-l-d),a=c+f+h):o===JD?(s=u+l+d,c=Math.max(0,a-f-h)):o===bq&&(s=u+l+d,a=c+f+h),e._resizeView(s,a,u,c,[l,f],r.resize)}const Wq=Object.freeze(Object.defineProperty({__proto__:null,bound:QD,identifier:b2,mark:ZD,overlap:eN,render:nN,viewlayout:rN},Symbol.toStringTag,{value:"Module"}));function oN(e){D.call(this,null,e)}W(oN,D,{transform(e,t){if(this.value&&!e.modified())return t.StopPropagation;var n=t.dataflow.locale(),i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=this.value,o=e.scale,s=e.count==null?e.values?e.values.length:10:e.count,a=Ox(o,s,e.minstep),u=e.format||LT(n,o,a,e.formatSpecifier,e.formatType,!!e.values),l=e.values?RT(o,e.values,a):Rx(o,a);return r&&(i.rem=r),r=l.map((c,f)=>Me({index:f/(l.length-1||1),value:c,label:u(c)})),e.extra&&r.length&&r.push(Me({index:-1,extra:{value:r[0].value},label:""})),i.source=r,i.add=r,this.value=r,i}});function sN(e){D.call(this,null,e)}function Hq(){return Me({})}function Gq(e){const t=nl().test(n=>n.exit);return t.lookup=n=>t.get(e(n)),t}W(sN,D,{transform(e,t){var n=t.dataflow,i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=e.item||Hq,o=e.key||ne,s=this.value;return P(i.encode)&&(i.encode=null),s&&(e.modified("key")||t.modified(o))&&R("DataJoin does not support modified key function or fields."),s||(t=t.addAll(),this.value=s=Gq(o)),t.visit(t.ADD,a=>{const u=o(a);let l=s.get(u);l?l.exit?(s.empty--,i.add.push(l)):i.mod.push(l):(l=r(a),s.set(u,l),i.add.push(l)),l.datum=a,l.exit=!1}),t.visit(t.MOD,a=>{const u=o(a),l=s.get(u);l&&(l.datum=a,i.mod.push(l))}),t.visit(t.REM,a=>{const u=o(a),l=s.get(u);a===l.datum&&!l.exit&&(i.rem.push(l),l.exit=!0,++s.empty)}),t.changed(t.ADD_MOD)&&i.modifies("datum"),(t.clean()||e.clean&&s.empty>n.cleanThreshold)&&n.runAfter(s.clean),i}});function aN(e){D.call(this,null,e)}W(aN,D,{transform(e,t){var n=t.fork(t.ADD_REM),i=e.mod||!1,r=e.encoders,o=t.encode;if(P(o))if(n.changed()||o.every(f=>r[f]))o=o[0],n.encode=null;else return t.StopPropagation;var s=o==="enter",a=r.update||co,u=r.enter||co,l=r.exit||co,c=(o&&!s?r[o]:a)||co;if(t.changed(t.ADD)&&(t.visit(t.ADD,f=>{u(f,e),a(f,e)}),n.modifies(u.output),n.modifies(a.output),c!==co&&c!==a&&(t.visit(t.ADD,f=>{c(f,e)}),n.modifies(c.output))),t.changed(t.REM)&&l!==co&&(t.visit(t.REM,f=>{l(f,e)}),n.modifies(l.output)),s||c!==co){const f=t.MOD|(e.modified()?t.REFLOW:0);s?(t.visit(f,d=>{const h=u(d,e)||i;(c(d,e)||h)&&n.mod.push(d)}),n.mod.length&&n.modifies(u.output)):t.visit(f,d=>{(c(d,e)||i)&&n.mod.push(d)}),n.mod.length&&n.modifies(c.output)}return n.changed()?n:t.StopPropagation}});function uN(e){D.call(this,[],e)}W(uN,D,{transform(e,t){if(this.value!=null&&!e.modified())return t.StopPropagation;var n=t.dataflow.locale(),i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=this.value,o=e.type||Xd,s=e.scale,a=+e.limit,u=Ox(s,e.count==null?5:e.count,e.minstep),l=!!e.values||o===Xd,c=e.format||BT(n,s,u,o,e.formatSpecifier,e.formatType,l),f=e.values||zT(s,u),d,h,p,g,m;return r&&(i.rem=r),o===Xd?(a&&f.length>a?(t.dataflow.warn("Symbol legend count exceeds limit, filtering items."),r=f.slice(0,a-1),m=!0):r=f,ce(p=e.size)?(!e.values&&s(r[0])===0&&(r=r.slice(1)),g=r.reduce((y,v)=>Math.max(y,p(v,e)),0)):p=Ht(g=p||8),r=r.map((y,v)=>Me({index:v,label:c(y,v,r),value:y,offset:g,size:p(y,e)})),m&&(m=f[r.length],r.push(Me({index:r.length,label:`…${f.length-r.length} entries`,value:m,offset:g,size:p(m,e)})))):o===bB?(d=s.domain(),h=DT(s,d[0],xe(d)),f.length<3&&!e.values&&d[0]!==xe(d)&&(f=[d[0],xe(d)]),r=f.map((y,v)=>Me({index:v,label:c(y,v,f),value:y,perc:h(y)}))):(p=f.length-1,h=MB(s),r=f.map((y,v)=>Me({index:v,label:c(y,v,f),value:y,perc:v?h(y):0,perc2:v===p?1:h(f[v+1])}))),i.source=r,i.add=r,this.value=r,i}});const Yq=e=>e.source.x,Xq=e=>e.source.y,Vq=e=>e.target.x,Kq=e=>e.target.y;function x2(e){D.call(this,{},e)}x2.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]};W(x2,D,{transform(e,t){var n=e.sourceX||Yq,i=e.sourceY||Xq,r=e.targetX||Vq,o=e.targetY||Kq,s=e.as||"path",a=e.orient||"vertical",u=e.shape||"line",l=a$.get(u+"-"+a)||a$.get(u);return l||R("LinkPath unsupported type: "+e.shape+(e.orient?"-"+e.orient:"")),t.visit(t.SOURCE,c=>{c[s]=l(n(c),i(c),r(c),o(c))}),t.reflow(e.modified()).modifies(s)}});const lN=(e,t,n,i)=>"M"+e+","+t+"L"+n+","+i,Jq=(e,t,n,i)=>lN(t*Math.cos(e),t*Math.sin(e),i*Math.cos(n),i*Math.sin(n)),cN=(e,t,n,i)=>{var r=n-e,o=i-t,s=Math.hypot(r,o)/2,a=180*Math.atan2(o,r)/Math.PI;return"M"+e+","+t+"A"+s+","+s+" "+a+" 0 1 "+n+","+i},Qq=(e,t,n,i)=>cN(t*Math.cos(e),t*Math.sin(e),i*Math.cos(n),i*Math.sin(n)),fN=(e,t,n,i)=>{const r=n-e,o=i-t,s=.2*(r+o),a=.2*(o-r);return"M"+e+","+t+"C"+(e+s)+","+(t+a)+" "+(n+a)+","+(i-s)+" "+n+","+i},Zq=(e,t,n,i)=>fN(t*Math.cos(e),t*Math.sin(e),i*Math.cos(n),i*Math.sin(n)),eW=(e,t,n,i)=>"M"+e+","+t+"V"+i+"H"+n,tW=(e,t,n,i)=>"M"+e+","+t+"H"+n+"V"+i,nW=(e,t,n,i)=>{const r=Math.cos(e),o=Math.sin(e),s=Math.cos(n),a=Math.sin(n),u=Math.abs(n-e)>Math.PI?n<=e:n>e;return"M"+t*r+","+t*o+"A"+t+","+t+" 0 0,"+(u?1:0)+" "+t*s+","+t*a+"L"+i*s+","+i*a},iW=(e,t,n,i)=>{const r=(e+n)/2;return"M"+e+","+t+"C"+r+","+t+" "+r+","+i+" "+n+","+i},rW=(e,t,n,i)=>{const r=(t+i)/2;return"M"+e+","+t+"C"+e+","+r+" "+n+","+r+" "+n+","+i},oW=(e,t,n,i)=>{const r=Math.cos(e),o=Math.sin(e),s=Math.cos(n),a=Math.sin(n),u=(t+i)/2;return"M"+t*r+","+t*o+"C"+u*r+","+u*o+" "+u*s+","+u*a+" "+i*s+","+i*a},a$=nl({line:lN,"line-radial":Jq,arc:cN,"arc-radial":Qq,curve:fN,"curve-radial":Zq,"orthogonal-horizontal":eW,"orthogonal-vertical":tW,"orthogonal-radial":nW,"diagonal-horizontal":iW,"diagonal-vertical":rW,"diagonal-radial":oW});function w2(e){D.call(this,null,e)}w2.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]};W(w2,D,{transform(e,t){var n=e.as||["startAngle","endAngle"],i=n[0],r=n[1],o=e.field||Zu,s=e.startAngle||0,a=e.endAngle!=null?e.endAngle:2*Math.PI,u=t.source,l=u.map(o),c=l.length,f=s,d=(a-s)/FF(l),h=Dn(c),p,g,m;for(e.sort&&h.sort((y,v)=>l[y]-l[v]),p=0;p-1)return i;var r=t.domain,o=e.type,s=t.zero||t.zero===void 0&&aW(e),a,u;if(!r)return 0;if(dN(o)&&t.padding&&r[0]!==xe(r)&&(r=hW(o,r,t.range,t.padding,t.exponent,t.constant)),(s||t.domainMin!=null||t.domainMax!=null||t.domainMid!=null)&&(a=(r=r.slice()).length-1||1,s&&(r[0]>0&&(r[0]=0),r[a]<0&&(r[a]=0)),t.domainMin!=null&&(r[0]=t.domainMin),t.domainMax!=null&&(r[a]=t.domainMax),t.domainMid!=null)){u=t.domainMid;const l=u>r[a]?a+1:ur+(o<0?-1:o>0?1:0),0));i!==t.length&&n.warn("Log scale domain includes zero: "+H(t))}return t}function pW(e,t,n){let i=t.bins;if(i&&!P(i)){const r=e.domain(),o=r[0],s=xe(r),a=i.step;let u=i.start==null?o:i.start,l=i.stop==null?s:i.stop;a||R("Scale bins parameter missing step property."),us&&(l=a*Math.floor(s/a)),i=Dn(u,l+a/2,a)}return i?e.bins=i:e.bins&&delete e.bins,e.type===Cx&&(i?!t.domain&&!t.domainRaw&&(e.domain(i),n=i.length):e.bins=e.domain()),n}function gW(e,t,n){var i=e.type,r=t.round||!1,o=t.range;if(t.rangeStep!=null)o=mW(i,t,n);else if(t.scheme&&(o=yW(i,t,n),ce(o))){if(e.interpolator)return e.interpolator(o);R(`Scale type ${i} does not support interpolating color schemes.`)}if(o&&CT(i))return e.interpolator(Tg(Ey(o,t.reverse),t.interpolate,t.interpolateGamma));o&&t.interpolate&&e.interpolate?e.interpolate(Dx(t.interpolate,t.interpolateGamma)):ce(e.round)?e.round(r):ce(e.rangeRound)&&e.interpolate(r?Ef:is),o&&e.range(Ey(o,t.reverse))}function mW(e,t,n){e!==wT&&e!==sy&&R("Only band and point scales support rangeStep.");var i=(t.paddingOuter!=null?t.paddingOuter:t.padding)||0,r=e===sy?1:(t.paddingInner!=null?t.paddingInner:t.padding)||0;return[0,t.rangeStep*Ax(n,r,i)]}function yW(e,t,n){var i=t.schemeExtent,r,o;return P(t.scheme)?o=Tg(t.scheme,t.interpolate,t.interpolateGamma):(r=t.scheme.toLowerCase(),o=Nx(r),o||R(`Unrecognized scheme name: ${t.scheme}`)),n=e===Mg?n+1:e===Cx?n-1:e===Cu||e===Fg?+t.schemeCount||sW:n,CT(e)?u$(o,i,t.reverse):ce(o)?TT(u$(o,i),n):e===kx?o:o.slice(0,n)}function u$(e,t,n){return ce(e)&&(t||n)?MT(e,Ey(t||[0,1],n)):e}function Ey(e,t){return t?e.slice().reverse():e}function gN(e){D.call(this,null,e)}W(gN,D,{transform(e,t){const n=e.modified("sort")||t.changed(t.ADD)||t.modified(e.sort.fields)||t.modified("datum");return n&&t.source.sort(_a(e.sort)),this.modified(n),t}});const l$="zero",mN="center",yN="normalize",vN=["y0","y1"];function E2(e){D.call(this,null,e)}E2.Definition={type:"Stack",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"groupby",type:"field",array:!0},{name:"sort",type:"compare"},{name:"offset",type:"enum",default:l$,values:[l$,mN,yN]},{name:"as",type:"string",array:!0,length:2,default:vN}]};W(E2,D,{transform(e,t){var n=e.as||vN,i=n[0],r=n[1],o=_a(e.sort),s=e.field||Zu,a=e.offset===mN?vW:e.offset===yN?bW:xW,u,l,c,f;for(u=wW(t.source,e.groupby,o,s),l=0,c=u.length,f=u.max;lg(c),s,a,u,l,c,f,d,h,p;if(t==null)r.push(e.slice());else for(s={},a=0,u=e.length;ap&&(p=h),n&&d.sort(n)}return r.max=p,r}const EW=Object.freeze(Object.defineProperty({__proto__:null,axisticks:oN,datajoin:sN,encode:aN,legendentries:uN,linkpath:x2,pie:w2,scale:hN,sortitems:gN,stack:E2},Symbol.toStringTag,{value:"Module"}));var oe=1e-6,Xh=1e-12,ge=Math.PI,Ke=ge/2,Vh=ge/4,sn=ge*2,Qe=180/ge,he=ge/180,be=Math.abs,dl=Math.atan,ii=Math.atan2,se=Math.cos,bd=Math.ceil,bN=Math.exp,_y=Math.hypot,Kh=Math.log,D0=Math.pow,ie=Math.sin,Xn=Math.sign||function(e){return e>0?1:e<0?-1:0},an=Math.sqrt,_2=Math.tan;function xN(e){return e>1?0:e<-1?ge:Math.acos(e)}function wn(e){return e>1?Ke:e<-1?-Ke:Math.asin(e)}function St(){}function Jh(e,t){e&&f$.hasOwnProperty(e.type)&&f$[e.type](e,t)}var c$={Feature:function(e,t){Jh(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i=0?1:-1,r=i*n,o=se(t),s=ie(t),a=ky*s,u=Ay*o+a*se(r),l=a*i*ie(r);Qh.add(ii(l,u)),$y=e,Ay=o,ky=s}function AW(e){return Zh=new nn,Or(e,ar),Zh*2}function ep(e){return[ii(e[1],e[0]),wn(e[2])]}function ia(e){var t=e[0],n=e[1],i=se(n);return[i*se(t),i*ie(t),ie(n)]}function xd(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Ou(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function N0(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function wd(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function tp(e){var t=an(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var Ge,hn,Ye,Fn,Ms,SN,$N,fu,_c,mo,Jr,Tr={point:Cy,lineStart:h$,lineEnd:p$,polygonStart:function(){Tr.point=kN,Tr.lineStart=kW,Tr.lineEnd=CW,_c=new nn,ar.polygonStart()},polygonEnd:function(){ar.polygonEnd(),Tr.point=Cy,Tr.lineStart=h$,Tr.lineEnd=p$,Qh<0?(Ge=-(Ye=180),hn=-(Fn=90)):_c>oe?Fn=90:_c<-oe&&(hn=-90),Jr[0]=Ge,Jr[1]=Ye},sphere:function(){Ge=-(Ye=180),hn=-(Fn=90)}};function Cy(e,t){mo.push(Jr=[Ge=e,Ye=e]),tFn&&(Fn=t)}function AN(e,t){var n=ia([e*he,t*he]);if(fu){var i=Ou(fu,n),r=[i[1],-i[0],0],o=Ou(r,i);tp(o),o=ep(o);var s=e-Ms,a=s>0?1:-1,u=o[0]*Qe*a,l,c=be(s)>180;c^(a*MsFn&&(Fn=l)):(u=(u+360)%360-180,c^(a*MsFn&&(Fn=t))),c?eCn(Ge,Ye)&&(Ye=e):Cn(e,Ye)>Cn(Ge,Ye)&&(Ge=e):Ye>=Ge?(eYe&&(Ye=e)):e>Ms?Cn(Ge,e)>Cn(Ge,Ye)&&(Ye=e):Cn(e,Ye)>Cn(Ge,Ye)&&(Ge=e)}else mo.push(Jr=[Ge=e,Ye=e]);tFn&&(Fn=t),fu=n,Ms=e}function h$(){Tr.point=AN}function p$(){Jr[0]=Ge,Jr[1]=Ye,Tr.point=Cy,fu=null}function kN(e,t){if(fu){var n=e-Ms;_c.add(be(n)>180?n+(n>0?360:-360):n)}else SN=e,$N=t;ar.point(e,t),AN(e,t)}function kW(){ar.lineStart()}function CW(){kN(SN,$N),ar.lineEnd(),be(_c)>oe&&(Ge=-(Ye=180)),Jr[0]=Ge,Jr[1]=Ye,fu=null}function Cn(e,t){return(t-=e)<0?t+360:t}function FW(e,t){return e[0]-t[0]}function g$(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tCn(i[0],i[1])&&(i[1]=r[1]),Cn(r[0],i[1])>Cn(i[0],i[1])&&(i[0]=r[0])):o.push(i=r);for(s=-1/0,n=o.length-1,t=0,i=o[n];t<=n;i=r,++t)r=o[t],(a=Cn(i[1],r[0]))>s&&(s=a,Ge=r[0],Ye=i[1])}return mo=Jr=null,Ge===1/0||hn===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ge,hn],[Ye,Fn]]}var oc,np,ip,rp,op,sp,ap,up,Fy,My,Ty,CN,FN,Jt,Qt,Zt,xi={sphere:St,point:S2,lineStart:m$,lineEnd:y$,polygonStart:function(){xi.lineStart=NW,xi.lineEnd=OW},polygonEnd:function(){xi.lineStart=m$,xi.lineEnd=y$}};function S2(e,t){e*=he,t*=he;var n=se(t);Rf(n*se(e),n*ie(e),ie(t))}function Rf(e,t,n){++oc,ip+=(e-ip)/oc,rp+=(t-rp)/oc,op+=(n-op)/oc}function m$(){xi.point=TW}function TW(e,t){e*=he,t*=he;var n=se(t);Jt=n*se(e),Qt=n*ie(e),Zt=ie(t),xi.point=DW,Rf(Jt,Qt,Zt)}function DW(e,t){e*=he,t*=he;var n=se(t),i=n*se(e),r=n*ie(e),o=ie(t),s=ii(an((s=Qt*o-Zt*r)*s+(s=Zt*i-Jt*o)*s+(s=Jt*r-Qt*i)*s),Jt*i+Qt*r+Zt*o);np+=s,sp+=s*(Jt+(Jt=i)),ap+=s*(Qt+(Qt=r)),up+=s*(Zt+(Zt=o)),Rf(Jt,Qt,Zt)}function y$(){xi.point=S2}function NW(){xi.point=RW}function OW(){MN(CN,FN),xi.point=S2}function RW(e,t){CN=e,FN=t,e*=he,t*=he,xi.point=MN;var n=se(t);Jt=n*se(e),Qt=n*ie(e),Zt=ie(t),Rf(Jt,Qt,Zt)}function MN(e,t){e*=he,t*=he;var n=se(t),i=n*se(e),r=n*ie(e),o=ie(t),s=Qt*o-Zt*r,a=Zt*i-Jt*o,u=Jt*r-Qt*i,l=_y(s,a,u),c=wn(l),f=l&&-c/l;Fy.add(f*s),My.add(f*a),Ty.add(f*u),np+=c,sp+=c*(Jt+(Jt=i)),ap+=c*(Qt+(Qt=r)),up+=c*(Zt+(Zt=o)),Rf(Jt,Qt,Zt)}function LW(e){oc=np=ip=rp=op=sp=ap=up=0,Fy=new nn,My=new nn,Ty=new nn,Or(e,xi);var t=+Fy,n=+My,i=+Ty,r=_y(t,n,i);return rge&&(e-=Math.round(e/sn)*sn),[e,t]}Ny.invert=Ny;function TN(e,t,n){return(e%=sn)?t||n?Dy(b$(e),x$(t,n)):b$(e):t||n?x$(t,n):Ny}function v$(e){return function(t,n){return t+=e,be(t)>ge&&(t-=Math.round(t/sn)*sn),[t,n]}}function b$(e){var t=v$(e);return t.invert=v$(-e),t}function x$(e,t){var n=se(e),i=ie(e),r=se(t),o=ie(t);function s(a,u){var l=se(u),c=se(a)*l,f=ie(a)*l,d=ie(u),h=d*n+c*i;return[ii(f*r-h*o,c*n-d*i),wn(h*r+f*o)]}return s.invert=function(a,u){var l=se(u),c=se(a)*l,f=ie(a)*l,d=ie(u),h=d*r-f*o;return[ii(f*r+d*o,c*n+h*i),wn(h*n-c*i)]},s}function PW(e){e=TN(e[0]*he,e[1]*he,e.length>2?e[2]*he:0);function t(n){return n=e(n[0]*he,n[1]*he),n[0]*=Qe,n[1]*=Qe,n}return t.invert=function(n){return n=e.invert(n[0]*he,n[1]*he),n[0]*=Qe,n[1]*=Qe,n},t}function IW(e,t,n,i,r,o){if(n){var s=se(t),a=ie(t),u=i*n;r==null?(r=t+i*sn,o=t-u/2):(r=w$(s,r),o=w$(s,o),(i>0?ro)&&(r+=i*sn));for(var l,c=r;i>0?c>o:c1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function nh(e,t){return be(e[0]-t[0])=0;--a)r.point((f=c[a])[0],f[1]);else i(d.x,d.p.x,-1,r);d=d.p}d=d.o,c=d.z,h=!h}while(!d.v);r.lineEnd()}}}function E$(e){if(t=e.length){for(var t,n=0,i=e[0],r;++n=0?1:-1,F=$*S,k=F>ge,N=m*_;if(u.add(ii(N*$*ie(F),y*E+N*se(F))),s+=k?S+$*sn:S,k^p>=n^x>=n){var A=Ou(ia(h),ia(b));tp(A);var M=Ou(o,A);tp(M);var C=(k^S>=0?-1:1)*wn(M[2]);(i>C||i===C&&(A[0]||A[1]))&&(a+=k^S>=0?1:-1)}}return(s<-oe||s0){for(u||(r.polygonStart(),u=!0),r.lineStart(),_=0;_1&&x&2&&w.push(w.pop().concat(w.shift())),c.push(w.filter(BW))}}return d}}function BW(e){return e.length>1}function UW(e,t){return((e=e.x)[0]<0?e[1]-Ke-oe:Ke-e[1])-((t=t.x)[0]<0?t[1]-Ke-oe:Ke-t[1])}const _$=ON(function(){return!0},jW,WW,[-ge,-Ke]);function jW(e){var t=NaN,n=NaN,i=NaN,r;return{lineStart:function(){e.lineStart(),r=1},point:function(o,s){var a=o>0?ge:-ge,u=be(o-t);be(u-ge)0?Ke:-Ke),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(a,n),e.point(o,n),r=0):i!==a&&u>=ge&&(be(t-i)oe?dl((ie(t)*(o=se(i))*ie(n)-ie(i)*(r=se(t))*ie(e))/(r*o*s)):(t+i)/2}function WW(e,t,n,i){var r;if(e==null)r=n*Ke,i.point(-ge,r),i.point(0,r),i.point(ge,r),i.point(ge,0),i.point(ge,-r),i.point(0,-r),i.point(-ge,-r),i.point(-ge,0),i.point(-ge,r);else if(be(e[0]-t[0])>oe){var o=e[0]0,r=be(t)>oe;function o(c,f,d,h){IW(h,e,n,d,c,f)}function s(c,f){return se(c)*se(f)>t}function a(c){var f,d,h,p,g;return{lineStart:function(){p=h=!1,g=1},point:function(m,y){var v=[m,y],b,x=s(m,y),w=i?x?0:l(m,y):x?l(m+(m<0?ge:-ge),y):0;if(!f&&(p=h=x)&&c.lineStart(),x!==h&&(b=u(f,v),(!b||nh(f,b)||nh(v,b))&&(v[2]=1)),x!==h)g=0,x?(c.lineStart(),b=u(v,f),c.point(b[0],b[1])):(b=u(f,v),c.point(b[0],b[1],2),c.lineEnd()),f=b;else if(r&&f&&i^x){var _;!(w&d)&&(_=u(v,f,!0))&&(g=0,i?(c.lineStart(),c.point(_[0][0],_[0][1]),c.point(_[1][0],_[1][1]),c.lineEnd()):(c.point(_[1][0],_[1][1]),c.lineEnd(),c.lineStart(),c.point(_[0][0],_[0][1],3)))}x&&(!f||!nh(f,v))&&c.point(v[0],v[1]),f=v,h=x,d=w},lineEnd:function(){h&&c.lineEnd(),f=null},clean:function(){return g|(p&&h)<<1}}}function u(c,f,d){var h=ia(c),p=ia(f),g=[1,0,0],m=Ou(h,p),y=xd(m,m),v=m[0],b=y-v*v;if(!b)return!d&&c;var x=t*y/b,w=-t*v/b,_=Ou(g,m),E=wd(g,x),S=wd(m,w);N0(E,S);var $=_,F=xd(E,$),k=xd($,$),N=F*F-k*(xd(E,E)-1);if(!(N<0)){var A=an(N),M=wd($,(-F-A)/k);if(N0(M,E),M=ep(M),!d)return M;var C=c[0],T=f[0],L=c[1],I=f[1],z;T0^M[1]<(be(M[0]-C)ge^(C<=M[0]&&M[0]<=T)){var _e=wd($,(-F+A)/k);return N0(_e,E),[M,ep(_e)]}}}function l(c,f){var d=i?e:ge-e,h=0;return c<-d?h|=1:c>d&&(h|=2),f<-d?h|=4:f>d&&(h|=8),h}return ON(s,a,o,i?[0,-e]:[-ge,e-ge])}function GW(e,t,n,i,r,o){var s=e[0],a=e[1],u=t[0],l=t[1],c=0,f=1,d=u-s,h=l-a,p;if(p=n-s,!(!d&&p>0)){if(p/=d,d<0){if(p0){if(p>f)return;p>c&&(c=p)}if(p=r-s,!(!d&&p<0)){if(p/=d,d<0){if(p>f)return;p>c&&(c=p)}else if(d>0){if(p0)){if(p/=h,h<0){if(p0){if(p>f)return;p>c&&(c=p)}if(p=o-a,!(!h&&p<0)){if(p/=h,h<0){if(p>f)return;p>c&&(c=p)}else if(h>0){if(p0&&(e[0]=s+c*d,e[1]=a+c*h),f<1&&(t[0]=s+f*d,t[1]=a+f*h),!0}}}}}var sc=1e9,_d=-sc;function RN(e,t,n,i){function r(l,c){return e<=l&&l<=n&&t<=c&&c<=i}function o(l,c,f,d){var h=0,p=0;if(l==null||(h=s(l,f))!==(p=s(c,f))||u(l,c)<0^f>0)do d.point(h===0||h===3?e:n,h>1?i:t);while((h=(h+f+4)%4)!==p);else d.point(c[0],c[1])}function s(l,c){return be(l[0]-e)0?0:3:be(l[0]-n)0?2:1:be(l[1]-t)0?1:0:c>0?3:2}function a(l,c){return u(l.x,c.x)}function u(l,c){var f=s(l,1),d=s(c,1);return f!==d?f-d:f===0?c[1]-l[1]:f===1?l[0]-c[0]:f===2?l[1]-c[1]:c[0]-l[0]}return function(l){var c=l,f=DN(),d,h,p,g,m,y,v,b,x,w,_,E={point:S,lineStart:N,lineEnd:A,polygonStart:F,polygonEnd:k};function S(C,T){r(C,T)&&c.point(C,T)}function $(){for(var C=0,T=0,L=h.length;Ti&&(me-fe)*(i-_e)>(Ie-_e)*(e-fe)&&++C:Ie<=i&&(me-fe)*(i-_e)<(Ie-_e)*(e-fe)&&--C;return C}function F(){c=f,d=[],h=[],_=!0}function k(){var C=$(),T=_&&C,L=(d=CF(d)).length;(T||L)&&(l.polygonStart(),T&&(l.lineStart(),o(null,null,1,l),l.lineEnd()),L&&NN(d,a,C,o,l),l.polygonEnd()),c=l,d=h=p=null}function N(){E.point=M,h&&h.push(p=[]),w=!0,x=!1,v=b=NaN}function A(){d&&(M(g,m),y&&x&&f.rejoin(),d.push(f.result())),E.point=S,x&&c.lineEnd()}function M(C,T){var L=r(C,T);if(h&&p.push([C,T]),w)g=C,m=T,y=L,w=!1,L&&(c.lineStart(),c.point(C,T));else if(L&&x)c.point(C,T);else{var I=[v=Math.max(_d,Math.min(sc,v)),b=Math.max(_d,Math.min(sc,b))],z=[C=Math.max(_d,Math.min(sc,C)),T=Math.max(_d,Math.min(sc,T))];GW(I,z,e,t,n,i)?(x||(c.lineStart(),c.point(I[0],I[1])),c.point(z[0],z[1]),L||c.lineEnd(),_=!1):L&&(c.lineStart(),c.point(C,T),_=!1)}v=C,b=T,x=L}return E}}function S$(e,t,n){var i=Dn(e,t-oe,n).concat(t);return function(r){return i.map(function(o){return[r,o]})}}function $$(e,t,n){var i=Dn(e,t-oe,n).concat(t);return function(r){return i.map(function(o){return[o,r]})}}function YW(){var e,t,n,i,r,o,s,a,u=10,l=u,c=90,f=360,d,h,p,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:v()}}function v(){return Dn(bd(i/c)*c,n,c).map(p).concat(Dn(bd(a/f)*f,s,f).map(g)).concat(Dn(bd(t/u)*u,e,u).filter(function(b){return be(b%c)>oe}).map(d)).concat(Dn(bd(o/l)*l,r,l).filter(function(b){return be(b%f)>oe}).map(h))}return y.lines=function(){return v().map(function(b){return{type:"LineString",coordinates:b}})},y.outline=function(){return{type:"Polygon",coordinates:[p(i).concat(g(s).slice(1),p(n).reverse().slice(1),g(a).reverse().slice(1))]}},y.extent=function(b){return arguments.length?y.extentMajor(b).extentMinor(b):y.extentMinor()},y.extentMajor=function(b){return arguments.length?(i=+b[0][0],n=+b[1][0],a=+b[0][1],s=+b[1][1],i>n&&(b=i,i=n,n=b),a>s&&(b=a,a=s,s=b),y.precision(m)):[[i,a],[n,s]]},y.extentMinor=function(b){return arguments.length?(t=+b[0][0],e=+b[1][0],o=+b[0][1],r=+b[1][1],t>e&&(b=t,t=e,e=b),o>r&&(b=o,o=r,r=b),y.precision(m)):[[t,o],[e,r]]},y.step=function(b){return arguments.length?y.stepMajor(b).stepMinor(b):y.stepMinor()},y.stepMajor=function(b){return arguments.length?(c=+b[0],f=+b[1],y):[c,f]},y.stepMinor=function(b){return arguments.length?(u=+b[0],l=+b[1],y):[u,l]},y.precision=function(b){return arguments.length?(m=+b,d=S$(o,r,90),h=$$(t,e,m),p=S$(a,s,90),g=$$(i,n,m),y):m},y.extentMajor([[-180,-90+oe],[180,90-oe]]).extentMinor([[-180,-80-oe],[180,80+oe]])}const Vc=e=>e;var R0=new nn,Oy=new nn,LN,PN,Ry,Ly,Rr={point:St,lineStart:St,lineEnd:St,polygonStart:function(){Rr.lineStart=XW,Rr.lineEnd=KW},polygonEnd:function(){Rr.lineStart=Rr.lineEnd=Rr.point=St,R0.add(be(Oy)),Oy=new nn},result:function(){var e=R0/2;return R0=new nn,e}};function XW(){Rr.point=VW}function VW(e,t){Rr.point=IN,LN=Ry=e,PN=Ly=t}function IN(e,t){Oy.add(Ly*e-Ry*t),Ry=e,Ly=t}function KW(){IN(LN,PN)}var Ru=1/0,lp=Ru,Kc=-Ru,cp=Kc,fp={point:JW,lineStart:St,lineEnd:St,polygonStart:St,polygonEnd:St,result:function(){var e=[[Ru,lp],[Kc,cp]];return Kc=cp=-(lp=Ru=1/0),e}};function JW(e,t){eKc&&(Kc=e),tcp&&(cp=t)}var Py=0,Iy=0,ac=0,dp=0,hp=0,ou=0,zy=0,By=0,uc=0,zN,BN,Xi,Vi,Gn={point:ra,lineStart:A$,lineEnd:k$,polygonStart:function(){Gn.lineStart=eH,Gn.lineEnd=tH},polygonEnd:function(){Gn.point=ra,Gn.lineStart=A$,Gn.lineEnd=k$},result:function(){var e=uc?[zy/uc,By/uc]:ou?[dp/ou,hp/ou]:ac?[Py/ac,Iy/ac]:[NaN,NaN];return Py=Iy=ac=dp=hp=ou=zy=By=uc=0,e}};function ra(e,t){Py+=e,Iy+=t,++ac}function A$(){Gn.point=QW}function QW(e,t){Gn.point=ZW,ra(Xi=e,Vi=t)}function ZW(e,t){var n=e-Xi,i=t-Vi,r=an(n*n+i*i);dp+=r*(Xi+e)/2,hp+=r*(Vi+t)/2,ou+=r,ra(Xi=e,Vi=t)}function k$(){Gn.point=ra}function eH(){Gn.point=nH}function tH(){UN(zN,BN)}function nH(e,t){Gn.point=UN,ra(zN=Xi=e,BN=Vi=t)}function UN(e,t){var n=e-Xi,i=t-Vi,r=an(n*n+i*i);dp+=r*(Xi+e)/2,hp+=r*(Vi+t)/2,ou+=r,r=Vi*e-Xi*t,zy+=r*(Xi+e),By+=r*(Vi+t),uc+=r*3,ra(Xi=e,Vi=t)}function jN(e){this._context=e}jN.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,sn);break}}},result:St};var Uy=new nn,L0,qN,WN,lc,cc,Jc={point:St,lineStart:function(){Jc.point=iH},lineEnd:function(){L0&&HN(qN,WN),Jc.point=St},polygonStart:function(){L0=!0},polygonEnd:function(){L0=null},result:function(){var e=+Uy;return Uy=new nn,e}};function iH(e,t){Jc.point=HN,qN=lc=e,WN=cc=t}function HN(e,t){lc-=e,cc-=t,Uy.add(an(lc*lc+cc*cc)),lc=e,cc=t}let C$,pp,F$,M$;class T${constructor(t){this._append=t==null?GN:rH(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==F$||this._append!==pp){const i=this._radius,r=this._;this._="",this._append`m0,${i}a${i},${i} 0 1,1 0,${-2*i}a${i},${i} 0 1,1 0,${2*i}z`,F$=i,pp=this._append,M$=this._,this._=r}this._+=M$;break}}}result(){const t=this._;return this._="",t.length?t:null}}function GN(e){let t=1;this._+=e[0];for(const n=e.length;t=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return GN;if(t!==C$){const n=10**t;C$=t,pp=function(r){let o=1;this._+=r[0];for(const s=r.length;o=0))throw new RangeError(`invalid digits: ${a}`);n=u}return t===null&&(o=new T$(n)),s},s.projection(e).digits(n).context(t)}function Hg(e){return function(t){var n=new jy;for(var i in e)n[i]=e[i];return n.stream=t,n}}function jy(){}jy.prototype={constructor:jy,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function $2(e,t,n){var i=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),i!=null&&e.clipExtent(null),Or(n,e.stream(fp)),t(fp.result()),i!=null&&e.clipExtent(i),e}function Gg(e,t,n){return $2(e,function(i){var r=t[1][0]-t[0][0],o=t[1][1]-t[0][1],s=Math.min(r/(i[1][0]-i[0][0]),o/(i[1][1]-i[0][1])),a=+t[0][0]+(r-s*(i[1][0]+i[0][0]))/2,u=+t[0][1]+(o-s*(i[1][1]+i[0][1]))/2;e.scale(150*s).translate([a,u])},n)}function A2(e,t,n){return Gg(e,[[0,0],t],n)}function k2(e,t,n){return $2(e,function(i){var r=+t,o=r/(i[1][0]-i[0][0]),s=(r-o*(i[1][0]+i[0][0]))/2,a=-o*i[0][1];e.scale(150*o).translate([s,a])},n)}function C2(e,t,n){return $2(e,function(i){var r=+t,o=r/(i[1][1]-i[0][1]),s=-o*i[0][0],a=(r-o*(i[1][1]+i[0][1]))/2;e.scale(150*o).translate([s,a])},n)}var D$=16,oH=se(30*he);function N$(e,t){return+t?aH(e,t):sH(e)}function sH(e){return Hg({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function aH(e,t){function n(i,r,o,s,a,u,l,c,f,d,h,p,g,m){var y=l-i,v=c-r,b=y*y+v*v;if(b>4*t&&g--){var x=s+d,w=a+h,_=u+p,E=an(x*x+w*w+_*_),S=wn(_/=E),$=be(be(_)-1)t||be((y*A+v*M)/b-.5)>.3||s*d+a*h+u*p2?C[2]%360*he:0,A()):[a*Qe,u*Qe,l*Qe]},k.angle=function(C){return arguments.length?(f=C%360*he,A()):f*Qe},k.reflectX=function(C){return arguments.length?(d=C?-1:1,A()):d<0},k.reflectY=function(C){return arguments.length?(h=C?-1:1,A()):h<0},k.precision=function(C){return arguments.length?(_=N$(E,w=C*C),M()):an(w)},k.fitExtent=function(C,T){return Gg(k,C,T)},k.fitSize=function(C,T){return A2(k,C,T)},k.fitWidth=function(C,T){return k2(k,C,T)},k.fitHeight=function(C,T){return C2(k,C,T)};function A(){var C=O$(n,0,0,d,h,f).apply(null,t(o,s)),T=O$(n,i-C[0],r-C[1],d,h,f);return c=TN(a,u,l),E=Dy(t,T),S=Dy(c,E),_=N$(E,w),M()}function M(){return $=F=null,k}return function(){return t=e.apply(this,arguments),k.invert=t.invert&&N,A()}}function F2(e){var t=0,n=ge/3,i=XN(e),r=i(t,n);return r.parallels=function(o){return arguments.length?i(t=o[0]*he,n=o[1]*he):[t*Qe,n*Qe]},r}function fH(e){var t=se(e);function n(i,r){return[i*t,ie(r)/t]}return n.invert=function(i,r){return[i/t,wn(r*t)]},n}function dH(e,t){var n=ie(e),i=(n+ie(t))/2;if(be(i)=.12&&m<.234&&g>=-.425&&g<-.214?r:m>=.166&&m<.234&&g>=-.214&&g<-.115?s:n).invert(d)},c.stream=function(d){return e&&t===d?e:e=hH([n.stream(t=d),r.stream(d),s.stream(d)])},c.precision=function(d){return arguments.length?(n.precision(d),r.precision(d),s.precision(d),f()):n.precision()},c.scale=function(d){return arguments.length?(n.scale(d),r.scale(d*.35),s.scale(d),c.translate(n.translate())):n.scale()},c.translate=function(d){if(!arguments.length)return n.translate();var h=n.scale(),p=+d[0],g=+d[1];return i=n.translate(d).clipExtent([[p-.455*h,g-.238*h],[p+.455*h,g+.238*h]]).stream(l),o=r.translate([p-.307*h,g+.201*h]).clipExtent([[p-.425*h+oe,g+.12*h+oe],[p-.214*h-oe,g+.234*h-oe]]).stream(l),a=s.translate([p-.205*h,g+.212*h]).clipExtent([[p-.214*h+oe,g+.166*h+oe],[p-.115*h-oe,g+.234*h-oe]]).stream(l),f()},c.fitExtent=function(d,h){return Gg(c,d,h)},c.fitSize=function(d,h){return A2(c,d,h)},c.fitWidth=function(d,h){return k2(c,d,h)},c.fitHeight=function(d,h){return C2(c,d,h)};function f(){return e=t=null,c}return c.scale(1070)}function KN(e){return function(t,n){var i=se(t),r=se(n),o=e(i*r);return o===1/0?[2,0]:[o*r*ie(t),o*ie(n)]}}function Lf(e){return function(t,n){var i=an(t*t+n*n),r=e(i),o=ie(r),s=se(r);return[ii(t*o,i*s),wn(i&&n*o/i)]}}var JN=KN(function(e){return an(2/(1+e))});JN.invert=Lf(function(e){return 2*wn(e/2)});function gH(){return gr(JN).scale(124.75).clipAngle(180-.001)}var QN=KN(function(e){return(e=xN(e))&&e/ie(e)});QN.invert=Lf(function(e){return e});function mH(){return gr(QN).scale(79.4188).clipAngle(180-.001)}function Yg(e,t){return[e,Kh(_2((Ke+t)/2))]}Yg.invert=function(e,t){return[e,2*dl(bN(t))-Ke]};function yH(){return ZN(Yg).scale(961/sn)}function ZN(e){var t=gr(e),n=t.center,i=t.scale,r=t.translate,o=t.clipExtent,s=null,a,u,l;t.scale=function(f){return arguments.length?(i(f),c()):i()},t.translate=function(f){return arguments.length?(r(f),c()):r()},t.center=function(f){return arguments.length?(n(f),c()):n()},t.clipExtent=function(f){return arguments.length?(f==null?s=a=u=l=null:(s=+f[0][0],a=+f[0][1],u=+f[1][0],l=+f[1][1]),c()):s==null?null:[[s,a],[u,l]]};function c(){var f=ge*i(),d=t(PW(t.rotate()).invert([0,0]));return o(s==null?[[d[0]-f,d[1]-f],[d[0]+f,d[1]+f]]:e===Yg?[[Math.max(d[0]-f,s),a],[Math.min(d[0]+f,u),l]]:[[s,Math.max(d[1]-f,a)],[u,Math.min(d[1]+f,l)]])}return c()}function Sd(e){return _2((Ke+e)/2)}function vH(e,t){var n=se(e),i=e===t?ie(e):Kh(n/se(t))/Kh(Sd(t)/Sd(e)),r=n*D0(Sd(e),i)/i;if(!i)return Yg;function o(s,a){r>0?a<-Ke+oe&&(a=-Ke+oe):a>Ke-oe&&(a=Ke-oe);var u=r/D0(Sd(a),i);return[u*ie(i*s),r-u*se(i*s)]}return o.invert=function(s,a){var u=r-a,l=Xn(i)*an(s*s+u*u),c=ii(s,be(u))*Xn(u);return u*i<0&&(c-=ge*Xn(s)*Xn(u)),[c/i,2*dl(D0(r/l,1/i))-Ke]},o}function bH(){return F2(vH).scale(109.5).parallels([30,30])}function mp(e,t){return[e,t]}mp.invert=mp;function xH(){return gr(mp).scale(152.63)}function wH(e,t){var n=se(e),i=e===t?ie(e):(n-se(t))/(t-e),r=n/i+e;if(be(i)oe&&--i>0);return[e/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function kH(){return gr(n5).scale(175.295)}function i5(e,t){return[se(t)*ie(e),ie(t)]}i5.invert=Lf(wn);function CH(){return gr(i5).scale(249.5).clipAngle(90+oe)}function r5(e,t){var n=se(t),i=1+se(e)*n;return[n*ie(e)/i,ie(t)/i]}r5.invert=Lf(function(e){return 2*dl(e)});function FH(){return gr(r5).scale(250).clipAngle(142)}function o5(e,t){return[Kh(_2((Ke+t)/2)),-e]}o5.invert=function(e,t){return[-t,2*dl(bN(e))-Ke]};function MH(){var e=ZN(o5),t=e.center,n=e.rotate;return e.center=function(i){return arguments.length?t([-i[1],i[0]]):(i=t(),[i[1],-i[0]])},e.rotate=function(i){return arguments.length?n([i[0],i[1],i.length>2?i[2]+90:90]):(i=n(),[i[0],i[1],i[2]-90])},n([0,0,90]).scale(159.155)}var TH=Math.abs,qy=Math.cos,vp=Math.sin,DH=1e-6,s5=Math.PI,Wy=s5/2,R$=NH(2);function L$(e){return e>1?Wy:e<-1?-Wy:Math.asin(e)}function NH(e){return e>0?Math.sqrt(e):0}function OH(e,t){var n=e*vp(t),i=30,r;do t-=r=(t+vp(t)-n)/(1+qy(t));while(TH(r)>DH&&--i>0);return t/2}function RH(e,t,n){function i(r,o){return[e*r*qy(o=OH(n,o)),t*vp(o)]}return i.invert=function(r,o){return o=L$(o/t),[r/(e*qy(o)),L$((2*o+vp(2*o))/n)]},i}var LH=RH(R$/Wy,R$,s5);function PH(){return gr(LH).scale(169.529)}const IH=YN(),Hy=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function zH(e,t){return function n(){const i=t();return i.type=e,i.path=YN().projection(i),i.copy=i.copy||function(){const r=n();return Hy.forEach(o=>{i[o]&&r[o](i[o]())}),r.path.pointRadius(i.path.pointRadius()),r},$T(i)}}function M2(e,t){if(!e||typeof e!="string")throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?(bp[e]=zH(e,t),this):bp[e]||null}function a5(e){return e&&e.path||IH}const bp={albers:VN,albersusa:pH,azimuthalequalarea:gH,azimuthalequidistant:mH,conicconformal:bH,conicequalarea:gp,conicequidistant:EH,equalEarth:SH,equirectangular:xH,gnomonic:$H,identity:AH,mercator:yH,mollweide:PH,naturalEarth1:kH,orthographic:CH,stereographic:FH,transversemercator:MH};for(const e in bp)M2(e,bp[e]);function BH(){}const Ar=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function u5(){var e=1,t=1,n=a;function i(u,l){return l.map(c=>r(u,c))}function r(u,l){var c=[],f=[];return o(u,l,d=>{n(d,u,l),UH(d)>0?c.push([d]):f.push(d)}),f.forEach(d=>{for(var h=0,p=c.length,g;h=l,Ar[m<<1].forEach(b);++h=l,Ar[g|m<<1].forEach(b);for(Ar[m<<0].forEach(b);++p=l,y=u[p*e]>=l,Ar[m<<1|y<<2].forEach(b);++h=l,v=y,y=u[p*e+h+1]>=l,Ar[g|m<<1|y<<2|v<<3].forEach(b);Ar[m|y<<3].forEach(b)}for(h=-1,y=u[p*e]>=l,Ar[y<<2].forEach(b);++h=l,Ar[y<<2|v<<3].forEach(b);Ar[y<<3].forEach(b);function b(x){var w=[x[0][0]+h,x[0][1]+p],_=[x[1][0]+h,x[1][1]+p],E=s(w),S=s(_),$,F;($=d[E])?(F=f[S])?(delete d[$.end],delete f[F.start],$===F?($.ring.push(_),c($.ring)):f[$.start]=d[F.end]={start:$.start,end:F.end,ring:$.ring.concat(F.ring)}):(delete d[$.end],$.ring.push(_),d[$.end=S]=$):($=f[S])?(F=d[E])?(delete f[$.start],delete d[F.end],$===F?($.ring.push(_),c($.ring)):f[F.start]=d[$.end]={start:F.start,end:$.end,ring:F.ring.concat($.ring)}):(delete f[$.start],$.ring.unshift(w),f[$.start=E]=$):f[E]=d[S]={start:E,end:S,ring:[w,_]}}}function s(u){return u[0]*2+u[1]*(e+1)*4}function a(u,l,c){u.forEach(f=>{var d=f[0],h=f[1],p=d|0,g=h|0,m,y=l[g*e+p];d>0&&d0&&h=0&&c>=0||R("invalid size"),e=l,t=c,i},i.smooth=function(u){return arguments.length?(n=u?a:BH,i):n===a},i}function UH(e){for(var t=0,n=e.length,i=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++ti!=h>i&&n<(d-l)*(i-c)/(h-c)+l&&(r=-r)}return r}function WH(e,t,n){var i;return HH(e,t,n)&&GH(e[i=+(e[0]===t[0])],n[i],t[i])}function HH(e,t,n){return(t[0]-e[0])*(n[1]-e[1])===(n[0]-e[0])*(t[1]-e[1])}function GH(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}function l5(e,t,n){return function(i){var r=ir(i),o=n?Math.min(r[0],0):r[0],s=r[1],a=s-o,u=t?Lo(o,s,e):a/(e+1);return Dn(o+u,s,u)}}function T2(e){D.call(this,null,e)}T2.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]};W(T2,D,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=t.materialize(t.SOURCE).source,r=e.field||Wt,o=u5().smooth(e.smooth!==!1),s=e.thresholds||YH(i,r,e),a=e.as===null?null:e.as||"contour",u=[];return i.forEach(l=>{const c=r(l),f=o.size([c.width,c.height])(c.values,P(s)?s:s(c.values));XH(f,c,l,e),f.forEach(d=>{u.push(lg(l,Me(a!=null?{[a]:d}:d)))})}),this.value&&(n.rem=this.value),this.value=n.source=n.add=u,n}});function YH(e,t,n){const i=l5(n.levels||10,n.nice,n.zero!==!1);return n.resolve!=="shared"?i:i(e.map(r=>qs(t(r).values)))}function XH(e,t,n,i){let r=i.scale||t.scale,o=i.translate||t.translate;if(ce(r)&&(r=r(n,i)),ce(o)&&(o=o(n,i)),(r===1||r==null)&&!o)return;const s=(Ee(r)?r:r[0])||1,a=(Ee(r)?r:r[1])||1,u=o&&o[0]||0,l=o&&o[1]||0;e.forEach(c5(t,s,a,u,l))}function c5(e,t,n,i,r){const o=e.x1||0,s=e.y1||0,a=t*n<0;function u(f){f.forEach(l)}function l(f){a&&f.reverse(),f.forEach(c)}function c(f){f[0]=(f[0]-o)*t+i,f[1]=(f[1]-s)*n+r}return function(f){return f.coordinates.forEach(u),f}}function P$(e,t,n){const i=e>=0?e:xb(t,n);return Math.round((Math.sqrt(4*i*i+1)-1)/2)}function P0(e){return ce(e)?e:Ht(+e)}function f5(){var e=u=>u[0],t=u=>u[1],n=Zu,i=[-1,-1],r=960,o=500,s=2;function a(u,l){const c=P$(i[0],u,e)>>s,f=P$(i[1],u,t)>>s,d=c?c+2:0,h=f?f+2:0,p=2*d+(r>>s),g=2*h+(o>>s),m=new Float32Array(p*g),y=new Float32Array(p*g);let v=m;u.forEach(x=>{const w=d+(+e(x)>>s),_=h+(+t(x)>>s);w>=0&&w=0&&_0&&f>0?(qa(p,g,m,y,c),Wa(p,g,y,m,f),qa(p,g,m,y,c),Wa(p,g,y,m,f),qa(p,g,m,y,c),Wa(p,g,y,m,f)):c>0?(qa(p,g,m,y,c),qa(p,g,y,m,c),qa(p,g,m,y,c),v=y):f>0&&(Wa(p,g,m,y,f),Wa(p,g,y,m,f),Wa(p,g,m,y,f),v=y);const b=l?Math.pow(2,-2*s):1/FF(v);for(let x=0,w=p*g;x>s),y2:h+(o>>s)}}return a.x=function(u){return arguments.length?(e=P0(u),a):e},a.y=function(u){return arguments.length?(t=P0(u),a):t},a.weight=function(u){return arguments.length?(n=P0(u),a):n},a.size=function(u){if(!arguments.length)return[r,o];var l=+u[0],c=+u[1];return l>=0&&c>=0||R("invalid size"),r=l,o=c,a},a.cellSize=function(u){return arguments.length?((u=+u)>=1||R("invalid cell size"),s=Math.floor(Math.log(u)/Math.LN2),a):1<=r&&(a>=o&&(u-=n[a-o+s*e]),i[a-r+s*e]=u/Math.min(a+1,e-1+o-a,o))}function Wa(e,t,n,i,r){const o=(r<<1)+1;for(let s=0;s=r&&(a>=o&&(u-=n[s+(a-o)*e]),i[s+(a-r)*e]=u/Math.min(a+1,t-1+o-a,o))}function D2(e){D.call(this,null,e)}D2.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const VH=["x","y","weight","size","cellSize","bandwidth"];function d5(e,t){return VH.forEach(n=>t[n]!=null?e[n](t[n]):0),e}W(D2,D,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=t.materialize(t.SOURCE).source,r=KH(i,e.groupby),o=(e.groupby||[]).map(Je),s=d5(f5(),e),a=e.as||"grid",u=[];function l(c,f){for(let d=0;dMe(l({[a]:s(c,e.counts)},c.dims))),this.value&&(n.rem=this.value),this.value=n.source=n.add=u,n}});function KH(e,t){var n=[],i=c=>c(a),r,o,s,a,u,l;if(t==null)n.push(e);else for(r={},o=0,s=e.length;on.push(a(c))),o&&s&&(t.visit(u,c=>{var f=o(c),d=s(c);f!=null&&d!=null&&(f=+f)===f&&(d=+d)===d&&i.push([f,d])}),n=n.concat({type:Gy,geometry:{type:JH,coordinates:i}})),this.value={type:O2,features:n}}});function L2(e){D.call(this,null,e)}L2.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]};W(L2,D,{transform(e,t){var n=t.fork(t.ALL),i=this.value,r=e.field||Wt,o=e.as||"path",s=n.SOURCE;!i||e.modified()?(this.value=i=a5(e.projection),n.materialize().reflow()):s=r===Wt||t.modified(r.fields)?n.ADD_MOD:n.ADD;const a=QH(i,e.pointRadius);return n.visit(s,u=>u[o]=i(r(u))),i.pointRadius(a),n.modifies(o)}});function QH(e,t){const n=e.pointRadius();return e.context(null),t!=null&&e.pointRadius(t),n}function P2(e){D.call(this,null,e)}P2.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]};W(P2,D,{transform(e,t){var n=e.projection,i=e.fields[0],r=e.fields[1],o=e.as||["x","y"],s=o[0],a=o[1],u;function l(c){const f=n([i(c),r(c)]);f?(c[s]=f[0],c[a]=f[1]):(c[s]=void 0,c[a]=void 0)}return e.modified()?t=t.materialize().reflow(!0).visit(t.SOURCE,l):(u=t.modified(i.fields)||t.modified(r.fields),t.visit(u?t.ADD_MOD:t.ADD,l)),t.modifies(o)}});function I2(e){D.call(this,null,e)}I2.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]};W(I2,D,{transform(e,t){var n=t.fork(t.ALL),i=this.value,r=e.as||"shape",o=n.ADD;return(!i||e.modified())&&(this.value=i=ZH(a5(e.projection),e.field||Zn("datum"),e.pointRadius),n.materialize().reflow(),o=n.SOURCE),n.visit(o,s=>s[r]=i),n.modifies(r)}});function ZH(e,t,n){const i=n==null?r=>e(t(r)):r=>{var o=e.pointRadius(),s=e.pointRadius(n)(t(r));return e.pointRadius(o),s};return i.context=r=>(e.context(r),i),i}function z2(e){D.call(this,[],e),this.generator=YW()}z2.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]};W(z2,D,{transform(e,t){var n=this.value,i=this.generator,r;if(!n.length||e.modified())for(const o in e)ce(i[o])&&i[o](e[o]);return r=i(),n.length?t.mod.push(SM(n[0],r)):t.add.push(Me(r)),n[0]=r,t}});function B2(e){D.call(this,null,e)}B2.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]};W(B2,D,{transform(e,t){if(!t.changed()&&!e.modified())return t.StopPropagation;var n=t.materialize(t.SOURCE).source,i=e.resolve==="shared",r=e.field||Wt,o=tG(e.opacity,e),s=eG(e.color,e),a=e.as||"image",u={$x:0,$y:0,$value:0,$max:i?qs(n.map(l=>qs(r(l).values))):0};return n.forEach(l=>{const c=r(l),f=le({},l,u);i||(f.$max=qs(c.values||[])),l[a]=nG(c,f,s.dep?s:Ht(s(f)),o.dep?o:Ht(o(f)))}),t.reflow(!0).modifies(a)}});function eG(e,t){let n;return ce(e)?(n=i=>zo(e(i,t)),n.dep=h5(e)):n=Ht(zo(e||"#888")),n}function tG(e,t){let n;return ce(e)?(n=i=>e(i,t),n.dep=h5(e)):e?n=Ht(e):(n=i=>i.$value/i.$max||0,n.dep=!0),n}function h5(e){if(!ce(e))return!1;const t=Ai(Bt(e));return t.$x||t.$y||t.$value||t.$max}function nG(e,t,n,i){const r=e.width,o=e.height,s=e.x1||0,a=e.y1||0,u=e.x2||r,l=e.y2||o,c=e.values,f=c?m=>c[m]:bo,d=Do(u-s,l-a),h=d.getContext("2d"),p=h.getImageData(0,0,u-s,l-a),g=p.data;for(let m=a,y=0;m{e[i]!=null&&I$(n,i,e[i])})):Hy.forEach(i=>{e.modified(i)&&I$(n,i,e[i])}),e.pointRadius!=null&&n.path.pointRadius(e.pointRadius),e.fit&&iG(n,e),t.fork(t.NO_SOURCE|t.NO_FIELDS)}});function iG(e,t){const n=oG(t.fit);t.extent?e.fitExtent(t.extent,n):t.size&&e.fitSize(t.size,n)}function rG(e){const t=M2((e||"mercator").toLowerCase());return t||R("Unrecognized projection type: "+e),t()}function I$(e,t,n){ce(e[t])&&e[t](n)}function oG(e){return e=Y(e),e.length===1?e[0]:{type:O2,features:e.reduce((t,n)=>t.concat(sG(n)),[])}}function sG(e){return e.type===O2?e.features:Y(e).filter(t=>t!=null).map(t=>t.type===Gy?t:{type:Gy,geometry:t})}const aG=Object.freeze(Object.defineProperty({__proto__:null,contour:N2,geojson:R2,geopath:L2,geopoint:P2,geoshape:I2,graticule:z2,heatmap:B2,isocontour:T2,kde2d:D2,projection:p5},Symbol.toStringTag,{value:"Module"}));function uG(e,t){var n,i=1;e==null&&(e=0),t==null&&(t=0);function r(){var o,s=n.length,a,u=0,l=0;for(o=0;o=(f=(a+l)/2))?a=f:l=f,(m=n>=(d=(u+c)/2))?u=d:c=d,r=o,!(o=o[y=m<<1|g]))return r[y]=s,e;if(h=+e._x.call(null,o.data),p=+e._y.call(null,o.data),t===h&&n===p)return s.next=o,r?r[y]=s:e._root=s,e;do r=r?r[y]=new Array(4):e._root=new Array(4),(g=t>=(f=(a+l)/2))?a=f:l=f,(m=n>=(d=(u+c)/2))?u=d:c=d;while((y=m<<1|g)===(v=(p>=d)<<1|h>=f));return r[v]=o,r[y]=s,e}function cG(e){var t,n,i=e.length,r,o,s=new Array(i),a=new Array(i),u=1/0,l=1/0,c=-1/0,f=-1/0;for(n=0;nc&&(c=r),of&&(f=o));if(u>c||l>f)return this;for(this.cover(u,l).cover(c,f),n=0;ne||e>=r||i>t||t>=o;)switch(l=(tc||(a=p.y0)>f||(u=p.x1)=y)<<1|e>=m)&&(p=d[d.length-1],d[d.length-1]=d[d.length-1-g],d[d.length-1-g]=p)}else{var v=e-+this._x.call(null,h.data),b=t-+this._y.call(null,h.data),x=v*v+b*b;if(x=(d=(s+u)/2))?s=d:u=d,(g=f>=(h=(a+l)/2))?a=h:l=h,t=n,!(n=n[m=g<<1|p]))return this;if(!n.length)break;(t[m+1&3]||t[m+2&3]||t[m+3&3])&&(i=t,y=m)}for(;n.data!==e;)if(r=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,r?(o?r.next=o:delete r.next,this):t?(o?t[m]=o:delete t[m],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[y]=n:this._root=n),this):(this._root=o,this)}function mG(e){for(var t=0,n=e.length;td.index){var k=h-S.x-S.vx,N=p-S.y-S.vy,A=k*k+N*N;Ah+F||_p+F||El.r&&(l.r=l[c].r)}function u(){if(t){var l,c=t.length,f;for(n=new Array(c),l=0;l[t(w,_,s),w])),x;for(m=0,a=new Array(y);m{}};function m5(){for(var e=0,t=arguments.length,n={},i;e=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}ih.prototype=m5.prototype={constructor:ih,on:function(e,t){var n=this._,i=TG(e+"",n),r,o=-1,s=i.length;if(arguments.length<2){for(;++o0)for(var n=new Array(r),i=0,r,o;i=0&&e._call.call(void 0,t),e=e._next;--Lu}function j$(){oa=(wp=Qc.now())+Xg,Lu=fc=0;try{OG()}finally{Lu=0,LG(),oa=0}}function RG(){var e=Qc.now(),t=e-wp;t>y5&&(Xg-=t,wp=e)}function LG(){for(var e,t=xp,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:xp=n);dc=e,Yy(i)}function Yy(e){if(!Lu){fc&&(fc=clearTimeout(fc));var t=e-oa;t>24?(e<1/0&&(fc=setTimeout(j$,e-Qc.now()-Xg)),Ll&&(Ll=clearInterval(Ll))):(Ll||(wp=Qc.now(),Ll=setInterval(RG,y5)),Lu=1,v5(j$))}}function PG(e,t,n){var i=new Ep,r=t;return t==null?(i.restart(e,t,n),i):(i._restart=i.restart,i.restart=function(o,s,a){s=+s,a=a==null?q2():+a,i._restart(function u(l){l+=r,i._restart(u,r+=s,a),o(l)},s,a)},i.restart(e,t,n),i)}const IG=1664525,zG=1013904223,q$=4294967296;function BG(){let e=1;return()=>(e=(IG*e+zG)%q$)/q$}function UG(e){return e.x}function jG(e){return e.y}var qG=10,WG=Math.PI*(3-Math.sqrt(5));function HG(e){var t,n=1,i=.001,r=1-Math.pow(i,1/300),o=0,s=.6,a=new Map,u=b5(f),l=m5("tick","end"),c=BG();e==null&&(e=[]);function f(){d(),l.call("tick",t),n1?(m==null?a.delete(g):a.set(g,p(m)),t):a.get(g)},find:function(g,m,y){var v=0,b=e.length,x,w,_,E,S;for(y==null?y=1/0:y*=y,v=0;v1?(l.on(g,m),t):l.on(g)}}}function GG(){var e,t,n,i,r=tn(-30),o,s=1,a=1/0,u=.81;function l(h){var p,g=e.length,m=U2(e,UG,jG).visitAfter(f);for(i=h,p=0;p=a)return;(h.data!==t||h.next)&&(y===0&&(y=Ao(n),x+=y*y),v===0&&(v=Ao(n),x+=v*v),x=0;)n.tick();else if(n.stopped()&&n.restart(),!i)return t.StopPropagation}return this.finish(e,t)},finish(e,t){const n=t.dataflow;for(let a=this._argops,u=0,l=a.length,c;ue.touch(t).run()}function JG(e,t){const n=HG(e),i=n.stop,r=n.restart;let o=!1;return n.stopped=()=>o,n.restart=()=>(o=!1,r()),n.stop=()=>(o=!0,i()),w5(n,t,!0).on("end",()=>o=!0)}function w5(e,t,n,i){var r=Y(t.forces),o,s,a,u;for(o=0,s=Xy.length;ot(i,n):t)}const tY=Object.freeze(Object.defineProperty({__proto__:null,force:W2},Symbol.toStringTag,{value:"Module"}));function nY(e,t){return e.parent===t.parent?1:2}function iY(e){return e.reduce(rY,0)/e.length}function rY(e,t){return e+t.x}function oY(e){return 1+e.reduce(sY,0)}function sY(e,t){return Math.max(e,t.y)}function aY(e){for(var t;t=e.children;)e=t[0];return e}function uY(e){for(var t;t=e.children;)e=t[t.length-1];return e}function lY(){var e=nY,t=1,n=1,i=!1;function r(o){var s,a=0;o.eachAfter(function(d){var h=d.children;h?(d.x=iY(h),d.y=oY(h)):(d.x=s?a+=e(d,s):0,d.y=0,s=d)});var u=aY(o),l=uY(o),c=u.x-e(u,l)/2,f=l.x+e(l,u)/2;return o.eachAfter(i?function(d){d.x=(d.x-o.x)*t,d.y=(o.y-d.y)*n}:function(d){d.x=(d.x-c)/(f-c)*t,d.y=(1-(o.y?d.y/o.y:1))*n})}return r.separation=function(o){return arguments.length?(e=o,r):e},r.size=function(o){return arguments.length?(i=!1,t=+o[0],n=+o[1],r):i?null:[t,n]},r.nodeSize=function(o){return arguments.length?(i=!0,t=+o[0],n=+o[1],r):i?[t,n]:null},r}function cY(e){var t=0,n=e.children,i=n&&n.length;if(!i)t=1;else for(;--i>=0;)t+=n[i].value;e.value=t}function fY(){return this.eachAfter(cY)}function dY(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this}function hY(e,t){for(var n=this,i=[n],r,o,s=-1;n=i.pop();)if(e.call(t,n,++s,this),r=n.children)for(o=r.length-1;o>=0;--o)i.push(r[o]);return this}function pY(e,t){for(var n=this,i=[n],r=[],o,s,a,u=-1;n=i.pop();)if(r.push(n),o=n.children)for(s=0,a=o.length;s=0;)n+=i[r].value;t.value=n})}function yY(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function vY(e){for(var t=this,n=bY(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i}function bY(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}function xY(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function wY(){return Array.from(this)}function EY(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function _Y(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*SY(){var e=this,t,n=[e],i,r,o;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(r=0,o=i.length;r=0;--a)r.push(o=s[a]=new Pu(s[a])),o.parent=i,o.depth=i.depth+1;return n.eachBefore(E5)}function $Y(){return H2(this).eachBefore(CY)}function AY(e){return e.children}function kY(e){return Array.isArray(e)?e[1]:null}function CY(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function E5(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Pu(e){this.data=e,this.depth=this.height=0,this.parent=null}Pu.prototype=H2.prototype={constructor:Pu,count:fY,each:dY,eachAfter:pY,eachBefore:hY,find:gY,sum:mY,sort:yY,path:vY,ancestors:xY,descendants:wY,leaves:EY,links:_Y,copy:$Y,[Symbol.iterator]:SY};function rh(e){return e==null?null:_5(e)}function _5(e){if(typeof e!="function")throw new Error;return e}function Rs(){return 0}function Za(e){return function(){return e}}const FY=1664525,MY=1013904223,H$=4294967296;function TY(){let e=1;return()=>(e=(FY*e+MY)%H$)/H$}function DY(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function NY(e,t){let n=e.length,i,r;for(;n;)r=t()*n--|0,i=e[n],e[n]=e[r],e[r]=i;return e}function OY(e,t){for(var n=0,i=(e=NY(Array.from(e),t)).length,r=[],o,s;n0&&n*n>i*i+r*r}function I0(e,t){for(var n=0;n1e-6?(k+Math.sqrt(k*k-4*F*N))/(2*F):N/k);return{x:i+_+E*A,y:r+S+$*A,r:A}}function G$(e,t,n){var i=e.x-t.x,r,o,s=e.y-t.y,a,u,l=i*i+s*s;l?(o=t.r+n.r,o*=o,u=e.r+n.r,u*=u,o>u?(r=(l+u-o)/(2*l),a=Math.sqrt(Math.max(0,u/l-r*r)),n.x=e.x-r*i-a*s,n.y=e.y-r*s+a*i):(r=(l+o-u)/(2*l),a=Math.sqrt(Math.max(0,o/l-r*r)),n.x=t.x+r*i-a*s,n.y=t.y+r*s+a*i)):(n.x=t.x+n.r,n.y=t.y)}function Y$(e,t){var n=e.r+t.r-1e-6,i=t.x-e.x,r=t.y-e.y;return n>0&&n*n>i*i+r*r}function X$(e){var t=e._,n=e.next._,i=t.r+n.r,r=(t.x*n.r+n.x*t.r)/i,o=(t.y*n.r+n.y*t.r)/i;return r*r+o*o}function Ad(e){this._=e,this.next=null,this.previous=null}function IY(e,t){if(!(o=(e=DY(e)).length))return 0;var n,i,r,o,s,a,u,l,c,f,d;if(n=e[0],n.x=0,n.y=0,!(o>1))return n.r;if(i=e[1],n.x=-i.r,i.x=n.r,i.y=0,!(o>2))return n.r+i.r;G$(i,n,r=e[2]),n=new Ad(n),i=new Ad(i),r=new Ad(r),n.next=r.previous=i,i.next=n.previous=r,r.next=i.previous=n;e:for(u=3;uHY(n(x,w,r))),v=y.map(Z$),b=new Set(y).add("");for(const x of v)b.has(x)||(b.add(x),y.push(x),v.push(Z$(x)),o.push(B0));s=(x,w)=>y[w],a=(x,w)=>v[w]}for(c=0,u=o.length;c=0&&(h=o[y],h.data===B0);--y)h.data=null}if(f.parent=jY,f.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(E5),f.parent=null,u>0)throw new Error("cycle");return f}return i.id=function(r){return arguments.length?(e=rh(r),i):e},i.parentId=function(r){return arguments.length?(t=rh(r),i):t},i.path=function(r){return arguments.length?(n=rh(r),i):n},i}function HY(e){e=`${e}`;let t=e.length;return Vy(e,t-1)&&!Vy(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function Z$(e){let t=e.length;if(t<2)return"";for(;--t>1&&!Vy(e,t););return e.slice(0,t)}function Vy(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if(!(n&1))return!0}return!1}function GY(e,t){return e.parent===t.parent?1:2}function U0(e){var t=e.children;return t?t[0]:e.t}function j0(e){var t=e.children;return t?t[t.length-1]:e.t}function YY(e,t,n){var i=n/(t.i-e.i);t.c-=i,t.s+=n,e.c+=i,t.z+=n,t.m+=n}function XY(e){for(var t=0,n=0,i=e.children,r=i.length,o;--r>=0;)o=i[r],o.z+=t,o.m+=t,t+=o.s+(n+=o.c)}function VY(e,t,n){return e.a.parent===t.parent?e.a:n}function oh(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}oh.prototype=Object.create(Pu.prototype);function KY(e){for(var t=new oh(e,0),n,i=[t],r,o,s,a;n=i.pop();)if(o=n._.children)for(n.children=new Array(a=o.length),s=a-1;s>=0;--s)i.push(r=n.children[s]=new oh(o[s],s)),r.parent=n;return(t.parent=new oh(null,0)).children=[t],t}function JY(){var e=GY,t=1,n=1,i=null;function r(l){var c=KY(l);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(s),i)l.eachBefore(u);else{var f=l,d=l,h=l;l.eachBefore(function(v){v.xd.x&&(d=v),v.depth>h.depth&&(h=v)});var p=f===d?1:e(f,d)/2,g=p-f.x,m=t/(d.x+p+g),y=n/(h.depth||1);l.eachBefore(function(v){v.x=(v.x+g)*m,v.y=v.depth*y})}return l}function o(l){var c=l.children,f=l.parent.children,d=l.i?f[l.i-1]:null;if(c){XY(l);var h=(c[0].z+c[c.length-1].z)/2;d?(l.z=d.z+e(l._,d._),l.m=l.z-h):l.z=h}else d&&(l.z=d.z+e(l._,d._));l.parent.A=a(l,d,l.parent.A||f[0])}function s(l){l._.x=l.z+l.parent.m,l.m+=l.parent.m}function a(l,c,f){if(c){for(var d=l,h=l,p=c,g=d.parent.children[0],m=d.m,y=h.m,v=p.m,b=g.m,x;p=j0(p),d=U0(d),p&&d;)g=U0(g),h=j0(h),h.a=l,x=p.z+v-d.z-m+e(p._,d._),x>0&&(YY(VY(p,l,f),l,x),m+=x,y+=x),v+=p.m,m+=d.m,b+=g.m,y+=h.m;p&&!j0(h)&&(h.t=p,h.m+=v-y),d&&!U0(g)&&(g.t=d,g.m+=m-b,f=l)}return f}function u(l){l.x*=t,l.y=l.depth*n}return r.separation=function(l){return arguments.length?(e=l,r):e},r.size=function(l){return arguments.length?(i=!1,t=+l[0],n=+l[1],r):i?null:[t,n]},r.nodeSize=function(l){return arguments.length?(i=!0,t=+l[0],n=+l[1],r):i?[t,n]:null},r}function Vg(e,t,n,i,r){for(var o=e.children,s,a=-1,u=o.length,l=e.value&&(r-n)/e.value;++av&&(v=l),_=m*m*w,b=Math.max(v/_,_/y),b>x){m-=l;break}x=b}s.push(u={value:m,dice:h1?i:1)},n}(k5);function QY(){var e=F5,t=!1,n=1,i=1,r=[0],o=Rs,s=Rs,a=Rs,u=Rs,l=Rs;function c(d){return d.x0=d.y0=0,d.x1=n,d.y1=i,d.eachBefore(f),r=[0],t&&d.eachBefore(A5),d}function f(d){var h=r[d.depth],p=d.x0+h,g=d.y0+h,m=d.x1-h,y=d.y1-h;m=d-1){var v=o[f];v.x0=p,v.y0=g,v.x1=m,v.y1=y;return}for(var b=l[f],x=h/2+b,w=f+1,_=d-1;w<_;){var E=w+_>>>1;l[E]y-g){var F=h?(p*$+m*S)/h:m;c(f,w,S,p,g,F,y),c(w,d,$,F,g,m,y)}else{var k=h?(g*$+y*S)/h:y;c(f,w,S,p,g,m,k),c(w,d,$,p,k,m,y)}}}function eX(e,t,n,i,r){(e.depth&1?Vg:Pf)(e,t,n,i,r)}const tX=function e(t){function n(i,r,o,s,a){if((u=i._squarify)&&u.ratio===t)for(var u,l,c,f,d=-1,h,p=u.length,g=i.value;++d1?i:1)},n}(k5);function Ky(e,t,n){const i={};return e.each(r=>{const o=r.data;n(o)&&(i[t(o)]=r)}),e.lookup=i,e}function G2(e){D.call(this,null,e)}G2.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const nX=e=>e.values;W(G2,D,{transform(e,t){t.source||R("Nest transform requires an upstream data source.");var n=e.generate,i=e.modified(),r=t.clone(),o=this.value;return(!o||i||t.changed())&&(o&&o.each(s=>{s.children&&ug(s.data)&&r.rem.push(s.data)}),this.value=o=H2({values:Y(e.keys).reduce((s,a)=>(s.key(a),s),iX()).entries(r.source)},nX),n&&o.each(s=>{s.children&&(s=Me(s.data),r.add.push(s),r.source.push(s))}),Ky(o,ne,ne)),r.source.root=o,r}});function iX(){const e=[],t={entries:r=>i(n(r,0),0),key:r=>(e.push(r),t)};function n(r,o){if(o>=e.length)return r;const s=r.length,a=e[o++],u={},l={};let c=-1,f,d,h;for(;++ce.length)return r;const s=[];for(const a in r)s.push({key:a,values:i(r[a],o)});return s}return t}function to(e){D.call(this,null,e)}const rX=(e,t)=>e.parent===t.parent?1:2;W(to,D,{transform(e,t){(!t.source||!t.source.root)&&R(this.constructor.name+" transform requires a backing tree data source.");const n=this.layout(e.method),i=this.fields,r=t.source.root,o=e.as||i;e.field?r.sum(e.field):r.count(),e.sort&&r.sort(_a(e.sort,s=>s.data)),oX(n,this.params,e),n.separation&&n.separation(e.separation!==!1?rX:Zu);try{this.value=n(r)}catch(s){R(s)}return r.each(s=>sX(s,i,o)),t.reflow(e.modified()).modifies(o).modifies("leaf")}});function oX(e,t,n){for(let i,r=0,o=t.length;ro[ne(s)]=1),i.each(s=>{const a=s.data,u=s.parent&&s.parent.data;u&&o[ne(a)]&&o[ne(u)]&&r.add.push(Me({source:u,target:a}))}),this.value=r.add):t.changed(t.MOD)&&(t.visit(t.MOD,s=>o[ne(s)]=1),n.forEach(s=>{(o[ne(s.source)]||o[ne(s.target)])&&r.mod.push(s)})),r}});const tA={binary:ZY,dice:Pf,slice:Vg,slicedice:eX,squarify:F5,resquarify:tX},ev=["x0","y0","x1","y1","depth","children"];function Q2(e){to.call(this,e)}Q2.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:ev.length,default:ev}]};W(Q2,to,{layout(){const e=QY();return e.ratio=t=>{const n=e.tile();n.ratio&&e.tile(n.ratio(t))},e.method=t=>{re(tA,t)?e.tile(tA[t]):R("Unrecognized Treemap layout method: "+t)},e},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:ev});const aX=Object.freeze(Object.defineProperty({__proto__:null,nest:G2,pack:Y2,partition:X2,stratify:V2,tree:K2,treelinks:J2,treemap:Q2},Symbol.toStringTag,{value:"Module"})),q0=4278190080;function uX(e,t){const n=e.bitmap();return(t||[]).forEach(i=>n.set(e(i.boundary[0]),e(i.boundary[3]))),[n,void 0]}function lX(e,t,n,i,r){const o=e.width,s=e.height,a=i||r,u=Do(o,s).getContext("2d"),l=Do(o,s).getContext("2d"),c=a&&Do(o,s).getContext("2d");n.forEach(S=>sh(u,S,!1)),sh(l,t,!1),a&&sh(c,t,!0);const f=W0(u,o,s),d=W0(l,o,s),h=a&&W0(c,o,s),p=e.bitmap(),g=a&&e.bitmap();let m,y,v,b,x,w,_,E;for(y=0;y{r.items.forEach(o=>sh(e,o.items,n))}):zn[i].draw(e,{items:n?t.map(cX):t})}function cX(e){const t=lg(e,{});return t.stroke&&t.strokeOpacity!==0||t.fill&&t.fillOpacity!==0?{...t,strokeOpacity:1,stroke:"#000",fillOpacity:0}:t}const kr=5,Yt=31,Zc=32,yo=new Uint32Array(Zc+1),mi=new Uint32Array(Zc+1);mi[0]=0;yo[0]=~mi[0];for(let e=1;e<=Zc;++e)mi[e]=mi[e-1]<<1|1,yo[e]=~mi[e];function fX(e,t){const n=new Uint32Array(~~((e*t+Zc)/Zc));function i(o,s){n[o]|=s}function r(o,s){n[o]&=s}return{array:n,get:(o,s)=>{const a=s*e+o;return n[a>>>kr]&1<<(a&Yt)},set:(o,s)=>{const a=s*e+o;i(a>>>kr,1<<(a&Yt))},clear:(o,s)=>{const a=s*e+o;r(a>>>kr,~(1<<(a&Yt)))},getRange:(o,s,a,u)=>{let l=u,c,f,d,h;for(;l>=s;--l)if(c=l*e+o,f=l*e+a,d=c>>>kr,h=f>>>kr,d===h){if(n[d]&yo[c&Yt]&mi[(f&Yt)+1])return!0}else{if(n[d]&yo[c&Yt]||n[h]&mi[(f&Yt)+1])return!0;for(let p=d+1;p{let l,c,f,d,h;for(;s<=u;++s)if(l=s*e+o,c=s*e+a,f=l>>>kr,d=c>>>kr,f===d)i(f,yo[l&Yt]&mi[(c&Yt)+1]);else for(i(f,yo[l&Yt]),i(d,mi[(c&Yt)+1]),h=f+1;h{let l,c,f,d,h;for(;s<=u;++s)if(l=s*e+o,c=s*e+a,f=l>>>kr,d=c>>>kr,f===d)r(f,mi[l&Yt]|yo[(c&Yt)+1]);else for(r(f,mi[l&Yt]),r(d,yo[(c&Yt)+1]),h=f+1;ho<0||s<0||u>=t||a>=e}}function dX(e,t,n){const i=Math.max(1,Math.sqrt(e*t/1e6)),r=~~((e+2*n+i)/i),o=~~((t+2*n+i)/i),s=a=>~~((a+n)/i);return s.invert=a=>a*i-n,s.bitmap=()=>fX(r,o),s.ratio=i,s.padding=n,s.width=e,s.height=t,s}function hX(e,t,n,i){const r=e.width,o=e.height;return function(s){const a=s.datum.datum.items[i].items,u=a.length,l=s.datum.fontSize,c=On.width(s.datum,s.datum.text);let f=0,d,h,p,g,m,y,v;for(let b=0;b=f&&(f=v,s.x=m,s.y=y);return m=c/2,y=l/2,d=s.x-m,h=s.x+m,p=s.y-y,g=s.y+y,s.align="center",d<0&&h<=r?s.align="left":0<=d&&rr||t-(s=i/2)<0||t+s>o}function ko(e,t,n,i,r,o,s,a){const u=r*o/(i*2),l=e(t-u),c=e(t+u),f=e(n-(o=o/2)),d=e(n+o);return s.outOfBounds(l,f,c,d)||s.getRange(l,f,c,d)||a&&a.getRange(l,f,c,d)}function pX(e,t,n,i){const r=e.width,o=e.height,s=t[0],a=t[1];function u(l,c,f,d,h){const p=e.invert(l),g=e.invert(c);let m=f,y=o,v;if(!_p(p,g,d,h,r,o)&&!ko(e,p,g,h,d,m,s,a)&&!ko(e,p,g,h,d,h,s,null)){for(;y-m>=1;)v=(m+y)/2,ko(e,p,g,h,d,v,s,a)?y=v:m=v;if(m>f)return[p,g,m,!0]}}return function(l){const c=l.datum.datum.items[i].items,f=c.length,d=l.datum.fontSize,h=On.width(l.datum,l.datum.text);let p=n?d:0,g=!1,m=!1,y=0,v,b,x,w,_,E,S,$,F,k,N,A,M,C,T,L,I;for(let z=0;zb&&(I=v,v=b,b=I),x>w&&(I=x,x=w,w=I),F=e(v),N=e(b),k=~~((F+N)/2),A=e(x),C=e(w),M=~~((A+C)/2),S=k;S>=F;--S)for($=M;$>=A;--$)L=u(S,$,p,h,d),L&&([l.x,l.y,p,g]=L);for(S=k;S<=N;++S)for($=M;$<=C;++$)L=u(S,$,p,h,d),L&&([l.x,l.y,p,g]=L);!g&&!n&&(T=Math.abs(b-v+w-x),_=(v+b)/2,E=(x+w)/2,T>=y&&!_p(_,E,h,d,r,o)&&!ko(e,_,E,d,h,d,s,null)&&(y=T,l.x=_,l.y=E,m=!0))}return g||m?(_=h/2,E=d/2,s.setRange(e(l.x-_),e(l.y-E),e(l.x+_),e(l.y+E)),l.align="center",l.baseline="middle",!0):!1}}const gX=[-1,-1,1,1],mX=[-1,1,-1,1];function yX(e,t,n,i){const r=e.width,o=e.height,s=t[0],a=t[1],u=e.bitmap();return function(l){const c=l.datum.datum.items[i].items,f=c.length,d=l.datum.fontSize,h=On.width(l.datum,l.datum.text),p=[];let g=n?d:0,m=!1,y=!1,v=0,b,x,w,_,E,S,$,F,k,N,A,M;for(let C=0;C=1;)A=(k+N)/2,ko(e,E,S,d,h,A,s,a)?N=A:k=A;k>g&&(l.x=E,l.y=S,g=k,m=!0)}}!m&&!n&&(M=Math.abs(x-b+_-w),E=(b+x)/2,S=(w+_)/2,M>=v&&!_p(E,S,h,d,r,o)&&!ko(e,E,S,d,h,d,s,null)&&(v=M,l.x=E,l.y=S,y=!0))}return m||y?(E=h/2,S=d/2,s.setRange(e(l.x-E),e(l.y-S),e(l.x+E),e(l.y+S)),l.align="center",l.baseline="middle",!0):!1}}const vX=["right","center","left"],bX=["bottom","middle","top"];function xX(e,t,n,i){const r=e.width,o=e.height,s=t[0],a=t[1],u=i.length;return function(l){const c=l.boundary,f=l.datum.fontSize;if(c[2]<0||c[5]<0||c[0]>r||c[3]>o)return!1;let d=l.textWidth??0,h,p,g,m,y,v,b,x,w,_,E,S,$,F,k;for(let N=0;N>>2&3)-1,g=h===0&&p===0||i[N]<0,m=h&&p?Math.SQRT1_2:1,y=i[N]<0?-1:1,v=c[1+h]+i[N]*h*m,E=c[4+p]+y*f*p/2+i[N]*p*m,x=E-f/2,w=E+f/2,S=e(v),F=e(x),k=e(w),!d)if(nA(S,S,F,k,s,a,v,v,x,w,c,g))d=On.width(l.datum,l.datum.text);else continue;if(_=v+y*d*h/2,v=_-d/2,b=_+d/2,S=e(v),$=e(b),nA(S,$,F,k,s,a,v,b,x,w,c,g))return l.x=h?h*y<0?b:v:_,l.y=p?p*y<0?w:x:E,l.align=vX[h*y+1],l.baseline=bX[p*y+1],s.setRange(S,F,$,k),!0}return!1}}function nA(e,t,n,i,r,o,s,a,u,l,c,f){return!(r.outOfBounds(e,n,t,i)||(f&&o||r).getRange(e,n,t,i))}const H0=0,G0=4,Y0=8,X0=0,V0=1,K0=2,wX={"top-left":H0+X0,top:H0+V0,"top-right":H0+K0,left:G0+X0,middle:G0+V0,right:G0+K0,"bottom-left":Y0+X0,bottom:Y0+V0,"bottom-right":Y0+K0},EX={naive:hX,"reduced-search":pX,floodfill:yX};function _X(e,t,n,i,r,o,s,a,u,l,c){if(!e.length)return e;const f=Math.max(i.length,r.length),d=SX(i,f),h=$X(r,f),p=AX(e[0].datum),g=p==="group"&&e[0].datum.items[u].marktype,m=g==="area",y=kX(p,g,a,u),v=l===null||l===1/0,b=m&&c==="naive";let x=-1,w=-1;const _=e.map(F=>{const k=v?On.width(F,F.text):void 0;return x=Math.max(x,k),w=Math.max(w,F.fontSize),{datum:F,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:y(F),textWidth:k}});l=l===null||l===1/0?Math.max(x,w)+Math.max(...i):l;const E=dX(t[0],t[1],l);let S;if(!b){n&&_.sort((N,A)=>n(N.datum,A.datum));let F=!1;for(let N=0;NN.datum);S=o.length||k?lX(E,k||[],o,F,m):uX(E,s&&_)}const $=m?EX[c](E,S,s,u):xX(E,S,h,d);return _.forEach(F=>F.opacity=+$(F)),_}function SX(e,t){const n=new Float64Array(t),i=e.length;for(let r=0;r[o.x,o.x,o.x,o.y,o.y,o.y];return e?e==="line"||e==="area"?o=>r(o.datum):t==="line"?o=>{const s=o.datum.items[i].items;return r(s.length?s[n==="start"?0:s.length-1]:{x:NaN,y:NaN})}:o=>{const s=o.datum.bounds;return[s.x1,(s.x1+s.x2)/2,s.x2,s.y1,(s.y1+s.y2)/2,s.y2]}:r}const tv=["x","y","opacity","align","baseline"],M5=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function Z2(e){D.call(this,null,e)}Z2.Definition={type:"Label",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"sort",type:"compare"},{name:"anchor",type:"string",array:!0,default:M5},{name:"offset",type:"number",array:!0,default:[1]},{name:"padding",type:"number",default:0,null:!0},{name:"lineAnchor",type:"string",values:["start","end"],default:"end"},{name:"markIndex",type:"number",default:0},{name:"avoidBaseMark",type:"boolean",default:!0},{name:"avoidMarks",type:"data",array:!0},{name:"method",type:"string",default:"naive"},{name:"as",type:"string",array:!0,length:tv.length,default:tv}]};W(Z2,D,{transform(e,t){function n(o){const s=e[o];return ce(s)&&t.modified(s.fields)}const i=e.modified();if(!(i||t.changed(t.ADD_REM)||n("sort")))return;(!e.size||e.size.length!==2)&&R("Size parameter should be specified as a [width, height] array.");const r=e.as||tv;return _X(t.materialize(t.SOURCE).source||[],e.size,e.sort,Y(e.offset==null?1:e.offset),Y(e.anchor||M5),e.avoidMarks||[],e.avoidBaseMark!==!1,e.lineAnchor||"end",e.markIndex||0,e.padding===void 0?0:e.padding,e.method||"naive").forEach(o=>{const s=o.datum;s[r[0]]=o.x,s[r[1]]=o.y,s[r[2]]=o.opacity,s[r[3]]=o.align,s[r[4]]=o.baseline}),t.reflow(i).modifies(r)}});const CX=Object.freeze(Object.defineProperty({__proto__:null,label:Z2},Symbol.toStringTag,{value:"Module"}));function T5(e,t){var n=[],i=function(c){return c(a)},r,o,s,a,u,l;if(t==null)n.push(e);else for(r={},o=0,s=e.length;o{jM(l,e.x,e.y,e.bandwidth||.3).forEach(c=>{const f={};for(let d=0;de==="poly"?t:e==="quad"?2:1;function tw(e){D.call(this,null,e)}tw.Definition={type:"Regression",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"string",default:"linear",values:Object.keys(nv)},{name:"order",type:"number",default:3},{name:"extent",type:"number",array:!0,length:2},{name:"params",type:"boolean",default:!1},{name:"as",type:"string",array:!0}]};W(tw,D,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const i=t.materialize(t.SOURCE).source,r=T5(i,e.groupby),o=(e.groupby||[]).map(Je),s=e.method||"linear",a=e.order==null?3:e.order,u=FX(s,a),l=e.as||[Je(e.x),Je(e.y)],c=nv[s],f=[];let d=e.extent;re(nv,s)||R("Invalid regression method: "+s),d!=null&&s==="log"&&d[0]<=0&&(t.dataflow.warn("Ignoring extent with values <= 0 for log regression."),d=null),r.forEach(h=>{if(h.length<=u){t.dataflow.warn("Skipping regression with more parameters than data points.");return}const g=c(h,e.x,e.y,a);if(e.params){f.push(Me({keys:h.dims,coef:g.coef,rSquared:g.rSquared}));return}const m=d||ir(h,e.x),y=v=>{const b={};for(let x=0;xy([v,g.predict(v)])):mg(g.predict,m,25,200).forEach(y)}),this.value&&(n.rem=this.value),this.value=n.add=n.source=f}return n}});const MX=Object.freeze(Object.defineProperty({__proto__:null,loess:ew,regression:tw},Symbol.toStringTag,{value:"Module"})),Wr=11102230246251565e-32,Dt=134217729,TX=(3+8*Wr)*Wr;function J0(e,t,n,i,r){let o,s,a,u,l=t[0],c=i[0],f=0,d=0;c>l==c>-l?(o=l,l=t[++f]):(o=c,c=i[++d]);let h=0;if(fl==c>-l?(s=l+o,a=o-(s-l),l=t[++f]):(s=c+o,a=o-(s-c),c=i[++d]),o=s,a!==0&&(r[h++]=a);fl==c>-l?(s=o+l,u=s-o,a=o-(s-u)+(l-u),l=t[++f]):(s=o+c,u=s-o,a=o-(s-u)+(c-u),c=i[++d]),o=s,a!==0&&(r[h++]=a);for(;f=M||-A>=M||(f=e-$,a=e-($+f)+(f-r),f=n-F,l=n-(F+f)+(f-r),f=t-k,u=t-(k+f)+(f-o),f=i-N,c=i-(N+f)+(f-o),a===0&&u===0&&l===0&&c===0)||(M=RX*s+TX*Math.abs(A),A+=$*c+N*a-(k*l+F*u),A>=M||-A>=M))return A;x=a*N,d=Dt*a,h=d-(d-a),p=a-h,d=Dt*N,g=d-(d-N),m=N-g,w=p*m-(x-h*g-p*g-h*m),_=u*F,d=Dt*u,h=d-(d-u),p=u-h,d=Dt*F,g=d-(d-F),m=F-g,E=p*m-(_-h*g-p*g-h*m),y=w-E,f=w-y,Xt[0]=w-(y+f)+(f-E),v=x+y,f=v-x,b=x-(v-f)+(y-f),y=b-_,f=b-y,Xt[1]=b-(y+f)+(f-_),S=v+y,f=S-v,Xt[2]=v-(S-f)+(y-f),Xt[3]=S;const C=J0(4,Ha,4,Xt,iA);x=$*c,d=Dt*$,h=d-(d-$),p=$-h,d=Dt*c,g=d-(d-c),m=c-g,w=p*m-(x-h*g-p*g-h*m),_=k*l,d=Dt*k,h=d-(d-k),p=k-h,d=Dt*l,g=d-(d-l),m=l-g,E=p*m-(_-h*g-p*g-h*m),y=w-E,f=w-y,Xt[0]=w-(y+f)+(f-E),v=x+y,f=v-x,b=x-(v-f)+(y-f),y=b-_,f=b-y,Xt[1]=b-(y+f)+(f-_),S=v+y,f=S-v,Xt[2]=v-(S-f)+(y-f),Xt[3]=S;const T=J0(C,iA,4,Xt,rA);x=a*c,d=Dt*a,h=d-(d-a),p=a-h,d=Dt*c,g=d-(d-c),m=c-g,w=p*m-(x-h*g-p*g-h*m),_=u*l,d=Dt*u,h=d-(d-u),p=u-h,d=Dt*l,g=d-(d-l),m=l-g,E=p*m-(_-h*g-p*g-h*m),y=w-E,f=w-y,Xt[0]=w-(y+f)+(f-E),v=x+y,f=v-x,b=x-(v-f)+(y-f),y=b-_,f=b-y,Xt[1]=b-(y+f)+(f-_),S=v+y,f=S-v,Xt[2]=v-(S-f)+(y-f),Xt[3]=S;const L=J0(T,rA,4,Xt,oA);return oA[L-1]}function kd(e,t,n,i,r,o){const s=(t-o)*(n-r),a=(e-r)*(i-o),u=s-a,l=Math.abs(s+a);return Math.abs(u)>=NX*l?u:-LX(e,t,n,i,r,o,l)}const sA=Math.pow(2,-52),Cd=new Uint32Array(512);class Sp{static from(t,n=UX,i=jX){const r=t.length,o=new Float64Array(r*2);for(let s=0;s>1;if(n>0&&typeof t[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=t;const i=Math.max(2*n-5,0);this._triangles=new Uint32Array(i*3),this._halfedges=new Int32Array(i*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:i,_hullTri:r,_hullHash:o}=this,s=t.length>>1;let a=1/0,u=1/0,l=-1/0,c=-1/0;for(let $=0;$l&&(l=F),k>c&&(c=k),this._ids[$]=$}const f=(a+l)/2,d=(u+c)/2;let h,p,g;for(let $=0,F=1/0;$0&&(p=$,F=k)}let v=t[2*p],b=t[2*p+1],x=1/0;for(let $=0;$N&&($[F++]=A,N=M)}this.hull=$.subarray(0,F),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(kd(m,y,v,b,w,_)<0){const $=p,F=v,k=b;p=g,v=w,b=_,g=$,w=F,_=k}const E=BX(m,y,v,b,w,_);this._cx=E.x,this._cy=E.y;for(let $=0;$0&&Math.abs(A-F)<=sA&&Math.abs(M-k)<=sA||(F=A,k=M,N===h||N===p||N===g))continue;let C=0;for(let Z=0,ee=this._hashKey(A,M);Z=0;)if(T=L,T===C){T=-1;break}if(T===-1)continue;let I=this._addTriangle(T,N,i[T],-1,-1,r[T]);r[N]=this._legalize(I+2),r[T]=I,S++;let z=i[T];for(;L=i[z],kd(A,M,t[2*z],t[2*z+1],t[2*L],t[2*L+1])<0;)I=this._addTriangle(z,N,L,r[N],-1,r[z]),r[N]=this._legalize(I+2),i[z]=z,S--,z=L;if(T===C)for(;L=n[T],kd(A,M,t[2*L],t[2*L+1],t[2*T],t[2*T+1])<0;)I=this._addTriangle(L,N,T,-1,r[T],r[L]),this._legalize(I+2),r[L]=I,i[T]=T,S--,T=L;this._hullStart=n[N]=T,i[T]=n[z]=N,i[N]=z,o[this._hashKey(A,M)]=N,o[this._hashKey(t[2*T],t[2*T+1])]=T}this.hull=new Uint32Array(S);for(let $=0,F=this._hullStart;$0?3-n:1+n)/4}function Q0(e,t,n,i){const r=e-n,o=t-i;return r*r+o*o}function IX(e,t,n,i,r,o,s,a){const u=e-s,l=t-a,c=n-s,f=i-a,d=r-s,h=o-a,p=u*u+l*l,g=c*c+f*f,m=d*d+h*h;return u*(f*m-g*h)-l*(c*m-g*d)+p*(c*h-f*d)<0}function zX(e,t,n,i,r,o){const s=n-e,a=i-t,u=r-e,l=o-t,c=s*s+a*a,f=u*u+l*l,d=.5/(s*l-a*u),h=(l*c-a*f)*d,p=(s*f-u*c)*d;return h*h+p*p}function BX(e,t,n,i,r,o){const s=n-e,a=i-t,u=r-e,l=o-t,c=s*s+a*a,f=u*u+l*l,d=.5/(s*l-a*u),h=e+(l*c-a*f)*d,p=t+(s*f-u*c)*d;return{x:h,y:p}}function su(e,t,n,i){if(i-n<=20)for(let r=n+1;r<=i;r++){const o=e[r],s=t[o];let a=r-1;for(;a>=n&&t[e[a]]>s;)e[a+1]=e[a--];e[a+1]=o}else{const r=n+i>>1;let o=n+1,s=i;Pl(e,r,o),t[e[n]]>t[e[i]]&&Pl(e,n,i),t[e[o]]>t[e[i]]&&Pl(e,o,i),t[e[n]]>t[e[o]]&&Pl(e,n,o);const a=e[o],u=t[a];for(;;){do o++;while(t[e[o]]u);if(s=s-n?(su(e,t,o,i),su(e,t,n,s-1)):(su(e,t,n,s-1),su(e,t,o,i))}}function Pl(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function UX(e){return e[0]}function jX(e){return e[1]}const aA=1e-6;class Bs{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,i){t=+t,n=+n,i=+i;const r=t+i,o=n;if(i<0)throw new Error("negative radius");this._x1===null?this._+=`M${r},${o}`:(Math.abs(this._x1-r)>aA||Math.abs(this._y1-o)>aA)&&(this._+="L"+r+","+o),i&&(this._+=`A${i},${i},0,1,1,${t-i},${n}A${i},${i},0,1,1,${this._x1=r},${this._y1=o}`)}rect(t,n,i,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+i}v${+r}h${-i}Z`}value(){return this._||null}}class iv{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}let qX=class{constructor(t,[n,i,r,o]=[0,0,960,500]){if(!((r=+r)>=(n=+n))||!((o=+o)>=(i=+i)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(t.points.length*2),this.vectors=new Float64Array(t.points.length*2),this.xmax=r,this.xmin=n,this.ymax=o,this.ymin=i,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:i},vectors:r}=this;let o,s;const a=this.circumcenters=this._circumcenters.subarray(0,i.length/3*2);for(let g=0,m=0,y=i.length,v,b;g1;)o-=2;for(let s=2;s0){if(n>=this.ymax)return null;(s=(this.ymax-n)/r)0){if(t>=this.xmax)return null;(s=(this.xmax-t)/i)this.xmax?2:0)|(nthis.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let n=0;n1e-10)return!1}return!0}function XX(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class nw{static from(t,n=HX,i=GX,r){return new nw("length"in t?VX(t,n,i,r):Float64Array.from(KX(t,n,i,r)))}constructor(t){this._delaunator=new Sp(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,n=this.points;if(t.hull&&t.hull.length>2&&YX(t)){this.collinear=Int32Array.from({length:n.length/2},(d,h)=>h).sort((d,h)=>n[2*d]-n[2*h]||n[2*d+1]-n[2*h+1]);const u=this.collinear[0],l=this.collinear[this.collinear.length-1],c=[n[2*u],n[2*u+1],n[2*l],n[2*l+1]],f=1e-8*Math.hypot(c[3]-c[1],c[2]-c[0]);for(let d=0,h=n.length/2;d0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],s[r[0]]=1,r.length===2&&(s[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(t){return new qX(this,t)}*neighbors(t){const{inedges:n,hull:i,_hullIndex:r,halfedges:o,triangles:s,collinear:a}=this;if(a){const f=a.indexOf(t);f>0&&(yield a[f-1]),f=0&&o!==i&&o!==r;)i=o;return o}_step(t,n,i){const{inedges:r,hull:o,_hullIndex:s,halfedges:a,triangles:u,points:l}=this;if(r[t]===-1||!l.length)return(t+1)%(l.length>>1);let c=t,f=Ga(n-l[t*2],2)+Ga(i-l[t*2+1],2);const d=r[t];let h=d;do{let p=u[h];const g=Ga(n-l[p*2],2)+Ga(i-l[p*2+1],2);if(g>5)*e[1]),m=null,y=l.length,v=-1,b=[],x=l.map(_=>({text:t(_),font:n(_),style:r(_),weight:o(_),rotate:s(_),size:~~(i(_)+1e-14),padding:a(_),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:_})).sort((_,E)=>E.size-_.size);++v>1,w.y=e[1]*(c()+.5)>>1,nV(p,w,x,v),w.hasText&&h(g,w,m)&&(b.push(w),m?rV(m,w):m=[{x:w.x+w.x0,y:w.y+w.y0},{x:w.x+w.x1,y:w.y+w.y1}],w.x-=e[0]>>1,w.y-=e[1]>>1)}return b};function d(p){p.width=p.height=1;var g=Math.sqrt(p.getContext("2d").getImageData(0,0,1,1).data.length>>2);p.width=(gc<<5)/g,p.height=ah/g;var m=p.getContext("2d");return m.fillStyle=m.strokeStyle="red",m.textAlign="center",{context:m,ratio:g}}function h(p,g,m){for(var y=g.x,v=g.y,b=Math.sqrt(e[0]*e[0]+e[1]*e[1]),x=u(e),w=c()<.5?1:-1,_=-w,E,S,$;(E=x(_+=w))&&(S=~~E[0],$=~~E[1],!(Math.min(Math.abs(S),Math.abs($))>=b));)if(g.x=y+S,g.y=v+$,!(g.x+g.x0<0||g.y+g.y0<0||g.x+g.x1>e[0]||g.y+g.y1>e[1])&&(!m||!iV(g,p,e[0]))&&(!m||oV(g,m))){for(var F=g.sprite,k=g.width>>5,N=e[0]>>5,A=g.x-(k<<4),M=A&127,C=32-M,T=g.y1-g.y0,L=(g.y+g.y0)*N+(A>>5),I,z=0;z>>M:0);L+=N}return g.sprite=null,!0}return!1}return f.words=function(p){return arguments.length?(l=p,f):l},f.size=function(p){return arguments.length?(e=[+p[0],+p[1]],f):e},f.font=function(p){return arguments.length?(n=vs(p),f):n},f.fontStyle=function(p){return arguments.length?(r=vs(p),f):r},f.fontWeight=function(p){return arguments.length?(o=vs(p),f):o},f.rotate=function(p){return arguments.length?(s=vs(p),f):s},f.text=function(p){return arguments.length?(t=vs(p),f):t},f.spiral=function(p){return arguments.length?(u=uV[p]||p,f):u},f.fontSize=function(p){return arguments.length?(i=vs(p),f):i},f.padding=function(p){return arguments.length?(a=vs(p),f):a},f.random=function(p){return arguments.length?(c=p,f):c},f}function nV(e,t,n,i){if(!t.sprite){var r=e.context,o=e.ratio;r.clearRect(0,0,(gc<<5)/o,ah/o);var s=0,a=0,u=0,l=n.length,c,f,d,h,p;for(--i;++i>5<<5,d=~~Math.max(Math.abs(v+b),Math.abs(v-b))}else c=c+31>>5<<5;if(d>u&&(u=d),s+c>=gc<<5&&(s=0,a+=u,u=0),a+d>=ah)break;r.translate((s+(c>>1))/o,(a+(d>>1))/o),t.rotate&&r.rotate(t.rotate*Z0),r.fillText(t.text,0,0),t.padding&&(r.lineWidth=2*t.padding,r.strokeText(t.text,0,0)),r.restore(),t.width=c,t.height=d,t.xoff=s,t.yoff=a,t.x1=c>>1,t.y1=d>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,s+=c}for(var w=r.getImageData(0,0,(gc<<5)/o,ah/o).data,_=[];--i>=0;)if(t=n[i],!!t.hasText){for(c=t.width,f=c>>5,d=t.y1-t.y0,h=0;h>5),F=w[(a+p)*(gc<<5)+(s+h)<<2]?1<<31-h%32:0;_[$]|=F,E|=F}E?S=p:(t.y0++,d--,p--,a++)}t.y1=t.y0+S,t.sprite=_.slice(0,(t.y1-t.y0)*f)}}}function iV(e,t,n){n>>=5;for(var i=e.sprite,r=e.width>>5,o=e.x-(r<<4),s=o&127,a=32-s,u=e.y1-e.y0,l=(e.y+e.y0)*n+(o>>5),c,f=0;f>>s:0))&t[l+d])return!0;l+=n}return!1}function rV(e,t){var n=e[0],i=e[1];t.x+t.x0i.x&&(i.x=t.x+t.x1),t.y+t.y1>i.y&&(i.y=t.y+t.y1)}function oV(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0t[0].y&&e.y+e.y0g(p(m))}r.forEach(p=>{p[s[0]]=NaN,p[s[1]]=NaN,p[s[3]]=0});const l=o.words(r).text(e.text).size(e.size||[500,500]).padding(e.padding||1).spiral(e.spiral||"archimedean").rotate(e.rotate||0).font(e.font||"sans-serif").fontStyle(e.fontStyle||"normal").fontWeight(e.fontWeight||"normal").fontSize(a).random(ni).layout(),c=o.size(),f=c[0]>>1,d=c[1]>>1,h=l.length;for(let p=0,g,m;pnew Uint8Array(e),dV=e=>new Uint16Array(e),Cc=e=>new Uint32Array(e);function hV(){let e=8,t=[],n=Cc(0),i=Fd(0,e),r=Fd(0,e);return{data:()=>t,seen:()=>n=pV(n,t.length),add(o){for(let s=0,a=t.length,u=o.length,l;st.length,curr:()=>i,prev:()=>r,reset:o=>r[o]=i[o],all:()=>e<257?255:e<65537?65535:4294967295,set(o,s){i[o]|=s},clear(o,s){i[o]&=~s},resize(o,s){const a=i.length;(o>a||s>e)&&(e=Math.max(s,e),i=Fd(o,e,i),r=Fd(o,e))}}}function pV(e,t,n){return e.length>=t?e:(n=n||new e.constructor(t),n.set(e),n)}function Fd(e,t,n){const i=(t<257?fV:t<65537?dV:Cc)(e);return n&&i.set(n),i}function uA(e,t,n){const i=1<0)for(m=0;me,size:()=>n}}function gV(e,t){return e.sort.call(t,(n,i)=>{const r=e[n],o=e[i];return ro?1:0}),NP(e,t)}function mV(e,t,n,i,r,o,s,a,u){let l=0,c=0,f;for(f=0;lt.modified(i.fields));return n?this.reinit(e,t):this.eval(e,t)}else return this.init(e,t)},init(e,t){const n=e.fields,i=e.query,r=this._indices={},o=this._dims=[],s=i.length;let a=0,u,l;for(;a{const o=r.remove(t,n);for(const s in i)i[s].reindex(o)})},update(e,t,n){const i=this._dims,r=e.query,o=t.stamp,s=i.length;let a=0,u,l;for(n.filters=0,l=0;lh)for(m=h,y=Math.min(f,p);mp)for(m=Math.max(f,p),y=d;mf)for(p=f,g=Math.min(l,d);pd)for(p=Math.max(l,d),g=c;pa[c]&n?null:s[c];return o.filter(o.MOD,l),r&r-1?(o.filter(o.ADD,c=>{const f=a[c]&n;return!f&&f^u[c]&n?s[c]:null}),o.filter(o.REM,c=>{const f=a[c]&n;return f&&!(f^(f^u[c]&n))?s[c]:null})):(o.filter(o.ADD,l),o.filter(o.REM,c=>(a[c]&n)===r?s[c]:null)),o.filter(o.SOURCE,c=>l(c._index))}});const yV=Object.freeze(Object.defineProperty({__proto__:null,crossfilter:ow,resolvefilter:sw},Symbol.toStringTag,{value:"Module"})),vV="RawCode",sa="Literal",bV="Property",xV="Identifier",wV="ArrayExpression",EV="BinaryExpression",O5="CallExpression",_V="ConditionalExpression",SV="LogicalExpression",$V="MemberExpression",AV="ObjectExpression",kV="UnaryExpression";function Ti(e){this.type=e}Ti.prototype.visit=function(e){let t,n,i;if(e(this))return 1;for(t=CV(this),n=0,i=t.length;n";mr[aa]="Identifier";mr[os]="Keyword";mr[Jg]="Null";mr[ka]="Numeric";mr[dn]="Punctuator";mr[Bf]="String";mr[FV]="RegularExpression";var MV="ArrayExpression",TV="BinaryExpression",DV="CallExpression",NV="ConditionalExpression",R5="Identifier",OV="Literal",RV="LogicalExpression",LV="MemberExpression",PV="ObjectExpression",IV="Property",zV="UnaryExpression",gt="Unexpected token %0",BV="Unexpected number",UV="Unexpected string",jV="Unexpected identifier",qV="Unexpected reserved word",WV="Unexpected end of input",rv="Invalid regular expression",e1="Invalid regular expression: missing /",L5="Octal literals are not allowed in strict mode.",HV="Duplicate data property in object literal not allowed in strict mode",$t="ILLEGAL",ef="Disabled.",GV=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),YV=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function Qg(e,t){if(!e)throw new Error("ASSERT: "+t)}function Dr(e){return e>=48&&e<=57}function aw(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function Fc(e){return"01234567".indexOf(e)>=0}function XV(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function tf(e){return e===10||e===13||e===8232||e===8233}function Uf(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&GV.test(String.fromCharCode(e))}function $p(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&YV.test(String.fromCharCode(e))}const VV={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function P5(){for(;O1114111||e!=="}")&&Se({},gt,$t),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,i=(t-65536&1023)+56320,String.fromCharCode(n,i))}function I5(){var e,t;for(e=J.charCodeAt(O++),t=String.fromCharCode(e),e===92&&(J.charCodeAt(O)!==117&&Se({},gt,$t),++O,e=ov("u"),(!e||e==="\\"||!Uf(e.charCodeAt(0)))&&Se({},gt,$t),t=e);O>>=")return O+=4,{type:dn,value:s,start:e,end:O};if(o=s.substr(0,3),o===">>>"||o==="<<="||o===">>=")return O+=3,{type:dn,value:o,start:e,end:O};if(r=o.substr(0,2),i===r[1]&&"+-<>&|".indexOf(i)>=0||r==="=>")return O+=2,{type:dn,value:r,start:e,end:O};if(r==="//"&&Se({},gt,$t),"<>=!+-*%&|^/".indexOf(i)>=0)return++O,{type:dn,value:i,start:e,end:O};Se({},gt,$t)}function ZV(e){let t="";for(;O=0&&O=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(i,r)=>{if(parseInt(r,16)<=1114111)return"x";Se({},rv)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{Se({},rv)}try{return new RegExp(e,t)}catch{return null}}function iK(){var e,t,n,i,r;for(e=J[O],Qg(e==="/","Regular expression literal must start with a slash"),t=J[O++],n=!1,i=!1;O=0&&Se({},rv,n),{value:n,literal:t}}function oK(){var e,t,n,i;return De=null,P5(),e=O,t=iK(),n=rK(),i=nK(t.value,n.value),{literal:t.literal+n.literal,value:i,regex:{pattern:t.value,flags:n.value},start:e,end:O}}function sK(e){return e.type===aa||e.type===os||e.type===Kg||e.type===Jg}function z5(){if(P5(),O>=jt)return{type:zf,start:O,end:O};const e=J.charCodeAt(O);return Uf(e)?QV():e===40||e===41||e===59?t1():e===39||e===34?tK():e===46?Dr(J.charCodeAt(O+1))?cA():t1():Dr(e)?cA():t1()}function gn(){const e=De;return O=e.end,De=z5(),O=e.end,e}function B5(){const e=O;De=z5(),O=e}function aK(e){const t=new Ti(MV);return t.elements=e,t}function fA(e,t,n){const i=new Ti(e==="||"||e==="&&"?RV:TV);return i.operator=e,i.left=t,i.right=n,i}function uK(e,t){const n=new Ti(DV);return n.callee=e,n.arguments=t,n}function lK(e,t,n){const i=new Ti(NV);return i.test=e,i.consequent=t,i.alternate=n,i}function uw(e){const t=new Ti(R5);return t.name=e,t}function mc(e){const t=new Ti(OV);return t.value=e.value,t.raw=J.slice(e.start,e.end),e.regex&&(t.raw==="//"&&(t.raw="/(?:)/"),t.regex=e.regex),t}function dA(e,t,n){const i=new Ti(LV);return i.computed=e==="[",i.object=t,i.property=n,i.computed||(n.member=!0),i}function cK(e){const t=new Ti(PV);return t.properties=e,t}function hA(e,t,n){const i=new Ti(IV);return i.key=t,i.value=n,i.kind=e,i}function fK(e,t){const n=new Ti(zV);return n.operator=e,n.argument=t,n.prefix=!0,n}function Se(e,t){var n,i=Array.prototype.slice.call(arguments,2),r=t.replace(/%(\d)/g,(o,s)=>(Qg(s":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11;break}return t}function _K(){var e,t,n,i,r,o,s,a,u,l;if(e=De,u=uh(),i=De,r=mA(i),r===0)return u;for(i.prec=r,gn(),t=[e,De],s=uh(),o=[u,i,s];(r=mA(De))>0;){for(;o.length>2&&r<=o[o.length-2].prec;)s=o.pop(),a=o.pop().value,u=o.pop(),t.pop(),n=fA(a,u,s),o.push(n);i=gn(),i.prec=r,o.push(i),t.push(De),n=uh(),o.push(n)}for(l=o.length-1,n=o[l],t.pop();l>1;)t.pop(),n=fA(o[l-1].value,o[l-2],n),l-=2;return n}function ua(){var e,t,n;return e=_K(),Ue("?")&&(gn(),t=ua(),qt(":"),n=ua(),e=lK(e,t,n)),e}function lw(){const e=ua();if(Ue(","))throw new Error(ef);return e}function cw(e){J=e,O=0,jt=J.length,De=null,B5();const t=lw();if(De.type!==zf)throw new Error("Unexpect token after expression.");return t}var U5={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function j5(e){function t(s,a,u,l){let c=e(a[0]);return u&&(c=u+"("+c+")",u.lastIndexOf("new ",0)===0&&(c="("+c+")")),c+"."+s+(l<0?"":l===0?"()":"("+a.slice(1).map(e).join(",")+")")}function n(s,a,u){return l=>t(s,l,a,u)}const i="new Date",r="String",o="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(s){s.length<3&&R("Missing arguments to clamp function."),s.length>3&&R("Too many arguments to clamp function.");const a=s.map(e);return"Math.max("+a[1]+", Math.min("+a[2]+","+a[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:i,date:n("getDate",i,0),day:n("getDay",i,0),year:n("getFullYear",i,0),month:n("getMonth",i,0),hours:n("getHours",i,0),minutes:n("getMinutes",i,0),seconds:n("getSeconds",i,0),milliseconds:n("getMilliseconds",i,0),time:n("getTime",i,0),timezoneoffset:n("getTimezoneOffset",i,0),utcdate:n("getUTCDate",i,0),utcday:n("getUTCDay",i,0),utcyear:n("getUTCFullYear",i,0),utcmonth:n("getUTCMonth",i,0),utchours:n("getUTCHours",i,0),utcminutes:n("getUTCMinutes",i,0),utcseconds:n("getUTCSeconds",i,0),utcmilliseconds:n("getUTCMilliseconds",i,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",r,0),lower:n("toLowerCase",r,0),substring:n("substring",r),split:n("split",r),trim:n("trim",r,0),regexp:o,test:n("test",o),if:function(s){s.length<3&&R("Missing arguments to if function."),s.length>3&&R("Too many arguments to if function.");const a=s.map(e);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function SK(e){const t=e&&e.length-1;return t&&(e[0]==='"'&&e[t]==='"'||e[0]==="'"&&e[t]==="'")?e.slice(1,-1):e}function q5(e){e=e||{};const t=e.allowed?Ai(e.allowed):{},n=e.forbidden?Ai(e.forbidden):{},i=e.constants||U5,r=(e.functions||j5)(f),o=e.globalvar,s=e.fieldvar,a=ce(o)?o:p=>`${o}["${p}"]`;let u={},l={},c=0;function f(p){if(X(p))return p;const g=d[p.type];return g==null&&R("Unsupported type: "+p.type),g(p)}const d={Literal:p=>p.raw,Identifier:p=>{const g=p.name;return c>0?g:re(n,g)?R("Illegal identifier: "+g):re(i,g)?i[g]:re(t,g)?g:(u[g]=1,a(g))},MemberExpression:p=>{const g=!p.computed,m=f(p.object);g&&(c+=1);const y=f(p.property);return m===s&&(l[SK(y)]=1),g&&(c-=1),m+(g?"."+y:"["+y+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&R("Illegal callee type: "+p.callee.type);const g=p.callee.name,m=p.arguments,y=re(r,g)&&r[g];return y||R("Unrecognized function: "+g),ce(y)?y(m):y+"("+m.map(f).join(",")+")"},ArrayExpression:p=>"["+p.elements.map(f).join(",")+"]",BinaryExpression:p=>"("+f(p.left)+" "+p.operator+" "+f(p.right)+")",UnaryExpression:p=>"("+p.operator+f(p.argument)+")",ConditionalExpression:p=>"("+f(p.test)+"?"+f(p.consequent)+":"+f(p.alternate)+")",LogicalExpression:p=>"("+f(p.left)+p.operator+f(p.right)+")",ObjectExpression:p=>"{"+p.properties.map(f).join(",")+"}",Property:p=>{c+=1;const g=f(p.key);return c-=1,g+":"+f(p.value)}};function h(p){const g={code:f(p),globals:Object.keys(u),fields:Object.keys(l)};return u={},l={},g}return h.functions=r,h.constants=i,h}const yA=Symbol("vega_selection_getter");function W5(e){return(!e.getter||!e.getter[yA])&&(e.getter=Zn(e.field),e.getter[yA]=!0),e.getter}const fw="intersect",vA="union",$K="vlMulti",AK="vlPoint",bA="or",kK="and",Gi="_vgsid_",nf=Zn(Gi),CK="E",FK="R",MK="R-E",TK="R-LE",DK="R-RE",Ap="index:unit";function xA(e,t){for(var n=t.fields,i=t.values,r=n.length,o=0,s,a;ole(t.fields?{values:t.fields.map(i=>W5(i)(n.datum))}:{[Gi]:nf(n.datum)},t))}function IK(e,t,n,i){for(var r=this.context.data[e],o=r?r.values.value:[],s={},a={},u={},l,c,f,d,h,p,g,m,y,v,b=o.length,x=0,w,_;x(E[c[$].field]=S,E),{})))}else h=Gi,p=nf(l),g=s[h]||(s[h]={}),m=g[d]||(g[d]=[]),m.push(p),n&&(m=a[d]||(a[d]=[]),m.push({[Gi]:p}));if(t=t||vA,s[Gi]?s[Gi]=i1[`${Gi}_${t}`](...Object.values(s[Gi])):Object.keys(s).forEach(E=>{s[E]=Object.keys(s[E]).map(S=>s[E][S]).reduce((S,$)=>S===void 0?$:i1[`${u[E]}_${t}`](S,$))}),o=Object.keys(a),n&&o.length){const E=i?AK:$K;s[E]=t===vA?{[bA]:o.reduce((S,$)=>(S.push(...a[$]),S),[])}:{[kK]:o.map(S=>({[bA]:a[S]}))}}return s}var i1={[`${Gi}_union`]:jP,[`${Gi}_intersect`]:BP,E_union:function(e,t){if(!e.length)return t;for(var n=0,i=t.length;nt.indexOf(n)>=0):t},R_union:function(e,t){var n=Pt(t[0]),i=Pt(t[1]);return n>i&&(n=t[1],i=t[0]),e.length?(e[0]>n&&(e[0]=n),e[1]i&&(n=t[1],i=t[0]),e.length?ii&&(e[1]=i),e):[n,i]}};const zK=":",BK="@";function dw(e,t,n,i){t[0].type!==sa&&R("First argument to selection functions must be a string literal.");const r=t[0].value,o=t.length>=2&&xe(t).value,s="unit",a=BK+s,u=zK+r;o===fw&&!re(i,a)&&(i[a]=n.getData(r).indataRef(n,s)),re(i,u)||(i[u]=n.getData(r).tuplesRef())}function G5(e){const t=this.context.data[e];return t?t.values.value:[]}function UK(e,t,n){const i=this.context.data[e]["index:"+t],r=i?i.value.get(n):void 0;return r&&r.count}function jK(e,t){const n=this.context.dataflow,i=this.context.data[e],r=i.input;return n.pulse(r,n.changeset().remove(ei).insert(t)),1}function qK(e,t,n){if(e){const i=this.context.dataflow,r=e.mark.source;i.pulse(r,i.changeset().encode(e,t))}return n!==void 0?n:e}const jf=e=>function(t,n){return this.context.dataflow.locale()[e](n)(t)},WK=jf("format"),Y5=jf("timeFormat"),HK=jf("utcFormat"),GK=jf("timeParse"),YK=jf("utcParse"),Md=new Date(2e3,0,1);function em(e,t,n){return!Number.isInteger(e)||!Number.isInteger(t)?"":(Md.setYear(2e3),Md.setMonth(e),Md.setDate(t),Y5.call(this,Md,n))}function XK(e){return em.call(this,e,1,"%B")}function VK(e){return em.call(this,e,1,"%b")}function KK(e){return em.call(this,0,2+e,"%A")}function JK(e){return em.call(this,0,2+e,"%a")}const QK=":",ZK="@",sv="%",X5="$";function hw(e,t,n,i){t[0].type!==sa&&R("First argument to data functions must be a string literal.");const r=t[0].value,o=QK+r;if(!re(o,i))try{i[o]=n.getData(r).tuplesRef()}catch{}}function eJ(e,t,n,i){t[0].type!==sa&&R("First argument to indata must be a string literal."),t[1].type!==sa&&R("Second argument to indata must be a string literal.");const r=t[0].value,o=t[1].value,s=ZK+o;re(s,i)||(i[s]=n.getData(r).indataRef(n,o))}function rn(e,t,n,i){if(t[0].type===sa)wA(n,i,t[0].value);else for(e in n.scales)wA(n,i,e)}function wA(e,t,n){const i=sv+n;if(!re(t,i))try{t[i]=e.scaleRef(n)}catch{}}function yr(e,t){if(ce(e))return e;if(X(e)){const n=t.scales[e];return n&&fB(n.value)?n.value:void 0}}function tJ(e,t,n){t.__bandwidth=r=>r&&r.bandwidth?r.bandwidth():0,n._bandwidth=rn,n._range=rn,n._scale=rn;const i=r=>"_["+(r.type===sa?H(sv+r.value):H(sv)+"+"+e(r))+"]";return{_bandwidth:r=>`this.__bandwidth(${i(r[0])})`,_range:r=>`${i(r[0])}.range()`,_scale:r=>`${i(r[0])}(${e(r[1])})`}}function pw(e,t){return function(n,i,r){if(n){const o=yr(n,(r||this).context);return o&&o.path[e](i)}else return t(i)}}const nJ=pw("area",AW),iJ=pw("bounds",MW),rJ=pw("centroid",LW);function oJ(e,t){const n=yr(e,(t||this).context);return n&&n.scale()}function sJ(e){const t=this.context.group;let n=!1;if(t)for(;e;){if(e===t){n=!0;break}e=e.mark.group}return n}function gw(e,t,n){try{e[t].apply(e,["EXPRESSION"].concat([].slice.call(n)))}catch(i){e.warn(i)}return n[n.length-1]}function aJ(){return gw(this.context.dataflow,"warn",arguments)}function uJ(){return gw(this.context.dataflow,"info",arguments)}function lJ(){return gw(this.context.dataflow,"debug",arguments)}function r1(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function av(e){const t=zo(e),n=r1(t.r),i=r1(t.g),r=r1(t.b);return .2126*n+.7152*i+.0722*r}function cJ(e,t){const n=av(e),i=av(t),r=Math.max(n,i),o=Math.min(n,i);return(r+.05)/(o+.05)}function fJ(){const e=[].slice.call(arguments);return e.unshift({}),le(...e)}function V5(e,t){return e===t||e!==e&&t!==t?!0:P(e)?P(t)&&e.length===t.length?dJ(e,t):!1:V(e)&&V(t)?K5(e,t):!1}function dJ(e,t){for(let n=0,i=e.length;nK5(e,t)}function hJ(e,t,n,i,r,o){const s=this.context.dataflow,a=this.context.data[e],u=a.input,l=s.stamp();let c=a.changes,f,d;if(s._trigger===!1||!(u.value.length||t||i))return 0;if((!c||c.stamp{a.modified=!0,s.pulse(u,c).run()},!0,1)),n&&(f=n===!0?ei:P(n)||ug(n)?n:EA(n),c.remove(f)),t&&c.insert(t),i&&(f=EA(i),u.value.some(f)?c.remove(f):c.insert(i)),r)for(d in o)c.modify(r,d,o[d]);return 1}function pJ(e){const t=e.touches,n=t[0].clientX-t[1].clientX,i=t[0].clientY-t[1].clientY;return Math.hypot(n,i)}function gJ(e){const t=e.touches;return Math.atan2(t[0].clientY-t[1].clientY,t[0].clientX-t[1].clientX)}const _A={};function mJ(e,t){const n=_A[t]||(_A[t]=Zn(t));return P(e)?e.map(n):n(e)}function mw(e){return P(e)||ArrayBuffer.isView(e)?e:null}function yw(e){return mw(e)||(X(e)?e:null)}function yJ(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?t-1:0),i=1;i1?t-1:0),i=1;i1?t-1:0),i=1;io.stop(l(c),e(c))),o}function TJ(e,t,n){const i=yr(e,(n||this).context);return function(r){return i?i.path.context(r)(t):""}}function DJ(e){let t=null;return function(n){return n?Wc(n,t=t||Mu(e)):e}}const J5=e=>e.data;function Q5(e,t){const n=G5.call(t,e);return n.root&&n.root.lookup||{}}function NJ(e,t,n){const i=Q5(e,this),r=i[t],o=i[n];return r&&o?r.path(o).map(J5):void 0}function OJ(e,t){const n=Q5(e,this)[t];return n?n.ancestors().map(J5):void 0}const Z5=()=>typeof window<"u"&&window||null;function RJ(){const e=Z5();return e?e.screen:{}}function LJ(){const e=Z5();return e?[e.innerWidth,e.innerHeight]:[void 0,void 0]}function PJ(){const e=this.context.dataflow,t=e.container&&e.container();return t?[t.clientWidth,t.clientHeight]:[void 0,void 0]}function eO(e,t,n){if(!e)return[];const[i,r]=e,o=new nt().set(i[0],i[1],r[0],r[1]),s=n||this.context.dataflow.scenegraph().root;return PD(s,o,IJ(t))}function IJ(e){let t=null;if(e){const n=Y(e.marktype),i=Y(e.markname);t=r=>(!n.length||n.some(o=>r.marktype===o))&&(!i.length||i.some(o=>r.name===o))}return t}function zJ(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:5;e=Y(e);const r=e[e.length-1];return r===void 0||Math.hypot(r[0]-t,r[1]-n)>i?[...e,[t,n]]:e}function BJ(e){return Y(e).reduce((t,n,i)=>{let[r,o]=n;return t+=i==0?`M ${r},${o} `:i===e.length-1?" Z":`L ${r},${o} `},"")}function UJ(e,t,n){const{x:i,y:r,mark:o}=n,s=new nt().set(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);for(const[u,l]of t)us.x2&&(s.x2=u),ls.y2&&(s.y2=l);return s.translate(i,r),eO([[s.x1,s.y1],[s.x2,s.y2]],e,o).filter(u=>jJ(u.x,u.y,t))}function jJ(e,t,n){let i=0;for(let r=0,o=n.length-1;rt!=a>t&&e<(s-u)*(t-l)/(a-l)+u&&i++}return i&1}const rf={random(){return ni()},cumulativeNormal:hg,cumulativeLogNormal:Ab,cumulativeUniform:Mb,densityNormal:wb,densityLogNormal:$b,densityUniform:Fb,quantileNormal:pg,quantileLogNormal:kb,quantileUniform:Tb,sampleNormal:dg,sampleLogNormal:Sb,sampleUniform:Cb,isArray:P,isBoolean:es,isDate:Fo,isDefined(e){return e!==void 0},isNumber:Ee,isObject:V,isRegExp:fF,isString:X,isTuple:ug,isValid(e){return e!=null&&e===e},toBoolean:eb,toDate(e){return tb(e)},toNumber:Pt,toString:nb,indexof:vJ,join:yJ,lastindexof:bJ,replace:wJ,reverse:EJ,slice:xJ,flush:lF,lerp:dF,merge:fJ,pad:gF,peek:xe,pluck:mJ,span:yf,inrange:nu,truncate:mF,rgb:zo,lab:Nh,hcl:Oh,hsl:Th,luminance:av,contrast:cJ,sequence:Dn,format:WK,utcFormat:HK,utcParse:YK,utcOffset:VF,utcSequence:QF,timeFormat:Y5,timeParse:GK,timeOffset:XF,timeSequence:JF,timeUnitSpecifier:PF,monthFormat:XK,monthAbbrevFormat:VK,dayFormat:KK,dayAbbrevFormat:JK,quarter:oF,utcquarter:sF,week:zF,utcweek:jF,dayofyear:IF,utcdayofyear:UF,warn:aJ,info:uJ,debug:lJ,extent(e){return ir(e)},inScope:sJ,intersect:eO,clampRange:aF,pinchDistance:pJ,pinchAngle:gJ,screen:RJ,containerSize:PJ,windowSize:LJ,bandspace:_J,setdata:jK,pathShape:DJ,panLinear:tF,panLog:nF,panPow:iF,panSymlog:rF,zoomLinear:Xv,zoomLog:Vv,zoomPow:vh,zoomSymlog:Kv,encode:qK,modify:hJ,lassoAppend:zJ,lassoPath:BJ,intersectLasso:UJ},qJ=["view","item","group","xy","x","y"],WJ="event.vega.",tO="this.",vw={},nO={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:e=>`_[${H(X5+e)}]`,functions:HJ,constants:U5,visitors:vw},uv=q5(nO);function HJ(e){const t=j5(e);qJ.forEach(n=>t[n]=WJ+n);for(const n in rf)t[n]=tO+n;return le(t,tJ(e,rf,vw)),t}function tt(e,t,n){return arguments.length===1?rf[e]:(rf[e]=t,n&&(vw[e]=n),uv&&(uv.functions[e]=tO+e),this)}tt("bandwidth",SJ,rn);tt("copy",$J,rn);tt("domain",AJ,rn);tt("range",CJ,rn);tt("invert",kJ,rn);tt("scale",FJ,rn);tt("gradient",MJ,rn);tt("geoArea",nJ,rn);tt("geoBounds",iJ,rn);tt("geoCentroid",rJ,rn);tt("geoShape",TJ,rn);tt("geoScale",oJ,rn);tt("indata",UK,eJ);tt("data",G5,hw);tt("treePath",NJ,hw);tt("treeAncestors",OJ,hw);tt("vlSelectionTest",NK,dw);tt("vlSelectionIdTest",LK,dw);tt("vlSelectionResolve",IK,dw);tt("vlSelectionTuples",PK);function ur(e,t){const n={};let i;try{e=X(e)?e:H(e)+"",i=cw(e)}catch{R("Expression parse error: "+e)}i.visit(o=>{if(o.type!==O5)return;const s=o.callee.name,a=nO.visitors[s];a&&a(s,o.arguments,t,n)});const r=uv(i);return r.globals.forEach(o=>{const s=X5+o;!re(n,s)&&t.getSignal(o)&&(n[s]=t.signalRef(o))}),{$expr:le({code:r.code},t.options.ast?{ast:i}:null),$fields:r.fields,$params:n}}function GJ(e){const t=this,n=e.operators||[];return e.background&&(t.background=e.background),e.eventConfig&&(t.eventConfig=e.eventConfig),e.locale&&(t.locale=e.locale),n.forEach(i=>t.parseOperator(i)),n.forEach(i=>t.parseOperatorParameters(i)),(e.streams||[]).forEach(i=>t.parseStream(i)),(e.updates||[]).forEach(i=>t.parseUpdate(i)),t.resolve()}const YJ=Ai(["rule"]),SA=Ai(["group","image","rect"]);function XJ(e,t){let n="";return YJ[t]||(e.x2&&(e.x?(SA[t]&&(n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),n+="o.width=o.x2-o.x;"):n+="o.x=o.x2-(o.width||0);"),e.xc&&(n+="o.x=o.xc-(o.width||0)/2;"),e.y2&&(e.y?(SA[t]&&(n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),n+="o.height=o.y2-o.y;"):n+="o.y=o.y2-(o.height||0);"),e.yc&&(n+="o.y=o.yc-(o.height||0)/2;")),n}function bw(e){return(e+"").toLowerCase()}function VJ(e){return bw(e)==="operator"}function KJ(e){return bw(e)==="collect"}function Il(e,t,n){n.endsWith(";")||(n="return("+n+");");const i=Function(...t.concat(n));return e&&e.functions?i.bind(e.functions):i}function JJ(e,t,n,i){return`((u = ${e}) < (v = ${t}) || u == null) && v != null ? ${n} + : (u > v || v == null) && u != null ? ${i} + : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ${n} + : v !== v && u === u ? ${i} : `}var QJ={operator:(e,t)=>Il(e,["_"],t.code),parameter:(e,t)=>Il(e,["datum","_"],t.code),event:(e,t)=>Il(e,["event"],t.code),handler:(e,t)=>{const n=`var datum=event.item&&event.item.datum;return ${t.code};`;return Il(e,["_","event"],n)},encode:(e,t)=>{const{marktype:n,channels:i}=t;let r="var o=item,datum=o.datum,m=0,$;";for(const o in i){const s="o["+H(o)+"]";r+=`$=${i[o].code};if(${s}!==$)${s}=$,m=1;`}return r+=XJ(i,n),r+="return m;",Il(e,["item","_"],r)},codegen:{get(e){const t=`[${e.map(H).join("][")}]`,n=Function("_",`return _${t};`);return n.path=t,n},comparator(e,t){let n;const i=(o,s)=>{const a=t[s];let u,l;return o.path?(u=`a${o.path}`,l=`b${o.path}`):((n=n||{})["f"+s]=o,u=`this.f${s}(a)`,l=`this.f${s}(b)`),JJ(u,l,-a,a)},r=Function("a","b","var u, v; return "+e.map(i).join("")+"0;");return n?r.bind(n):r}}};function ZJ(e){const t=this;VJ(e.type)||!e.type?t.operator(e,e.update?t.operatorExpression(e.update):null):t.transform(e,e.type)}function eQ(e){const t=this;if(e.params){const n=t.get(e.id);n||R("Invalid operator id: "+e.id),t.dataflow.connect(n,n.parameters(t.parseParameters(e.params),e.react,e.initonly))}}function tQ(e,t){t=t||{};const n=this;for(const i in e){const r=e[i];t[i]=P(r)?r.map(o=>$A(o,n,t)):$A(r,n,t)}return t}function $A(e,t,n){if(!e||!V(e))return e;for(let i=0,r=AA.length,o;ir&&r.$tupleid?ne:r);return t.fn[n]||(t.fn[n]=Jv(i,e.$order,t.expr.codegen))}function aQ(e,t){const n=e.$encode,i={};for(const r in n){const o=n[r];i[r]=$n(t.encodeExpression(o.$expr),o.$fields),i[r].output=o.$output}return i}function uQ(e,t){return t}function lQ(e,t){const n=e.$subflow;return function(i,r,o){const s=t.fork().parse(n),a=s.get(n.operators[0].id),u=s.signals.parent;return u&&u.set(o),a.detachSubflow=()=>t.detach(s),a}}function cQ(){return ne}function fQ(e){var t=this,n=e.filter!=null?t.eventExpression(e.filter):void 0,i=e.stream!=null?t.get(e.stream):void 0,r;e.source?i=t.events(e.source,e.type,n):e.merge&&(r=e.merge.map(o=>t.get(o)),i=r[0].merge.apply(r[0],r.slice(1))),e.between&&(r=e.between.map(o=>t.get(o)),i=i.between(r[0],r[1])),e.filter&&(i=i.filter(n)),e.throttle!=null&&(i=i.throttle(+e.throttle)),e.debounce!=null&&(i=i.debounce(+e.debounce)),i==null&&R("Invalid stream definition: "+JSON.stringify(e)),e.consume&&i.consume(!0),t.stream(e,i)}function dQ(e){var t=this,n=V(n=e.source)?n.$ref:n,i=t.get(n),r=null,o=e.update,s=void 0;i||R("Source not defined: "+e.source),r=e.target&&e.target.$expr?t.eventExpression(e.target.$expr):t.get(e.target),o&&o.$expr&&(o.$params&&(s=t.parseParameters(o.$params)),o=t.handlerExpression(o.$expr)),t.update(e,i,r,o,s)}const hQ={skip:!0};function pQ(e){var t=this,n={};if(e.signals){var i=n.signals={};Object.keys(t.signals).forEach(o=>{const s=t.signals[o];e.signals(o,s)&&(i[o]=s.value)})}if(e.data){var r=n.data={};Object.keys(t.data).forEach(o=>{const s=t.data[o];e.data(o,s)&&(r[o]=s.input.value)})}return t.subcontext&&e.recurse!==!1&&(n.subcontext=t.subcontext.map(o=>o.getState(e))),n}function gQ(e){var t=this,n=t.dataflow,i=e.data,r=e.signals;Object.keys(r||{}).forEach(o=>{n.update(t.signals[o],r[o],hQ)}),Object.keys(i||{}).forEach(o=>{n.pulse(t.data[o].input,n.changeset().remove(ei).insert(i[o]))}),(e.subcontext||[]).forEach((o,s)=>{const a=t.subcontext[s];a&&a.setState(o)})}function iO(e,t,n,i){return new rO(e,t,n,i)}function rO(e,t,n,i){this.dataflow=e,this.transforms=t,this.events=e.events.bind(e),this.expr=i||QJ,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},n&&(this.functions=Object.create(n),this.functions.context=this)}function kA(e){this.dataflow=e.dataflow,this.transforms=e.transforms,this.events=e.events,this.expr=e.expr,this.signals=Object.create(e.signals),this.scales=Object.create(e.scales),this.nodes=Object.create(e.nodes),this.data=Object.create(e.data),this.fn=Object.create(e.fn),e.functions&&(this.functions=Object.create(e.functions),this.functions.context=this)}rO.prototype=kA.prototype={fork(){const e=new kA(this);return(this.subcontext||(this.subcontext=[])).push(e),e},detach(e){this.subcontext=this.subcontext.filter(n=>n!==e);const t=Object.keys(e.nodes);for(const n of t)e.nodes[n]._targets=null;for(const n of t)e.nodes[n].detach();e.nodes=null},get(e){return this.nodes[e]},set(e,t){return this.nodes[e]=t},add(e,t){const n=this,i=n.dataflow,r=e.value;if(n.set(e.id,t),KJ(e.type)&&r&&(r.$ingest?i.ingest(t,r.$ingest,r.$format):r.$request?i.preload(t,r.$request,r.$format):i.pulse(t,i.changeset().insert(r))),e.root&&(n.root=t),e.parent){let o=n.get(e.parent.$ref);o?(i.connect(o,[t]),t.targets().add(o)):(n.unresolved=n.unresolved||[]).push(()=>{o=n.get(e.parent.$ref),i.connect(o,[t]),t.targets().add(o)})}if(e.signal&&(n.signals[e.signal]=t),e.scale&&(n.scales[e.scale]=t),e.data)for(const o in e.data){const s=n.data[o]||(n.data[o]={});e.data[o].forEach(a=>s[a]=t)}},resolve(){return(this.unresolved||[]).forEach(e=>e()),delete this.unresolved,this},operator(e,t){this.add(e,this.dataflow.add(e.value,t))},transform(e,t){this.add(e,this.dataflow.add(this.transforms[bw(t)]))},stream(e,t){this.set(e.id,t)},update(e,t,n,i,r){this.dataflow.on(t,n,i,r,e.options)},operatorExpression(e){return this.expr.operator(this,e)},parameterExpression(e){return this.expr.parameter(this,e)},eventExpression(e){return this.expr.event(this,e)},handlerExpression(e){return this.expr.handler(this,e)},encodeExpression(e){return this.expr.encode(this,e)},parse:GJ,parseOperator:ZJ,parseOperatorParameters:eQ,parseParameters:tQ,parseStream:fQ,parseUpdate:dQ,getState:pQ,setState:gQ};function mQ(e){const t=e.container();t&&(t.setAttribute("role","graphics-document"),t.setAttribute("aria-roleDescription","visualization"),oO(t,e.description()))}function oO(e,t){e&&(t==null?e.removeAttribute("aria-label"):e.setAttribute("aria-label",t))}function yQ(e){e.add(null,t=>(e._background=t.bg,e._resize=1,t.bg),{bg:e._signals.background})}const o1="default";function vQ(e){const t=e._signals.cursor||(e._signals.cursor=e.add({user:o1,item:null}));e.on(e.events("view","pointermove"),t,(n,i)=>{const r=t.value,o=r?X(r)?r:r.user:o1,s=i.item&&i.item.cursor||null;return r&&o===r.user&&s==r.item?r:{user:o,item:s}}),e.add(null,function(n){let i=n.cursor,r=this.value;return X(i)||(r=i.item,i=i.user),lv(e,i&&i!==o1?i:r||i),r},{cursor:t})}function lv(e,t){const n=e.globalCursor()?typeof document<"u"&&document.body:e.container();if(n)return t==null?n.style.removeProperty("cursor"):n.style.cursor=t}function kp(e,t){var n=e._runtime.data;return re(n,t)||R("Unrecognized data set: "+t),n[t]}function bQ(e,t){return arguments.length<2?kp(this,e).values.value:tm.call(this,e,Sa().remove(ei).insert(t))}function tm(e,t){$M(t)||R("Second argument to changes must be a changeset.");const n=kp(this,e);return n.modified=!0,this.pulse(n.input,t)}function xQ(e,t){return tm.call(this,e,Sa().insert(t))}function wQ(e,t){return tm.call(this,e,Sa().remove(t))}function sO(e){var t=e.padding();return Math.max(0,e._viewWidth+t.left+t.right)}function aO(e){var t=e.padding();return Math.max(0,e._viewHeight+t.top+t.bottom)}function nm(e){var t=e.padding(),n=e._origin;return[t.left+n[0],t.top+n[1]]}function EQ(e){var t=nm(e),n=sO(e),i=aO(e);e._renderer.background(e.background()),e._renderer.resize(n,i,t),e._handler.origin(t),e._resizeListeners.forEach(r=>{try{r(n,i)}catch(o){e.error(o)}})}function _Q(e,t,n){var i=e._renderer,r=i&&i.canvas(),o,s,a;return r&&(a=nm(e),s=t.changedTouches?t.changedTouches[0]:t,o=Ug(s,r),o[0]-=a[0],o[1]-=a[1]),t.dataflow=e,t.item=n,t.vega=SQ(e,n,o),t}function SQ(e,t,n){const i=t?t.mark.marktype==="group"?t:t.mark.group:null;function r(s){var a=i,u;if(s){for(u=t;u;u=u.mark.group)if(u.mark.name===s){a=u;break}}return a&&a.mark&&a.mark.interactive?a:{}}function o(s){if(!s)return n;X(s)&&(s=r(s));const a=n.slice();for(;s;)a[0]-=s.x||0,a[1]-=s.y||0,s=s.mark&&s.mark.group;return a}return{view:Ht(e),item:Ht(t||{}),group:r,xy:o,x:s=>o(s)[0],y:s=>o(s)[1]}}const CA="view",$Q="timer",AQ="window",kQ={trap:!1};function CQ(e){const t=le({defaults:{}},e),n=(i,r)=>{r.forEach(o=>{P(i[o])&&(i[o]=Ai(i[o]))})};return n(t.defaults,["prevent","allow"]),n(t,["view","window","selector"]),t}function uO(e,t,n,i){e._eventListeners.push({type:n,sources:Y(t),handler:i})}function FQ(e,t){var n=e._eventConfig.defaults,i=n.prevent,r=n.allow;return i===!1||r===!0?!1:i===!0||r===!1?!0:i?i[t]:r?!r[t]:e.preventDefault()}function Td(e,t,n){const i=e._eventConfig&&e._eventConfig[t];return i===!1||V(i)&&!i[n]?(e.warn(`Blocked ${t} ${n} event listener.`),!1):!0}function MQ(e,t,n){var i=this,r=new fg(n),o=function(l,c){i.runAsync(null,()=>{e===CA&&FQ(i,t)&&l.preventDefault(),r.receive(_Q(i,l,c))})},s;if(e===$Q)Td(i,"timer",t)&&i.timer(o,t);else if(e===CA)Td(i,"view",t)&&i.addEventListener(t,o,kQ);else if(e===AQ?Td(i,"window",t)&&typeof window<"u"&&(s=[window]):typeof document<"u"&&Td(i,"selector",t)&&(s=Array.from(document.querySelectorAll(e))),!s)i.warn("Can not resolve event source: "+e);else{for(var a=0,u=s.length;a=0;)t[i].stop();for(i=n.length;--i>=0;)for(o=n[i],r=o.sources.length;--r>=0;)o.sources[r].removeEventListener(o.type,o.handler);return e&&e.call(this,this._handler,null,null,null),this}function Rn(e,t,n){const i=document.createElement(e);for(const r in t)i.setAttribute(r,t[r]);return n!=null&&(i.textContent=n),i}const NQ="vega-bind",OQ="vega-bind-name",RQ="vega-bind-radio";function LQ(e,t,n){if(!t)return;const i=n.param;let r=n.state;return r||(r=n.state={elements:null,active:!1,set:null,update:s=>{s!=e.signal(i.signal)&&e.runAsync(null,()=>{r.source=!0,e.signal(i.signal,s)})}},i.debounce&&(r.update=Qv(i.debounce,r.update))),(i.input==null&&i.element?PQ:zQ)(r,t,i,e),r.active||(e.on(e._signals[i.signal],null,()=>{r.source?r.source=!1:r.set(e.signal(i.signal))}),r.active=!0),r}function PQ(e,t,n,i){const r=n.event||"input",o=()=>e.update(t.value);i.signal(n.signal,t.value),t.addEventListener(r,o),uO(i,t,r,o),e.set=s=>{t.value=s,t.dispatchEvent(IQ(r))}}function IQ(e){return typeof Event<"u"?new Event(e):{type:e}}function zQ(e,t,n,i){const r=i.signal(n.signal),o=Rn("div",{class:NQ}),s=n.input==="radio"?o:o.appendChild(Rn("label"));s.appendChild(Rn("span",{class:OQ},n.name||n.signal)),t.appendChild(o);let a=BQ;switch(n.input){case"checkbox":a=UQ;break;case"select":a=jQ;break;case"radio":a=qQ;break;case"range":a=WQ;break}a(e,s,n,r)}function BQ(e,t,n,i){const r=Rn("input");for(const o in n)o!=="signal"&&o!=="element"&&r.setAttribute(o==="input"?"type":o,n[o]);r.setAttribute("name",n.signal),r.value=i,t.appendChild(r),r.addEventListener("input",()=>e.update(r.value)),e.elements=[r],e.set=o=>r.value=o}function UQ(e,t,n,i){const r={type:"checkbox",name:n.signal};i&&(r.checked=!0);const o=Rn("input",r);t.appendChild(o),o.addEventListener("change",()=>e.update(o.checked)),e.elements=[o],e.set=s=>o.checked=!!s||null}function jQ(e,t,n,i){const r=Rn("select",{name:n.signal}),o=n.labels||[];n.options.forEach((s,a)=>{const u={value:s};Cp(s,i)&&(u.selected=!0),r.appendChild(Rn("option",u,(o[a]||s)+""))}),t.appendChild(r),r.addEventListener("change",()=>{e.update(n.options[r.selectedIndex])}),e.elements=[r],e.set=s=>{for(let a=0,u=n.options.length;a{const u={type:"radio",name:n.signal,value:s};Cp(s,i)&&(u.checked=!0);const l=Rn("input",u);l.addEventListener("change",()=>e.update(s));const c=Rn("label",{},(o[a]||s)+"");return c.prepend(l),r.appendChild(c),l}),e.set=s=>{const a=e.elements,u=a.length;for(let l=0;l{u.textContent=a.value,e.update(+a.value)};a.addEventListener("input",l),a.addEventListener("change",l),e.elements=[a],e.set=c=>{a.value=c,u.textContent=c}}function Cp(e,t){return e===t||e+""==t+""}function lO(e,t,n,i,r,o){return t=t||new i(e.loader()),t.initialize(n,sO(e),aO(e),nm(e),r,o).background(e.background())}function xw(e,t){return t?function(){try{t.apply(this,arguments)}catch(n){e.error(n)}}:null}function HQ(e,t,n,i){const r=new i(e.loader(),xw(e,e.tooltip())).scene(e.scenegraph().root).initialize(n,nm(e),e);return t&&t.handlers().forEach(o=>{r.on(o.type,o.handler)}),r}function GQ(e,t){const n=this,i=n._renderType,r=n._eventConfig.bind,o=qg(i);e=n._el=e?s1(n,e,!0):null,mQ(n),o||n.error("Unrecognized renderer type: "+i);const s=o.handler||Wo,a=e?o.renderer:o.headless;return n._renderer=a?lO(n,n._renderer,e,a):null,n._handler=HQ(n,n._handler,e,s),n._redraw=!0,e&&r!=="none"&&(t=t?n._elBind=s1(n,t,!0):e.appendChild(Rn("form",{class:"vega-bindings"})),n._bind.forEach(u=>{u.param.element&&r!=="container"&&(u.element=s1(n,u.param.element,!!u.param.input))}),n._bind.forEach(u=>{LQ(n,u.element||t,u)})),n}function s1(e,t,n){if(typeof t=="string")if(typeof document<"u"){if(t=document.querySelector(t),!t)return e.error("Signal bind element not found: "+t),null}else return e.error("DOM document instance not found."),null;if(t&&n)try{t.textContent=""}catch(i){t=null,e.error(i)}return t}const zl=e=>+e||0,YQ=e=>({top:e,bottom:e,left:e,right:e});function DA(e){return V(e)?{top:zl(e.top),bottom:zl(e.bottom),left:zl(e.left),right:zl(e.right)}:YQ(zl(e))}async function ww(e,t,n,i){const r=qg(t),o=r&&r.headless;return o||R("Unrecognized renderer type: "+t),await e.runAsync(),lO(e,null,null,o,n,i).renderAsync(e._scenegraph.root)}async function XQ(e,t){e!==_o.Canvas&&e!==_o.SVG&&e!==_o.PNG&&R("Unrecognized image type: "+e);const n=await ww(this,e,t);return e===_o.SVG?VQ(n.svg(),"image/svg+xml"):n.canvas().toDataURL("image/png")}function VQ(e,t){const n=new Blob([e],{type:t});return window.URL.createObjectURL(n)}async function KQ(e,t){return(await ww(this,_o.Canvas,e,t)).canvas()}async function JQ(e){return(await ww(this,_o.SVG,e)).svg()}function QQ(e,t,n){return iO(e,Su,rf,n).parse(t)}function ZQ(e){var t=this._runtime.scales;return re(t,e)||R("Unrecognized scale or projection: "+e),t[e].value}var cO="width",fO="height",Ew="padding",NA={skip:!0};function dO(e,t){var n=e.autosize(),i=e.padding();return t-(n&&n.contains===Ew?i.left+i.right:0)}function hO(e,t){var n=e.autosize(),i=e.padding();return t-(n&&n.contains===Ew?i.top+i.bottom:0)}function eZ(e){var t=e._signals,n=t[cO],i=t[fO],r=t[Ew];function o(){e._autosize=e._resize=1}e._resizeWidth=e.add(null,a=>{e._width=a.size,e._viewWidth=dO(e,a.size),o()},{size:n}),e._resizeHeight=e.add(null,a=>{e._height=a.size,e._viewHeight=hO(e,a.size),o()},{size:i});const s=e.add(null,o,{pad:r});e._resizeWidth.rank=n.rank+1,e._resizeHeight.rank=i.rank+1,s.rank=r.rank+1}function tZ(e,t,n,i,r,o){this.runAfter(s=>{let a=0;s._autosize=0,s.width()!==n&&(a=1,s.signal(cO,n,NA),s._resizeWidth.skip(!0)),s.height()!==i&&(a=1,s.signal(fO,i,NA),s._resizeHeight.skip(!0)),s._viewWidth!==e&&(s._resize=1,s._viewWidth=e),s._viewHeight!==t&&(s._resize=1,s._viewHeight=t),(s._origin[0]!==r[0]||s._origin[1]!==r[1])&&(s._resize=1,s._origin=r),a&&s.run("enter"),o&&s.runAfter(u=>u.resize())},!1,1)}function nZ(e){return this._runtime.getState(e||{data:iZ,signals:rZ,recurse:!0})}function iZ(e,t){return t.modified&&P(t.input.value)&&!e.startsWith("_:vega:_")}function rZ(e,t){return!(e==="parent"||t instanceof Su.proxy)}function oZ(e){return this.runAsync(null,t=>{t._trigger=!1,t._runtime.setState(e)},t=>{t._trigger=!0}),this}function sZ(e,t){function n(i){e({timestamp:Date.now(),elapsed:i})}this._timers.push(PG(n,t))}function aZ(e,t,n,i){const r=e.element();r&&r.setAttribute("title",uZ(i))}function uZ(e){return e==null?"":P(e)?pO(e):V(e)&&!Fo(e)?lZ(e):e+""}function lZ(e){return Object.keys(e).map(t=>{const n=e[t];return t+": "+(P(n)?pO(n):gO(n))}).join(` +`)}function pO(e){return"["+e.map(gO).join(", ")+"]"}function gO(e){return P(e)?"[…]":V(e)&&!Fo(e)?"{…}":e}function cZ(){if(this.renderer()==="canvas"&&this._renderer._canvas){let e=null;const t=()=>{e!=null&&e();const n=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);n.addEventListener("change",t),e=()=>{n.removeEventListener("change",t)},this._renderer._canvas.getContext("2d").pixelRatio=window.devicePixelRatio||1,this._redraw=!0,this._resize=1,this.resize().runAsync()};t()}}function mO(e,t){const n=this;if(t=t||{},uu.call(n),t.loader&&n.loader(t.loader),t.logger&&n.logger(t.logger),t.logLevel!=null&&n.logLevel(t.logLevel),t.locale||e.locale){const o=le({},e.locale,t.locale);n.locale(gM(o.number,o.time))}n._el=null,n._elBind=null,n._renderType=t.renderer||_o.Canvas,n._scenegraph=new n2;const i=n._scenegraph.root;n._renderer=null,n._tooltip=t.tooltip||aZ,n._redraw=!0,n._handler=new Wo().scene(i),n._globalCursor=!1,n._preventDefault=!1,n._timers=[],n._eventListeners=[],n._resizeListeners=[],n._eventConfig=CQ(e.eventConfig),n.globalCursor(n._eventConfig.globalCursor);const r=QQ(n,e,t.expr);n._runtime=r,n._signals=r.signals,n._bind=(e.bindings||[]).map(o=>({state:null,param:le({},o)})),r.root&&r.root.set(i),i.source=r.data.root.input,n.pulse(r.data.root.input,n.changeset().insert(i.items)),n._width=n.width(),n._height=n.height(),n._viewWidth=dO(n,n._width),n._viewHeight=hO(n,n._height),n._origin=[0,0],n._resize=0,n._autosize=1,eZ(n),yQ(n),vQ(n),n.description(e.description),t.hover&&n.hover(),t.container&&n.initialize(t.container,t.bind),t.watchPixelRatio&&n._watchPixelRatio()}function Dd(e,t){return re(e._signals,t)?e._signals[t]:R("Unrecognized signal name: "+H(t))}function yO(e,t){const n=(e._targets||[]).filter(i=>i._update&&i._update.handler===t);return n.length?n[0]:null}function OA(e,t,n,i){let r=yO(n,i);return r||(r=xw(e,()=>i(t,n.value)),r.handler=i,e.on(n,null,r)),e}function RA(e,t,n){const i=yO(t,n);return i&&t._targets.remove(i),e}W(mO,uu,{async evaluate(e,t,n){if(await uu.prototype.evaluate.call(this,e,t),this._redraw||this._resize)try{this._renderer&&(this._resize&&(this._resize=0,EQ(this)),await this._renderer.renderAsync(this._scenegraph.root)),this._redraw=!1}catch(i){this.error(i)}return n&&Gd(this,n),this},dirty(e){this._redraw=!0,this._renderer&&this._renderer.dirty(e)},description(e){if(arguments.length){const t=e!=null?e+"":null;return t!==this._desc&&oO(this._el,this._desc=t),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(e,t,n){const i=Dd(this,e);return arguments.length===1?i.value:this.update(i,t,n)},width(e){return arguments.length?this.signal("width",e):this.signal("width")},height(e){return arguments.length?this.signal("height",e):this.signal("height")},padding(e){return arguments.length?this.signal("padding",DA(e)):DA(this.signal("padding"))},autosize(e){return arguments.length?this.signal("autosize",e):this.signal("autosize")},background(e){return arguments.length?this.signal("background",e):this.signal("background")},renderer(e){return arguments.length?(qg(e)||R("Unrecognized renderer type: "+e),e!==this._renderType&&(this._renderType=e,this._resetRenderer()),this):this._renderType},tooltip(e){return arguments.length?(e!==this._tooltip&&(this._tooltip=e,this._resetRenderer()),this):this._tooltip},loader(e){return arguments.length?(e!==this._loader&&(uu.prototype.loader.call(this,e),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(Dd(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:tZ,addEventListener(e,t,n){let i=t;return n&&n.trap===!1||(i=xw(this,t),i.raw=t),this._handler.on(e,i),this},removeEventListener(e,t){for(var n=this._handler.handlers(e),i=n.length,r,o;--i>=0;)if(o=n[i].type,r=n[i].handler,e===o&&(t===r||t===r.raw)){this._handler.off(o,r);break}return this},addResizeListener(e){const t=this._resizeListeners;return t.includes(e)||t.push(e),this},removeResizeListener(e){var t=this._resizeListeners,n=t.indexOf(e);return n>=0&&t.splice(n,1),this},addSignalListener(e,t){return OA(this,e,Dd(this,e),t)},removeSignalListener(e,t){return RA(this,Dd(this,e),t)},addDataListener(e,t){return OA(this,e,kp(this,e).values,t)},removeDataListener(e,t){return RA(this,kp(this,e).values,t)},globalCursor(e){if(arguments.length){if(this._globalCursor!==!!e){const t=lv(this,null);this._globalCursor=!!e,t&&lv(this,t)}return this}else return this._globalCursor},preventDefault(e){return arguments.length?(this._preventDefault=e,this):this._preventDefault},timer:sZ,events:MQ,finalize:DQ,hover:TQ,data:bQ,change:tm,insert:xQ,remove:wQ,scale:ZQ,initialize:GQ,toImageURL:XQ,toCanvas:KQ,toSVG:JQ,getState:nZ,setState:oZ,_watchPixelRatio:cZ});const fZ="view",Fp="[",Mp="]",vO="{",bO="}",dZ=":",xO=",",hZ="@",pZ=">",gZ=/[[\]{}]/,mZ={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let wO,EO;function ss(e,t,n){return wO=t||fZ,EO=n||mZ,_O(e.trim()).map(cv)}function yZ(e){return EO[e]}function Mc(e,t,n,i,r){const o=e.length;let s=0,a;for(;t=0?--s:i&&i.indexOf(a)>=0&&++s}return t}function _O(e){const t=[],n=e.length;let i=0,r=0;for(;r' after between selector: "+e;i=i.map(cv);const r=cv(e.slice(1).trim());return r.between?{between:i,stream:r}:(r.between=i,r)}function bZ(e){const t={source:wO},n=[];let i=[0,0],r=0,o=0,s=e.length,a=0,u,l;if(e[s-1]===bO){if(a=e.lastIndexOf(vO),a>=0){try{i=xZ(e.substring(a+1,s-1))}catch{throw"Invalid throttle specification: "+e}e=e.slice(0,a).trim(),s=e.length}else throw"Unmatched right brace: "+e;a=0}if(!s)throw e;if(e[0]===hZ&&(r=++a),u=Mc(e,a,dZ),u1?(t.type=n[1],r?t.markname=n[0].slice(1):yZ(n[0])?t.marktype=n[0]:t.source=n[0]):t.type=n[0],t.type.slice(-1)==="!"&&(t.consume=!0,t.type=t.type.slice(0,-1)),l!=null&&(t.filter=l),i[0]&&(t.throttle=i[0]),i[1]&&(t.debounce=i[1]),t}function xZ(e){const t=e.split(xO);if(!e.length||t.length>2)throw e;return t.map(n=>{const i=+n;if(i!==i)throw e;return i})}function wZ(e){return V(e)?e:{type:e||"pad"}}const Bl=e=>+e||0,EZ=e=>({top:e,bottom:e,left:e,right:e});function _Z(e){return V(e)?e.signal?e:{top:Bl(e.top),bottom:Bl(e.bottom),left:Bl(e.left),right:Bl(e.right)}:EZ(Bl(e))}const mt=e=>V(e)&&!P(e)?le({},e):{value:e};function LA(e,t,n,i){return n!=null?(V(n)&&!P(n)||P(n)&&n.length&&V(n[0])?e.update[t]=n:e[i||"enter"][t]={value:n},1):0}function Ct(e,t,n){for(const i in t)LA(e,i,t[i]);for(const i in n)LA(e,i,n[i],"update")}function hl(e,t,n){for(const i in t)n&&re(n,i)||(e[i]=le(e[i]||{},t[i]));return e}function eu(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}const _w="mark",Sw="frame",$w="scope",SZ="axis",$Z="axis-domain",AZ="axis-grid",kZ="axis-label",CZ="axis-tick",FZ="axis-title",MZ="legend",TZ="legend-band",DZ="legend-entry",NZ="legend-gradient",SO="legend-label",OZ="legend-symbol",RZ="legend-title",LZ="title",PZ="title-text",IZ="title-subtitle";function zZ(e,t,n,i,r){const o={},s={};let a,u,l,c;u="lineBreak",t==="text"&&r[u]!=null&&!eu(u,e)&&a1(o,u,r[u]),(n=="legend"||String(n).startsWith("axis"))&&(n=null),c=n===Sw?r.group:n===_w?le({},r.mark,r[t]):null;for(u in c)l=eu(u,e)||(u==="fill"||u==="stroke")&&(eu("fill",e)||eu("stroke",e)),l||a1(o,u,c[u]);Y(i).forEach(f=>{const d=r.style&&r.style[f];for(const h in d)eu(h,e)||a1(o,h,d[h])}),e=le({},e);for(u in o)c=o[u],c.signal?(a=a||{})[u]=c:s[u]=c;return e.enter=le(s,e.enter),a&&(e.update=le(a,e.update)),e}function a1(e,t,n){e[t]=n&&n.signal?{signal:n.signal}:{value:n}}const $O=e=>X(e)?H(e):e.signal?`(${e.signal})`:AO(e);function im(e){if(e.gradient!=null)return UZ(e);let t=e.signal?`(${e.signal})`:e.color?BZ(e.color):e.field!=null?AO(e.field):e.value!==void 0?H(e.value):void 0;return e.scale!=null&&(t=jZ(e,t)),t===void 0&&(t=null),e.exponent!=null&&(t=`pow(${t},${lh(e.exponent)})`),e.mult!=null&&(t+=`*${lh(e.mult)}`),e.offset!=null&&(t+=`+${lh(e.offset)}`),e.round&&(t=`round(${t})`),t}const Nd=(e,t,n,i)=>`(${e}(${[t,n,i].map(im).join(",")})+'')`;function BZ(e){return e.c?Nd("hcl",e.h,e.c,e.l):e.h||e.s?Nd("hsl",e.h,e.s,e.l):e.l||e.a?Nd("lab",e.l,e.a,e.b):e.r||e.g||e.b?Nd("rgb",e.r,e.g,e.b):null}function UZ(e){const t=[e.start,e.stop,e.count].map(n=>n==null?null:H(n));for(;t.length&&xe(t)==null;)t.pop();return t.unshift($O(e.gradient)),`gradient(${t.join(",")})`}function lh(e){return V(e)?"("+im(e)+")":e}function AO(e){return kO(V(e)?e:{datum:e})}function kO(e){let t,n,i;if(e.signal)t="datum",i=e.signal;else if(e.group||e.parent){for(n=Math.max(1,e.level||1),t="item";n-- >0;)t+=".mark.group";e.parent?(i=e.parent,t+=".datum"):i=e.group}else e.datum?(t="datum",i=e.datum):R("Invalid field reference: "+H(e));return e.signal||(i=X(i)?dr(i).map(H).join("]["):kO(i)),t+"["+i+"]"}function jZ(e,t){const n=$O(e.scale);return e.range!=null?t=`lerp(_range(${n}), ${+e.range})`:(t!==void 0&&(t=`_scale(${n}, ${t})`),e.band&&(t=(t?t+"+":"")+`_bandwidth(${n})`+(+e.band==1?"":"*"+lh(e.band)),e.extra&&(t=`(datum.extra ? _scale(${n}, datum.extra.value) : ${t})`)),t==null&&(t="0")),t}function qZ(e){let t="";return e.forEach(n=>{const i=im(n);t+=n.test?`(${n.test})?${i}:`:i}),xe(t)===":"&&(t+="null"),t}function CO(e,t,n,i,r,o){const s={};o=o||{},o.encoders={$encode:s},e=zZ(e,t,n,i,r.config);for(const a in e)s[a]=WZ(e[a],t,o,r);return o}function WZ(e,t,n,i){const r={},o={};for(const s in e)e[s]!=null&&(r[s]=GZ(HZ(e[s]),i,n,o));return{$expr:{marktype:t,channels:r},$fields:Object.keys(o),$output:Object.keys(e)}}function HZ(e){return P(e)?qZ(e):im(e)}function GZ(e,t,n,i){const r=ur(e,t);return r.$fields.forEach(o=>i[o]=1),le(n,r.$params),r.$expr}const YZ="outer",XZ=["value","update","init","react","bind"];function PA(e,t){R(e+' for "outer" push: '+H(t))}function FO(e,t){const n=e.name;if(e.push===YZ)t.signals[n]||PA("No prior signal definition",n),XZ.forEach(i=>{e[i]!==void 0&&PA("Invalid property ",i)});else{const i=t.addSignal(n,e.value);e.react===!1&&(i.react=!1),e.bind&&t.addBinding(n,e.bind)}}function fv(e,t,n,i){this.id=-1,this.type=e,this.value=t,this.params=n,i&&(this.parent=i)}function rm(e,t,n,i){return new fv(e,t,n,i)}function Tp(e,t){return rm("operator",e,t)}function te(e){const t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}function of(e,t){return t?{$field:e,$name:t}:{$field:e}}const dv=of("key");function IA(e,t){return{$compare:e,$order:t}}function VZ(e,t){const n={$key:e};return t&&(n.$flat=!0),n}const KZ="ascending",JZ="descending";function QZ(e){return V(e)?(e.order===JZ?"-":"+")+om(e.op,e.field):""}function om(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}const Aw="scope",hv="view";function at(e){return e&&e.signal}function ZZ(e){return e&&e.expr}function ch(e){if(at(e))return!0;if(V(e)){for(const t in e)if(ch(e[t]))return!0}return!1}function pi(e,t){return e??t}function Ys(e){return e&&e.signal||e}const zA="timer";function sf(e,t){return(e.merge?tee:e.stream?nee:e.type?iee:R("Invalid stream specification: "+H(e)))(e,t)}function eee(e){return e===Aw?hv:e||hv}function tee(e,t){const n=e.merge.map(r=>sf(r,t)),i=kw({merge:n},e,t);return t.addStream(i).id}function nee(e,t){const n=sf(e.stream,t),i=kw({stream:n},e,t);return t.addStream(i).id}function iee(e,t){let n;e.type===zA?(n=t.event(zA,e.throttle),e={between:e.between,filter:e.filter}):n=t.event(eee(e.source),e.type);const i=kw({stream:n},e,t);return Object.keys(i).length===1?n:t.addStream(i).id}function kw(e,t,n){let i=t.between;return i&&(i.length!==2&&R('Stream "between" parameter must have 2 entries: '+H(t)),e.between=[sf(i[0],n),sf(i[1],n)]),i=t.filter?[].concat(t.filter):[],(t.marktype||t.markname||t.markrole)&&i.push(ree(t.marktype,t.markname,t.markrole)),t.source===Aw&&i.push("inScope(event.item)"),i.length&&(e.filter=ur("("+i.join(")&&(")+")",n).$expr),(i=t.throttle)!=null&&(e.throttle=+i),(i=t.debounce)!=null&&(e.debounce=+i),t.consume&&(e.consume=!0),e}function ree(e,t,n){const i="event.item";return i+(e&&e!=="*"?"&&"+i+".mark.marktype==='"+e+"'":"")+(n?"&&"+i+".mark.role==='"+n+"'":"")+(t?"&&"+i+".mark.name==='"+t+"'":"")}const oee={code:"_.$value",ast:{type:"Identifier",value:"value"}};function see(e,t,n){const i=e.encode,r={target:n};let o=e.events,s=e.update,a=[];o||R("Signal update missing events specification."),X(o)&&(o=ss(o,t.isSubscope()?Aw:hv)),o=Y(o).filter(u=>u.signal||u.scale?(a.push(u),0):1),a.length>1&&(a=[uee(a)]),o.length&&a.push(o.length>1?{merge:o}:o[0]),i!=null&&(s&&R("Signal encode and update are mutually exclusive."),s="encode(item(),"+H(i)+")"),r.update=X(s)?ur(s,t):s.expr!=null?ur(s.expr,t):s.value!=null?s.value:s.signal!=null?{$expr:oee,$params:{$value:t.signalRef(s.signal)}}:R("Invalid signal update specification."),e.force&&(r.options={force:!0}),a.forEach(u=>t.addUpdate(le(aee(u,t),r)))}function aee(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):sf(e,t)}}function uee(e){return{signal:"["+e.map(t=>t.scale?'scale("'+t.scale+'")':t.signal)+"]"}}function lee(e,t){const n=t.getSignal(e.name);let i=e.update;e.init&&(i?R("Signals can not include both init and update expressions."):(i=e.init,n.initonly=!0)),i&&(i=ur(i,t),n.update=i.$expr,n.params=i.$params),e.on&&e.on.forEach(r=>see(r,t,n.id))}const Le=e=>(t,n,i)=>rm(e,n,t||void 0,i),MO=Le("aggregate"),cee=Le("axisticks"),TO=Le("bound"),Di=Le("collect"),BA=Le("compare"),fee=Le("datajoin"),DO=Le("encode"),dee=Le("expression"),hee=Le("facet"),pee=Le("field"),gee=Le("key"),mee=Le("legendentries"),yee=Le("load"),vee=Le("mark"),bee=Le("multiextent"),xee=Le("multivalues"),wee=Le("overlap"),Eee=Le("params"),NO=Le("prefacet"),_ee=Le("projection"),See=Le("proxy"),$ee=Le("relay"),OO=Le("render"),Aee=Le("scale"),Ca=Le("sieve"),kee=Le("sortitems"),RO=Le("viewlayout"),Cee=Le("values");let Fee=0;const LO={min:"min",max:"max",count:"sum"};function Mee(e,t){const n=e.type||"linear";AT(n)||R("Unrecognized scale type: "+H(n)),t.addScale(e.name,{type:n,domain:void 0})}function Tee(e,t){const n=t.getScale(e.name).params;let i;n.domain=PO(e.domain,e,t),e.range!=null&&(n.range=zO(e,t,n)),e.interpolate!=null&&Uee(e.interpolate,n),e.nice!=null&&(n.nice=Bee(e.nice,t)),e.bins!=null&&(n.bins=zee(e.bins,t));for(i in e)re(n,i)||i==="name"||(n[i]=Vn(e[i],t))}function Vn(e,t){return V(e)?e.signal?t.signalRef(e.signal):R("Unsupported object: "+H(e)):e}function fh(e,t){return e.signal?t.signalRef(e.signal):e.map(n=>Vn(n,t))}function sm(e){R("Can not find data set: "+H(e))}function PO(e,t,n){if(!e){(t.domainMin!=null||t.domainMax!=null)&&R("No scale domain defined for domainMin/domainMax to override.");return}return e.signal?n.signalRef(e.signal):(P(e)?Dee:e.fields?Oee:Nee)(e,t,n)}function Dee(e,t,n){return e.map(i=>Vn(i,n))}function Nee(e,t,n){const i=n.getData(e.data);return i||sm(e.data),Fu(t.type)?i.valuesRef(n,e.field,IO(e.sort,!1)):FT(t.type)?i.domainRef(n,e.field):i.extentRef(n,e.field)}function Oee(e,t,n){const i=e.data,r=e.fields.reduce((o,s)=>(s=X(s)?{data:i,field:s}:P(s)||s.signal?Ree(s,n):s,o.push(s),o),[]);return(Fu(t.type)?Lee:FT(t.type)?Pee:Iee)(e,n,r)}function Ree(e,t){const n="_:vega:_"+Fee++,i=Di({});if(P(e))i.value={$ingest:e};else if(e.signal){const r="setdata("+H(n)+","+e.signal+")";i.params.input=t.signalRef(r)}return t.addDataPipeline(n,[i,Ca({})]),{data:n,field:"data"}}function Lee(e,t,n){const i=IO(e.sort,!0);let r,o;const s=n.map(l=>{const c=t.getData(l.data);return c||sm(l.data),c.countsRef(t,l.field,i)}),a={groupby:dv,pulse:s};i&&(r=i.op||"count",o=i.field?om(r,i.field):"count",a.ops=[LO[r]],a.fields=[t.fieldRef(o)],a.as=[o]),r=t.add(MO(a));const u=t.add(Di({pulse:te(r)}));return o=t.add(Cee({field:dv,sort:t.sortRef(i),pulse:te(u)})),te(o)}function IO(e,t){return e&&(!e.field&&!e.op?V(e)?e.field="key":e={field:"key"}:!e.field&&e.op!=="count"?R("No field provided for sort aggregate op: "+e.op):t&&e.field&&e.op&&!LO[e.op]&&R("Multiple domain scales can not be sorted using "+e.op)),e}function Pee(e,t,n){const i=n.map(r=>{const o=t.getData(r.data);return o||sm(r.data),o.domainRef(t,r.field)});return te(t.add(xee({values:i})))}function Iee(e,t,n){const i=n.map(r=>{const o=t.getData(r.data);return o||sm(r.data),o.extentRef(t,r.field)});return te(t.add(bee({extents:i})))}function zee(e,t){return e.signal||P(e)?fh(e,t):t.objectProperty(e)}function Bee(e,t){return e.signal?t.signalRef(e.signal):V(e)?{interval:Vn(e.interval),step:Vn(e.step)}:Vn(e)}function Uee(e,t){t.interpolate=Vn(e.type||e),e.gamma!=null&&(t.interpolateGamma=Vn(e.gamma))}function zO(e,t,n){const i=t.config.range;let r=e.range;if(r.signal)return t.signalRef(r.signal);if(X(r)){if(i&&re(i,r))return e=le({},e,{range:i[r]}),zO(e,t,n);r==="width"?r=[0,{signal:"width"}]:r==="height"?r=Fu(e.type)?[0,{signal:"height"}]:[{signal:"height"},0]:R("Unrecognized scale range value: "+H(r))}else if(r.scheme){n.scheme=P(r.scheme)?fh(r.scheme,t):Vn(r.scheme,t),r.extent&&(n.schemeExtent=fh(r.extent,t)),r.count&&(n.schemeCount=Vn(r.count,t));return}else if(r.step){n.rangeStep=Vn(r.step,t);return}else{if(Fu(e.type)&&!P(r))return PO(r,e,t);P(r)||R("Unsupported range type: "+H(r))}return r.map(o=>(P(o)?fh:Vn)(o,t))}function jee(e,t){const n=t.config.projection||{},i={};for(const r in e)r!=="name"&&(i[r]=pv(e[r],r,t));for(const r in n)i[r]==null&&(i[r]=pv(n[r],r,t));t.addProjection(e.name,i)}function pv(e,t,n){return P(e)?e.map(i=>pv(i,t,n)):V(e)?e.signal?n.signalRef(e.signal):t==="fit"?e:R("Unsupported parameter object: "+H(e)):e}const Ni="top",pl="left",gl="right",Go="bottom",BO="center",qee="vertical",Wee="start",Hee="middle",Gee="end",gv="index",Cw="label",Yee="offset",Iu="perc",Xee="perc2",Jn="value",qf="guide-label",Fw="guide-title",Vee="group-title",Kee="group-subtitle",UA="symbol",dh="gradient",mv="discrete",yv="size",Jee="shape",Qee="fill",Zee="stroke",ete="strokeWidth",tte="strokeDash",nte="opacity",Mw=[yv,Jee,Qee,Zee,ete,tte,nte],Wf={name:1,style:1,interactive:1},we={value:0},Qn={value:1},am="group",UO="rect",Tw="rule",ite="symbol",Fa="text";function af(e){return e.type=am,e.interactive=e.interactive||!1,e}function An(e,t){const n=(i,r)=>pi(e[i],pi(t[i],r));return n.isVertical=i=>qee===pi(e.direction,t.direction||(i?t.symbolDirection:t.gradientDirection)),n.gradientLength=()=>pi(e.gradientLength,t.gradientLength||t.gradientWidth),n.gradientThickness=()=>pi(e.gradientThickness,t.gradientThickness||t.gradientHeight),n.entryColumns=()=>pi(e.columns,pi(t.columns,+n.isVertical(!0))),n}function jO(e,t){const n=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return n&&n.signal?n:n?n.value:null}function rte(e,t,n){const i=t.config.style[n];return i&&i[e]}function um(e,t,n){return`item.anchor === '${Wee}' ? ${e} : item.anchor === '${Gee}' ? ${t} : ${n}`}const Dw=um(H(pl),H(gl),H(BO));function ote(e){const t=e("tickBand");let n=e("tickOffset"),i,r;return t?t.signal?(i={signal:`(${t.signal}) === 'extent' ? 1 : 0.5`},r={signal:`(${t.signal}) === 'extent'`},V(n)||(n={signal:`(${t.signal}) === 'extent' ? 0 : ${n}`})):t==="extent"?(i=1,r=!0,n=0):(i=.5,r=!1):(i=e("bandPosition"),r=e("tickExtra")),{extra:r,band:i,offset:n}}function qO(e,t){return t?e?V(e)?Object.assign({},e,{offset:qO(e.offset,t)}):{value:e,offset:t}:t:e}function Bn(e,t){return t?(e.name=t.name,e.style=t.style||e.style,e.interactive=!!t.interactive,e.encode=hl(e.encode,t,Wf)):e.interactive=!1,e}function ste(e,t,n,i){const r=An(e,n),o=r.isVertical(),s=r.gradientThickness(),a=r.gradientLength();let u,l,c,f,d;o?(l=[0,1],c=[0,0],f=s,d=a):(l=[0,0],c=[1,0],f=a,d=s);const h={enter:u={opacity:we,x:we,y:we,width:mt(f),height:mt(d)},update:le({},u,{opacity:Qn,fill:{gradient:t,start:l,stop:c}}),exit:{opacity:we}};return Ct(h,{stroke:r("gradientStrokeColor"),strokeWidth:r("gradientStrokeWidth")},{opacity:r("gradientOpacity")}),Bn({type:UO,role:NZ,encode:h},i)}function ate(e,t,n,i,r){const o=An(e,n),s=o.isVertical(),a=o.gradientThickness(),u=o.gradientLength();let l,c,f,d,h="";s?(l="y",f="y2",c="x",d="width",h="1-"):(l="x",f="x2",c="y",d="height");const p={opacity:we,fill:{scale:t,field:Jn}};p[l]={signal:h+"datum."+Iu,mult:u},p[c]=we,p[f]={signal:h+"datum."+Xee,mult:u},p[d]=mt(a);const g={enter:p,update:le({},p,{opacity:Qn}),exit:{opacity:we}};return Ct(g,{stroke:o("gradientStrokeColor"),strokeWidth:o("gradientStrokeWidth")},{opacity:o("gradientOpacity")}),Bn({type:UO,role:TZ,key:Jn,from:r,encode:g},i)}const ute=`datum.${Iu}<=0?"${pl}":datum.${Iu}>=1?"${gl}":"${BO}"`,lte=`datum.${Iu}<=0?"${Go}":datum.${Iu}>=1?"${Ni}":"${Hee}"`;function jA(e,t,n,i){const r=An(e,t),o=r.isVertical(),s=mt(r.gradientThickness()),a=r.gradientLength();let u=r("labelOverlap"),l,c,f,d,h="";const p={enter:l={opacity:we},update:c={opacity:Qn,text:{field:Cw}},exit:{opacity:we}};return Ct(p,{fill:r("labelColor"),fillOpacity:r("labelOpacity"),font:r("labelFont"),fontSize:r("labelFontSize"),fontStyle:r("labelFontStyle"),fontWeight:r("labelFontWeight"),limit:pi(e.labelLimit,t.gradientLabelLimit)}),o?(l.align={value:"left"},l.baseline=c.baseline={signal:lte},f="y",d="x",h="1-"):(l.align=c.align={signal:ute},l.baseline={value:"top"},f="x",d="y"),l[f]=c[f]={signal:h+"datum."+Iu,mult:a},l[d]=c[d]=s,s.offset=pi(e.labelOffset,t.gradientLabelOffset)||0,u=u?{separation:r("labelSeparation"),method:u,order:"datum."+gv}:void 0,Bn({type:Fa,role:SO,style:qf,key:Jn,from:i,encode:p,overlap:u},n)}function cte(e,t,n,i,r){const o=An(e,t),s=n.entries,a=!!(s&&s.interactive),u=s?s.name:void 0,l=o("clipHeight"),c=o("symbolOffset"),f={data:"value"},d=`(${r}) ? datum.${Yee} : datum.${yv}`,h=l?mt(l):{field:yv},p=`datum.${gv}`,g=`max(1, ${r})`;let m,y,v,b,x;h.mult=.5,m={enter:y={opacity:we,x:{signal:d,mult:.5,offset:c},y:h},update:v={opacity:Qn,x:y.x,y:y.y},exit:{opacity:we}};let w=null,_=null;e.fill||(w=t.symbolBaseFillColor,_=t.symbolBaseStrokeColor),Ct(m,{fill:o("symbolFillColor",w),shape:o("symbolType"),size:o("symbolSize"),stroke:o("symbolStrokeColor",_),strokeDash:o("symbolDash"),strokeDashOffset:o("symbolDashOffset"),strokeWidth:o("symbolStrokeWidth")},{opacity:o("symbolOpacity")}),Mw.forEach(F=>{e[F]&&(v[F]=y[F]={scale:e[F],field:Jn})});const E=Bn({type:ite,role:OZ,key:Jn,from:f,clip:l?!0:void 0,encode:m},n.symbols),S=mt(c);S.offset=o("labelOffset"),m={enter:y={opacity:we,x:{signal:d,offset:S},y:h},update:v={opacity:Qn,text:{field:Cw},x:y.x,y:y.y},exit:{opacity:we}},Ct(m,{align:o("labelAlign"),baseline:o("labelBaseline"),fill:o("labelColor"),fillOpacity:o("labelOpacity"),font:o("labelFont"),fontSize:o("labelFontSize"),fontStyle:o("labelFontStyle"),fontWeight:o("labelFontWeight"),limit:o("labelLimit")});const $=Bn({type:Fa,role:SO,style:qf,key:Jn,from:f,encode:m},n.labels);return m={enter:{noBound:{value:!l},width:we,height:l?mt(l):we,opacity:we},exit:{opacity:we},update:v={opacity:Qn,row:{signal:null},column:{signal:null}}},o.isVertical(!0)?(b=`ceil(item.mark.items.length / ${g})`,v.row.signal=`${p}%${b}`,v.column.signal=`floor(${p} / ${b})`,x={field:["row",p]}):(v.row.signal=`floor(${p} / ${g})`,v.column.signal=`${p} % ${g}`,x={field:p}),v.column.signal=`(${r})?${v.column.signal}:${p}`,i={facet:{data:i,name:"value",groupby:gv}},af({role:$w,from:i,encode:hl(m,s,Wf),marks:[E,$],name:u,interactive:a,sort:x})}function fte(e,t){const n=An(e,t);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:!0,column:!1},padding:{row:n("rowPadding"),column:n("columnPadding")}}}const Nw='item.orient === "left"',Ow='item.orient === "right"',lm=`(${Nw} || ${Ow})`,dte=`datum.vgrad && ${lm}`,hte=um('"top"','"bottom"','"middle"'),pte=um('"right"','"left"','"center"'),gte=`datum.vgrad && ${Ow} ? (${pte}) : (${lm} && !(datum.vgrad && ${Nw})) ? "left" : ${Dw}`,mte=`item._anchor || (${lm} ? "middle" : "start")`,yte=`${dte} ? (${Nw} ? -90 : 90) : 0`,vte=`${lm} ? (datum.vgrad ? (${Ow} ? "bottom" : "top") : ${hte}) : "top"`;function bte(e,t,n,i){const r=An(e,t),o={enter:{opacity:we},update:{opacity:Qn,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:we}};return Ct(o,{orient:r("titleOrient"),_anchor:r("titleAnchor"),anchor:{signal:mte},angle:{signal:yte},align:{signal:gte},baseline:{signal:vte},text:e.title,fill:r("titleColor"),fillOpacity:r("titleOpacity"),font:r("titleFont"),fontSize:r("titleFontSize"),fontStyle:r("titleFontStyle"),fontWeight:r("titleFontWeight"),limit:r("titleLimit"),lineHeight:r("titleLineHeight")},{align:r("titleAlign"),baseline:r("titleBaseline")}),Bn({type:Fa,role:RZ,style:Fw,from:i,encode:o},n)}function xte(e,t){let n;return V(e)&&(e.signal?n=e.signal:e.path?n="pathShape("+qA(e.path)+")":e.sphere&&(n="geoShape("+qA(e.sphere)+', {type: "Sphere"})')),n?t.signalRef(n):!!e}function qA(e){return V(e)&&e.signal?e.signal:H(e)}function WO(e){const t=e.role||"";return t.startsWith("axis")||t.startsWith("legend")||t.startsWith("title")?t:e.type===am?$w:t||_w}function wte(e){return{marktype:e.type,name:e.name||void 0,role:e.role||WO(e),zindex:+e.zindex||void 0,aria:e.aria,description:e.description}}function Ete(e,t){return e&&e.signal?t.signalRef(e.signal):e!==!1}function Rw(e,t){const n=CM(e.type);n||R("Unrecognized transform type: "+H(e.type));const i=rm(n.type.toLowerCase(),null,HO(n,e,t));return e.signal&&t.addSignal(e.signal,t.proxy(i)),i.metadata=n.metadata||{},i}function HO(e,t,n){const i={},r=e.params.length;for(let o=0;oWA(e,o,n)):WA(e,r,n)}function WA(e,t,n){const i=e.type;if(at(t))return GA(i)?R("Expression references can not be signals."):u1(i)?n.fieldRef(t):YA(i)?n.compareRef(t):n.signalRef(t.signal);{const r=e.expr||u1(i);return r&&Ate(t)?n.exprRef(t.expr,t.as):r&&kte(t)?of(t.field,t.as):GA(i)?ur(t,n):Cte(i)?te(n.getData(t).values):u1(i)?of(t):YA(i)?n.compareRef(t):t}}function Ste(e,t,n){return X(t.from)||R('Lookup "from" parameter must be a string literal.'),n.getData(t.from).lookupRef(n,t.key)}function $te(e,t,n){const i=t[e.name];return e.array?(P(i)||R("Expected an array of sub-parameters. Instead: "+H(i)),i.map(r=>HA(e,r,n))):HA(e,i,n)}function HA(e,t,n){const i=e.params.length;let r;for(let s=0;se&&e.expr,kte=e=>e&&e.field,Cte=e=>e==="data",GA=e=>e==="expr",u1=e=>e==="field",YA=e=>e==="compare";function Fte(e,t,n){let i,r,o,s,a;return e?(i=e.facet)&&(t||R("Only group marks can be faceted."),i.field!=null?s=a=hh(i,n):(e.data?a=te(n.getData(e.data).aggregate):(o=Rw(le({type:"aggregate",groupby:Y(i.groupby)},i.aggregate),n),o.params.key=n.keyRef(i.groupby),o.params.pulse=hh(i,n),s=a=te(n.add(o))),r=n.keyRef(i.groupby,!0))):s=te(n.add(Di(null,[{}]))),s||(s=hh(e,n)),{key:r,pulse:s,parent:a}}function hh(e,t){return e.$ref?e:e.data&&e.data.$ref?e.data:te(t.getData(e.data).output)}function la(e,t,n,i,r){this.scope=e,this.input=t,this.output=n,this.values=i,this.aggregate=r,this.index={}}la.fromEntries=function(e,t){const n=t.length,i=t[n-1],r=t[n-2];let o=t[0],s=null,a=1;for(o&&o.type==="load"&&(o=t[1]),e.add(t[0]);af??"null").join(",")+"),0)",c=ur(l,t);u.update=c.$expr,u.params=c.$params}function cm(e,t){const n=WO(e),i=e.type===am,r=e.from&&e.from.facet,o=e.overlap;let s=e.layout||n===$w||n===Sw,a,u,l,c,f,d,h;const p=n===_w||s||r,g=Fte(e.from,i,t);u=t.add(fee({key:g.key||(e.key?of(e.key):void 0),pulse:g.pulse,clean:!i}));const m=te(u);u=l=t.add(Di({pulse:m})),u=t.add(vee({markdef:wte(e),interactive:Ete(e.interactive,t),clip:xte(e.clip,t),context:{$context:!0},groups:t.lookup(),parent:t.signals.parent?t.signalRef("parent"):null,index:t.markpath(),pulse:te(u)}));const y=te(u);u=c=t.add(DO(CO(e.encode,e.type,n,e.style,t,{mod:!1,pulse:y}))),u.params.parent=t.encode(),e.transform&&e.transform.forEach(_=>{const E=Rw(_,t),S=E.metadata;(S.generates||S.changes)&&R("Mark transforms should not generate new data."),S.nomod||(c.params.mod=!0),E.params.pulse=te(u),t.add(u=E)}),e.sort&&(u=t.add(kee({sort:t.compareRef(e.sort),pulse:te(u)})));const v=te(u);(r||s)&&(s=t.add(RO({layout:t.objectProperty(e.layout),legends:t.legends,mark:y,pulse:v})),d=te(s));const b=t.add(TO({mark:y,pulse:d||v}));h=te(b),i&&(p&&(a=t.operators,a.pop(),s&&a.pop()),t.pushState(v,d||h,m),r?Mte(e,t,g):p?Tte(e,t,g):t.parse(e),t.popState(),p&&(s&&a.push(s),a.push(b))),o&&(h=Dte(o,h,t));const x=t.add(OO({pulse:h})),w=t.add(Ca({pulse:te(x)},void 0,t.parent()));e.name!=null&&(f=e.name,t.addData(f,new la(t,l,x,w)),e.on&&e.on.forEach(_=>{(_.insert||_.remove||_.toggle)&&R("Marks only support modify triggers."),YO(_,t,f)}))}function Dte(e,t,n){const i=e.method,r=e.bound,o=e.separation,s={separation:at(o)?n.signalRef(o.signal):o,method:at(i)?n.signalRef(i.signal):i,pulse:t};if(e.order&&(s.sort=n.compareRef({field:e.order})),r){const a=r.tolerance;s.boundTolerance=at(a)?n.signalRef(a.signal):+a,s.boundScale=n.scaleRef(r.scale),s.boundOrient=r.orient}return te(n.add(wee(s)))}function Nte(e,t){const n=t.config.legend,i=e.encode||{},r=An(e,n),o=i.legend||{},s=o.name||void 0,a=o.interactive,u=o.style,l={};let c=0,f,d,h;Mw.forEach(b=>e[b]?(l[b]=e[b],c=c||e[b]):0),c||R("Missing valid scale for legend.");const p=Ote(e,t.scaleType(c)),g={title:e.title!=null,scales:l,type:p,vgrad:p!=="symbol"&&r.isVertical()},m=te(t.add(Di(null,[g]))),y={enter:{x:{value:0},y:{value:0}}},v=te(t.add(mee(d={type:p,scale:t.scaleRef(c),count:t.objectProperty(r("tickCount")),limit:t.property(r("symbolLimit")),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)})));return p===dh?(h=[ste(e,c,n,i.gradient),jA(e,n,i.labels,v)],d.count=d.count||t.signalRef(`max(2,2*floor((${Ys(r.gradientLength())})/100))`)):p===mv?h=[ate(e,c,n,i.gradient,v),jA(e,n,i.labels,v)]:(f=fte(e,n),h=[cte(e,n,i,v,Ys(f.columns))],d.size=Pte(e,t,h[0].marks)),h=[af({role:DZ,from:m,encode:y,marks:h,layout:f,interactive:a})],g.title&&h.push(bte(e,n,i.title,m)),cm(af({role:MZ,from:m,encode:hl(Lte(r,e,n),o,Wf),marks:h,aria:r("aria"),description:r("description"),zindex:r("zindex"),name:s,interactive:a,style:u}),t)}function Ote(e,t){let n=e.type||UA;return!e.type&&Rte(e)===1&&(e.fill||e.stroke)&&(n=Tx(t)?dh:ay(t)?mv:UA),n!==dh?n:ay(t)?mv:dh}function Rte(e){return Mw.reduce((t,n)=>t+(e[n]?1:0),0)}function Lte(e,t,n){const i={enter:{},update:{}};return Ct(i,{orient:e("orient"),offset:e("offset"),padding:e("padding"),titlePadding:e("titlePadding"),cornerRadius:e("cornerRadius"),fill:e("fillColor"),stroke:e("strokeColor"),strokeWidth:n.strokeWidth,strokeDash:n.strokeDash,x:e("legendX"),y:e("legendY"),format:t.format,formatType:t.formatType}),i}function Pte(e,t,n){const i=Ys(VA("size",e,n)),r=Ys(VA("strokeWidth",e,n)),o=Ys(Ite(n[1].encode,t,qf));return ur(`max(ceil(sqrt(${i})+${r}),${o})`,t)}function VA(e,t,n){return t[e]?`scale("${t[e]}",datum)`:jO(e,n[0].encode)}function Ite(e,t,n){return jO("fontSize",e)||rte("fontSize",t,n)}const zte=`item.orient==="${pl}"?-90:item.orient==="${gl}"?90:0`;function Bte(e,t){e=X(e)?{text:e}:e;const n=An(e,t.config.title),i=e.encode||{},r=i.group||{},o=r.name||void 0,s=r.interactive,a=r.style,u=[],l={},c=te(t.add(Di(null,[l])));return u.push(qte(e,n,Ute(e),c)),e.subtitle&&u.push(Wte(e,n,i.subtitle,c)),cm(af({role:LZ,from:c,encode:jte(n,r),marks:u,aria:n("aria"),description:n("description"),zindex:n("zindex"),name:o,interactive:s,style:a}),t)}function Ute(e){const t=e.encode;return t&&t.title||le({name:e.name,interactive:e.interactive,style:e.style},t)}function jte(e,t){const n={enter:{},update:{}};return Ct(n,{orient:e("orient"),anchor:e("anchor"),align:{signal:Dw},angle:{signal:zte},limit:e("limit"),frame:e("frame"),offset:e("offset")||0,padding:e("subtitlePadding")}),hl(n,t,Wf)}function qte(e,t,n,i){const r={value:0},o=e.text,s={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};return Ct(s,{text:o,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("color"),font:t("font"),fontSize:t("fontSize"),fontStyle:t("fontStyle"),fontWeight:t("fontWeight"),lineHeight:t("lineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),Bn({type:Fa,role:PZ,style:Vee,from:i,encode:s},n)}function Wte(e,t,n,i){const r={value:0},o=e.subtitle,s={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};return Ct(s,{text:o,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("subtitleColor"),font:t("subtitleFont"),fontSize:t("subtitleFontSize"),fontStyle:t("subtitleFontStyle"),fontWeight:t("subtitleFontWeight"),lineHeight:t("subtitleLineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),Bn({type:Fa,role:IZ,style:Kee,from:i,encode:s},n)}function Hte(e,t){const n=[];e.transform&&e.transform.forEach(i=>{n.push(Rw(i,t))}),e.on&&e.on.forEach(i=>{YO(i,t,e.name)}),t.addDataPipeline(e.name,Gte(e,t,n))}function Gte(e,t,n){const i=[];let r=null,o=!1,s=!1,a,u,l,c,f;for(e.values?at(e.values)||ch(e.format)?(i.push(KA(t,e)),i.push(r=bs())):i.push(r=bs({$ingest:e.values,$format:e.format})):e.url?ch(e.url)||ch(e.format)?(i.push(KA(t,e)),i.push(r=bs())):i.push(r=bs({$request:e.url,$format:e.format})):e.source&&(r=a=Y(e.source).map(d=>te(t.getData(d).output)),i.push(null)),u=0,l=n.length;ue===Go||e===Ni,fm=(e,t,n)=>at(e)?Kte(e.signal,t,n):e===pl||e===Ni?t:n,yt=(e,t,n)=>at(e)?Xte(e.signal,t,n):XO(e)?t:n,Si=(e,t,n)=>at(e)?Vte(e.signal,t,n):XO(e)?n:t,VO=(e,t,n)=>at(e)?Jte(e.signal,t,n):e===Ni?{value:t}:{value:n},Yte=(e,t,n)=>at(e)?Qte(e.signal,t,n):e===gl?{value:t}:{value:n},Xte=(e,t,n)=>KO(`${e} === '${Ni}' || ${e} === '${Go}'`,t,n),Vte=(e,t,n)=>KO(`${e} !== '${Ni}' && ${e} !== '${Go}'`,t,n),Kte=(e,t,n)=>Lw(`${e} === '${pl}' || ${e} === '${Ni}'`,t,n),Jte=(e,t,n)=>Lw(`${e} === '${Ni}'`,t,n),Qte=(e,t,n)=>Lw(`${e} === '${gl}'`,t,n),KO=(e,t,n)=>(t=t!=null?mt(t):t,n=n!=null?mt(n):n,JA(t)&&JA(n)?(t=t?t.signal||H(t.value):null,n=n?n.signal||H(n.value):null,{signal:`${e} ? (${t}) : (${n})`}):[le({test:e},t)].concat(n||[])),JA=e=>e==null||Object.keys(e).length===1,Lw=(e,t,n)=>({signal:`${e} ? (${au(t)}) : (${au(n)})`}),Zte=(e,t,n,i,r)=>({signal:(i!=null?`${e} === '${pl}' ? (${au(i)}) : `:"")+(n!=null?`${e} === '${Go}' ? (${au(n)}) : `:"")+(r!=null?`${e} === '${gl}' ? (${au(r)}) : `:"")+(t!=null?`${e} === '${Ni}' ? (${au(t)}) : `:"")+"(null)"}),au=e=>at(e)?e.signal:e==null?null:H(e),ene=(e,t)=>t===0?0:at(e)?{signal:`(${e.signal}) * ${t}`}:{value:e*t},du=(e,t)=>{const n=e.signal;return n&&n.endsWith("(null)")?{signal:n.slice(0,-6)+t.signal}:e};function Ya(e,t,n,i){let r;if(t&&re(t,e))return t[e];if(re(n,e))return n[e];if(e.startsWith("title")){switch(e){case"titleColor":r="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":r=e[5].toLowerCase()+e.slice(6)}return i[Fw][r]}else if(e.startsWith("label")){switch(e){case"labelColor":r="fill";break;case"labelFont":case"labelFontSize":r=e[5].toLowerCase()+e.slice(6)}return i[qf][r]}return null}function QA(e){const t={};for(const n of e)if(n)for(const i in n)t[i]=1;return Object.keys(t)}function tne(e,t){var n=t.config,i=n.style,r=n.axis,o=t.scaleType(e.scale)==="band"&&n.axisBand,s=e.orient,a,u,l;if(at(s)){const f=QA([n.axisX,n.axisY]),d=QA([n.axisTop,n.axisBottom,n.axisLeft,n.axisRight]);a={};for(l of f)a[l]=yt(s,Ya(l,n.axisX,r,i),Ya(l,n.axisY,r,i));u={};for(l of d)u[l]=Zte(s.signal,Ya(l,n.axisTop,r,i),Ya(l,n.axisBottom,r,i),Ya(l,n.axisLeft,r,i),Ya(l,n.axisRight,r,i))}else a=s===Ni||s===Go?n.axisX:n.axisY,u=n["axis"+s[0].toUpperCase()+s.slice(1)];return a||u||o?le({},r,a,u,o):r}function nne(e,t,n,i){const r=An(e,t),o=e.orient;let s,a;const u={enter:s={opacity:we},update:a={opacity:Qn},exit:{opacity:we}};Ct(u,{stroke:r("domainColor"),strokeCap:r("domainCap"),strokeDash:r("domainDash"),strokeDashOffset:r("domainDashOffset"),strokeWidth:r("domainWidth"),strokeOpacity:r("domainOpacity")});const l=ZA(e,0),c=ZA(e,1);return s.x=a.x=yt(o,l,we),s.x2=a.x2=yt(o,c),s.y=a.y=Si(o,l,we),s.y2=a.y2=Si(o,c),Bn({type:Tw,role:$Z,from:i,encode:u},n)}function ZA(e,t){return{scale:e.scale,range:t}}function ine(e,t,n,i,r){const o=An(e,t),s=e.orient,a=e.gridScale,u=fm(s,1,-1),l=rne(e.offset,u);let c,f,d;const h={enter:c={opacity:we},update:d={opacity:Qn},exit:f={opacity:we}};Ct(h,{stroke:o("gridColor"),strokeCap:o("gridCap"),strokeDash:o("gridDash"),strokeDashOffset:o("gridDashOffset"),strokeOpacity:o("gridOpacity"),strokeWidth:o("gridWidth")});const p={scale:e.scale,field:Jn,band:r.band,extra:r.extra,offset:r.offset,round:o("tickRound")},g=yt(s,{signal:"height"},{signal:"width"}),m=a?{scale:a,range:0,mult:u,offset:l}:{value:0,offset:l},y=a?{scale:a,range:1,mult:u,offset:l}:le(g,{mult:u,offset:l});return c.x=d.x=yt(s,p,m),c.y=d.y=Si(s,p,m),c.x2=d.x2=Si(s,y),c.y2=d.y2=yt(s,y),f.x=yt(s,p),f.y=Si(s,p),Bn({type:Tw,role:AZ,key:Jn,from:i,encode:h},n)}function rne(e,t){if(t!==1)if(!V(e))e=at(t)?{signal:`(${t.signal}) * (${e||0})`}:t*(e||0);else{let n=e=le({},e);for(;n.mult!=null;)if(V(n.mult))n=n.mult=le({},n.mult);else return n.mult=at(t)?{signal:`(${n.mult}) * (${t.signal})`}:n.mult*t,e;n.mult=t}return e}function one(e,t,n,i,r,o){const s=An(e,t),a=e.orient,u=fm(a,-1,1);let l,c,f;const d={enter:l={opacity:we},update:f={opacity:Qn},exit:c={opacity:we}};Ct(d,{stroke:s("tickColor"),strokeCap:s("tickCap"),strokeDash:s("tickDash"),strokeDashOffset:s("tickDashOffset"),strokeOpacity:s("tickOpacity"),strokeWidth:s("tickWidth")});const h=mt(r);h.mult=u;const p={scale:e.scale,field:Jn,band:o.band,extra:o.extra,offset:o.offset,round:s("tickRound")};return f.y=l.y=yt(a,we,p),f.y2=l.y2=yt(a,h),c.x=yt(a,p),f.x=l.x=Si(a,we,p),f.x2=l.x2=Si(a,h),c.y=Si(a,p),Bn({type:Tw,role:CZ,key:Jn,from:i,encode:d},n)}function l1(e,t,n,i,r){return{signal:'flush(range("'+e+'"), scale("'+e+'", datum.value), '+t+","+n+","+i+","+r+")"}}function sne(e,t,n,i,r,o){const s=An(e,t),a=e.orient,u=e.scale,l=fm(a,-1,1),c=Ys(s("labelFlush")),f=Ys(s("labelFlushOffset")),d=s("labelAlign"),h=s("labelBaseline");let p=c===0||!!c,g;const m=mt(r);m.mult=l,m.offset=mt(s("labelPadding")||0),m.offset.mult=l;const y={scale:u,field:Jn,band:.5,offset:qO(o.offset,s("labelOffset"))},v=yt(a,p?l1(u,c,'"left"','"right"','"center"'):{value:"center"},Yte(a,"left","right")),b=yt(a,VO(a,"bottom","top"),p?l1(u,c,'"top"','"bottom"','"middle"'):{value:"middle"}),x=l1(u,c,`-(${f})`,f,0);p=p&&f;const w={opacity:we,x:yt(a,y,m),y:Si(a,y,m)},_={enter:w,update:g={opacity:Qn,text:{field:Cw},x:w.x,y:w.y,align:v,baseline:b},exit:{opacity:we,x:w.x,y:w.y}};Ct(_,{dx:!d&&p?yt(a,x):null,dy:!h&&p?Si(a,x):null}),Ct(_,{angle:s("labelAngle"),fill:s("labelColor"),fillOpacity:s("labelOpacity"),font:s("labelFont"),fontSize:s("labelFontSize"),fontWeight:s("labelFontWeight"),fontStyle:s("labelFontStyle"),limit:s("labelLimit"),lineHeight:s("labelLineHeight")},{align:d,baseline:h});const E=s("labelBound");let S=s("labelOverlap");return S=S||E?{separation:s("labelSeparation"),method:S,order:"datum.index",bound:E?{scale:u,orient:a,tolerance:E}:null}:void 0,g.align!==v&&(g.align=du(g.align,v)),g.baseline!==b&&(g.baseline=du(g.baseline,b)),Bn({type:Fa,role:kZ,style:qf,key:Jn,from:i,encode:_,overlap:S},n)}function ane(e,t,n,i){const r=An(e,t),o=e.orient,s=fm(o,-1,1);let a,u;const l={enter:a={opacity:we,anchor:mt(r("titleAnchor",null)),align:{signal:Dw}},update:u=le({},a,{opacity:Qn,text:mt(e.title)}),exit:{opacity:we}},c={signal:`lerp(range("${e.scale}"), ${um(0,1,.5)})`};return u.x=yt(o,c),u.y=Si(o,c),a.angle=yt(o,we,ene(s,90)),a.baseline=yt(o,VO(o,Go,Ni),{value:Go}),u.angle=a.angle,u.baseline=a.baseline,Ct(l,{fill:r("titleColor"),fillOpacity:r("titleOpacity"),font:r("titleFont"),fontSize:r("titleFontSize"),fontStyle:r("titleFontStyle"),fontWeight:r("titleFontWeight"),limit:r("titleLimit"),lineHeight:r("titleLineHeight")},{align:r("titleAlign"),angle:r("titleAngle"),baseline:r("titleBaseline")}),une(r,o,l,n),l.update.align=du(l.update.align,a.align),l.update.angle=du(l.update.angle,a.angle),l.update.baseline=du(l.update.baseline,a.baseline),Bn({type:Fa,role:FZ,style:Fw,from:i,encode:l},n)}function une(e,t,n,i){const r=(a,u)=>a!=null?(n.update[u]=du(mt(a),n.update[u]),!1):!eu(u,i),o=r(e("titleX"),"x"),s=r(e("titleY"),"y");n.enter.auto=s===o?mt(s):yt(t,mt(s),mt(o))}function lne(e,t){const n=tne(e,t),i=e.encode||{},r=i.axis||{},o=r.name||void 0,s=r.interactive,a=r.style,u=An(e,n),l=ote(u),c={scale:e.scale,ticks:!!u("ticks"),labels:!!u("labels"),grid:!!u("grid"),domain:!!u("domain"),title:e.title!=null},f=te(t.add(Di({},[c]))),d=te(t.add(cee({scale:t.scaleRef(e.scale),extra:t.property(l.extra),count:t.objectProperty(e.tickCount),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)}))),h=[];let p;return c.grid&&h.push(ine(e,n,i.grid,d,l)),c.ticks&&(p=u("tickSize"),h.push(one(e,n,i.ticks,d,p,l))),c.labels&&(p=c.ticks?p:0,h.push(sne(e,n,i.labels,d,p,l))),c.domain&&h.push(nne(e,n,i.domain,f)),c.title&&h.push(ane(e,n,i.title,f)),cm(af({role:SZ,from:f,encode:hl(cne(u,e),r,Wf),marks:h,aria:u("aria"),description:u("description"),zindex:u("zindex"),name:o,interactive:s,style:a}),t)}function cne(e,t){const n={enter:{},update:{}};return Ct(n,{orient:e("orient"),offset:e("offset")||0,position:pi(t.position,0),titlePadding:e("titlePadding"),minExtent:e("minExtent"),maxExtent:e("maxExtent"),range:{signal:`abs(span(range("${t.scale}")))`},translate:e("translate"),format:t.format,formatType:t.formatType}),n}function JO(e,t,n){const i=Y(e.signals),r=Y(e.scales);return n||i.forEach(o=>FO(o,t)),Y(e.projections).forEach(o=>jee(o,t)),r.forEach(o=>Mee(o,t)),Y(e.data).forEach(o=>Hte(o,t)),r.forEach(o=>Tee(o,t)),(n||i).forEach(o=>lee(o,t)),Y(e.axes).forEach(o=>lne(o,t)),Y(e.marks).forEach(o=>cm(o,t)),Y(e.legends).forEach(o=>Nte(o,t)),e.title&&Bte(e.title,t),t.parseLambdas(),t}const fne=e=>hl({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},e);function dne(e,t){const n=t.config,i=te(t.root=t.add(Tp())),r=hne(e,n);r.forEach(l=>FO(l,t)),t.description=e.description||n.description,t.eventConfig=n.events,t.legends=t.objectProperty(n.legend&&n.legend.layout),t.locale=n.locale;const o=t.add(Di()),s=t.add(DO(CO(fne(e.encode),am,Sw,e.style,t,{pulse:te(o)}))),a=t.add(RO({layout:t.objectProperty(e.layout),legends:t.legends,autosize:t.signalRef("autosize"),mark:i,pulse:te(s)}));t.operators.pop(),t.pushState(te(s),te(a),null),JO(e,t,r),t.operators.push(a);let u=t.add(TO({mark:i,pulse:te(a)}));return u=t.add(OO({pulse:te(u)})),u=t.add(Ca({pulse:te(u)})),t.addData("root",new la(t,o,o,u)),t}function jl(e,t){return t&&t.signal?{name:e,update:t.signal}:{name:e,value:t}}function hne(e,t){const n=s=>pi(e[s],t[s]),i=[jl("background",n("background")),jl("autosize",wZ(n("autosize"))),jl("padding",_Z(n("padding"))),jl("width",n("width")||0),jl("height",n("height")||0)],r=i.reduce((s,a)=>(s[a.name]=a,s),{}),o={};return Y(e.signals).forEach(s=>{re(r,s.name)?s=le(r[s.name],s):i.push(s),o[s.name]=s}),Y(t.signals).forEach(s=>{!re(o,s.name)&&!re(r,s.name)&&i.push(s)}),i}function QO(e,t){this.config=e||{},this.options=t||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function ek(e){this.config=e.config,this.options=e.options,this.legends=e.legends,this.field=Object.create(e.field),this.signals=Object.create(e.signals),this.lambdas=Object.create(e.lambdas),this.scales=Object.create(e.scales),this.events=Object.create(e.events),this.data=Object.create(e.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++e._nextsub[0],this._nextsub=e._nextsub,this._parent=e._parent.slice(),this._encode=e._encode.slice(),this._lookup=e._lookup.slice(),this._markpath=e._markpath}QO.prototype=ek.prototype={parse(e){return JO(e,this)},fork(){return new ek(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(e){return this.operators.push(e),e.id=this.id(),e.refs&&(e.refs.forEach(t=>{t.$ref=e.id}),e.refs=null),e},proxy(e){const t=e instanceof fv?te(e):e;return this.add(See({value:t}))},addStream(e){return this.streams.push(e),e.id=this.id(),e},addUpdate(e){return this.updates.push(e),e},finish(){let e,t;this.root&&(this.root.root=!0);for(e in this.signals)this.signals[e].signal=e;for(e in this.scales)this.scales[e].scale=e;function n(i,r,o){let s,a;i&&(s=i.data||(i.data={}),a=s[r]||(s[r]=[]),a.push(o))}for(e in this.data){t=this.data[e],n(t.input,e,"input"),n(t.output,e,"output"),n(t.values,e,"values");for(const i in t.index)n(t.index[i],e,"index:"+i)}return this},pushState(e,t,n){this._encode.push(te(this.add(Ca({pulse:e})))),this._parent.push(t),this._lookup.push(n?te(this.proxy(n)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return xe(this._parent)},encode(){return xe(this._encode)},lookup(){return xe(this._lookup)},markpath(){const e=this._markpath;return++e[e.length-1]},fieldRef(e,t){if(X(e))return of(e,t);e.signal||R("Unsupported field reference: "+H(e));const n=e.signal;let i=this.field[n];if(!i){const r={name:this.signalRef(n)};t&&(r.as=t),this.field[n]=i=te(this.add(pee(r)))}return i},compareRef(e){let t=!1;const n=o=>at(o)?(t=!0,this.signalRef(o.signal)):ZZ(o)?(t=!0,this.exprRef(o.expr)):o,i=Y(e.field).map(n),r=Y(e.order).map(n);return t?te(this.add(BA({fields:i,orders:r}))):IA(i,r)},keyRef(e,t){let n=!1;const i=o=>at(o)?(n=!0,te(r[o.signal])):o,r=this.signals;return e=Y(e).map(i),n?te(this.add(gee({fields:e,flat:t}))):VZ(e,t)},sortRef(e){if(!e)return e;const t=om(e.op,e.field),n=e.order||KZ;return n.signal?te(this.add(BA({fields:t,orders:this.signalRef(n.signal)}))):IA(t,n)},event(e,t){const n=e+":"+t;if(!this.events[n]){const i=this.id();this.streams.push({id:i,source:e,type:t}),this.events[n]=i}return this.events[n]},hasOwnSignal(e){return re(this.signals,e)},addSignal(e,t){this.hasOwnSignal(e)&&R("Duplicate signal name: "+H(e));const n=t instanceof fv?t:this.add(Tp(t));return this.signals[e]=n},getSignal(e){return this.signals[e]||R("Unrecognized signal name: "+H(e)),this.signals[e]},signalRef(e){return this.signals[e]?te(this.signals[e]):(re(this.lambdas,e)||(this.lambdas[e]=this.add(Tp(null))),te(this.lambdas[e]))},parseLambdas(){const e=Object.keys(this.lambdas);for(let t=0,n=e.length;t0?",":"")+(V(r)?r.signal||Pw(r):H(r))}return n+"]"}function gne(e){let t="{",n=0,i,r;for(i in e)r=e[i],t+=(++n>1?",":"")+H(i)+":"+(V(r)?r.signal||Pw(r):H(r));return t+"}"}function mne(){const e="sans-serif",i="#4c78a8",r="#000",o="#888",s="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:i},area:{fill:i},image:null,line:{stroke:i,strokeWidth:2},path:{stroke:i},rect:{fill:i},rule:{stroke:r},shape:{stroke:i},symbol:{fill:i,size:64},text:{fill:r,font:e,fontSize:11},trail:{fill:i,size:2},style:{"guide-label":{fill:r,font:e,fontSize:10},"guide-title":{fill:r,font:e,fontSize:11,fontWeight:"bold"},"group-title":{fill:r,font:e,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:r,font:e,fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:s},view:{fill:"transparent"}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:o,grid:!1,gridWidth:1,gridColor:s,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:o,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:s,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:o,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}function yne(e,t,n){return V(e)||R("Input Vega specification must be an object."),t=el(mne(),t,e.config),dne(e,new QO(t,n)).toRuntime()}var vne="5.28.0";le(Su,_z,Wq,EW,aG,tY,CX,aX,MX,eV,cV,yV);const bne=Object.freeze(Object.defineProperty({__proto__:null,Bounds:nt,CanvasHandler:Wo,CanvasRenderer:Xc,DATE:xn,DAY:Lt,DAYOFYEAR:sr,Dataflow:uu,Debug:KC,Error:Hv,EventStream:fg,Gradient:WT,GroupItem:Og,HOURS:Pn,Handler:qo,HybridHandler:f2,HybridRenderer:Yh,Info:VC,Item:Ng,MILLISECONDS:ki,MINUTES:In,MONTH:Ut,Marks:zn,MultiPulse:mb,None:XC,Operator:Pe,Parameters:cg,Pulse:To,QUARTER:bn,RenderType:_o,Renderer:jn,ResourceLoader:Bx,SECONDS:ti,SVGHandler:r2,SVGRenderer:jg,SVGStringRenderer:c2,Scenegraph:n2,TIME_UNITS:sb,Transform:D,View:mO,WEEK:ot,Warn:Gv,YEAR:At,accessor:$n,accessorFields:Bt,accessorName:Je,array:Y,ascending:Zp,bandwidthNRD:xb,bin:TM,bootstrapCI:DM,boundClip:UD,boundContext:Tf,boundItem:hy,boundMark:lD,boundStroke:eo,changeset:Sa,clampRange:aF,codegenExpression:q5,compare:Jv,constant:Ht,cumulativeLogNormal:Ab,cumulativeNormal:hg,cumulativeUniform:Mb,dayofyear:IF,debounce:Qv,defaultLocale:fb,definition:CM,densityLogNormal:$b,densityNormal:wb,densityUniform:Fb,domChild:rt,domClear:Hn,domCreate:wo,domFind:i2,dotbin:NM,error:R,expressionFunction:tt,extend:le,extent:ir,extentIndex:uF,falsy:co,fastmap:nl,field:Zn,flush:lF,font:zg,fontFamily:Of,fontSize:pr,format:Hd,formatLocale:Sh,formats:pb,hasOwnProperty:re,id:mf,identity:Wt,inferType:yM,inferTypes:vM,ingest:Me,inherits:W,inrange:nu,interpolate:Dx,interpolateColors:Tg,interpolateRange:MT,intersect:PD,intersectBoxLine:iu,intersectPath:Ux,intersectPoint:jx,intersectRule:QT,isArray:P,isBoolean:es,isDate:Fo,isFunction:ce,isIterable:cF,isNumber:Ee,isObject:V,isRegExp:fF,isString:X,isTuple:ug,key:Zv,lerp:dF,lineHeight:Uo,loader:sg,locale:gM,logger:Yv,lruCache:hF,markup:l2,merge:pF,mergeConfig:el,multiLineOffset:Zx,one:Zu,pad:gF,panLinear:tF,panLog:nF,panPow:iF,panSymlog:rF,parse:yne,parseExpression:cw,parseSelector:ss,path:vg,pathCurves:Px,pathEqual:jD,pathParse:Mu,pathRectangle:YT,pathRender:Wc,pathSymbols:GT,pathTrail:XT,peek:xe,point:Ug,projection:M2,quantileLogNormal:kb,quantileNormal:pg,quantileUniform:Tb,quantiles:vb,quantizeInterpolator:TT,quarter:oF,quartiles:bb,get random(){return ni},randomInteger:k9,randomKDE:_b,randomLCG:A9,randomLogNormal:RM,randomMixture:LM,randomNormal:Eb,randomUniform:PM,read:wM,regressionConstant:Db,regressionExp:zM,regressionLinear:Nb,regressionLoess:jM,regressionLog:IM,regressionPoly:UM,regressionPow:BM,regressionQuad:Ob,renderModule:qg,repeat:Kl,resetDefaultLocale:_I,resetSVGClipId:KT,resetSVGDefIds:uq,responseType:xM,runtimeContext:iO,sampleCurve:mg,sampleLogNormal:Sb,sampleNormal:dg,sampleUniform:Cb,scale:Ae,sceneEqual:d2,sceneFromJSON:fD,scenePickVisit:Ih,sceneToJSON:cD,sceneVisit:Ci,sceneZOrder:qx,scheme:Nx,serializeXML:CD,setHybridRendererOptions:rq,setRandom:S9,span:yf,splitAccessPath:dr,stringValue:H,textMetrics:On,timeBin:tM,timeFloor:HF,timeFormatLocale:Ic,timeInterval:sl,timeOffset:XF,timeSequence:JF,timeUnitSpecifier:PF,timeUnits:ab,toBoolean:eb,toDate:tb,toNumber:Pt,toSet:Ai,toString:nb,transform:FM,transforms:Su,truncate:mF,truthy:ei,tupleid:ne,typeParsers:V1,utcFloor:GF,utcInterval:al,utcOffset:VF,utcSequence:QF,utcdayofyear:UF,utcquarter:sF,utcweek:jF,version:vne,visitArray:po,week:zF,writeConfig:tl,zero:bo,zoomLinear:Xv,zoomLog:Vv,zoomPow:vh,zoomSymlog:Kv},Symbol.toStringTag,{value:"Module"}));function xne(e,t,n){let i;t.x2&&(t.x?(n&&e.x>e.x2&&(i=e.x,e.x=e.x2,e.x2=i),e.width=e.x2-e.x):e.x=e.x2-(e.width||0)),t.xc&&(e.x=e.xc-(e.width||0)/2),t.y2&&(t.y?(n&&e.y>e.y2&&(i=e.y,e.y=e.y2,e.y2=i),e.height=e.y2-e.y):e.y=e.y2-(e.height||0)),t.yc&&(e.y=e.yc-(e.height||0)/2)}var wne={NaN:NaN,E:Math.E,LN2:Math.LN2,LN10:Math.LN10,LOG2E:Math.LOG2E,LOG10E:Math.LOG10E,PI:Math.PI,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2,MIN_VALUE:Number.MIN_VALUE,MAX_VALUE:Number.MAX_VALUE},Ene={"*":(e,t)=>e*t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,">":(e,t)=>e>t,"<":(e,t)=>ee<=t,">=":(e,t)=>e>=t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,"&":(e,t)=>e&t,"|":(e,t)=>e|t,"^":(e,t)=>e^t,"<<":(e,t)=>e<>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t},_ne={"+":e=>+e,"-":e=>-e,"~":e=>~e,"!":e=>!e};const Sne=Array.prototype.slice,xs=(e,t,n)=>{const i=n?n(t[0]):t[0];return i[e].apply(i,Sne.call(t,1))},$ne=(e,t,n,i,r,o,s)=>new Date(e,t||0,n??1,i||0,r||0,o||0,s||0);var Ane={isNaN:Number.isNaN,isFinite:Number.isFinite,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,cos:Math.cos,exp:Math.exp,floor:Math.floor,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,clamp:(e,t,n)=>Math.max(t,Math.min(n,e)),now:Date.now,utc:Date.UTC,datetime:$ne,date:e=>new Date(e).getDate(),day:e=>new Date(e).getDay(),year:e=>new Date(e).getFullYear(),month:e=>new Date(e).getMonth(),hours:e=>new Date(e).getHours(),minutes:e=>new Date(e).getMinutes(),seconds:e=>new Date(e).getSeconds(),milliseconds:e=>new Date(e).getMilliseconds(),time:e=>new Date(e).getTime(),timezoneoffset:e=>new Date(e).getTimezoneOffset(),utcdate:e=>new Date(e).getUTCDate(),utcday:e=>new Date(e).getUTCDay(),utcyear:e=>new Date(e).getUTCFullYear(),utcmonth:e=>new Date(e).getUTCMonth(),utchours:e=>new Date(e).getUTCHours(),utcminutes:e=>new Date(e).getUTCMinutes(),utcseconds:e=>new Date(e).getUTCSeconds(),utcmilliseconds:e=>new Date(e).getUTCMilliseconds(),length:e=>e.length,join:function(){return xs("join",arguments)},indexof:function(){return xs("indexOf",arguments)},lastindexof:function(){return xs("lastIndexOf",arguments)},slice:function(){return xs("slice",arguments)},reverse:e=>e.slice().reverse(),parseFloat,parseInt,upper:e=>String(e).toUpperCase(),lower:e=>String(e).toLowerCase(),substring:function(){return xs("substring",arguments,String)},split:function(){return xs("split",arguments,String)},replace:function(){return xs("replace",arguments,String)},trim:e=>String(e).trim(),regexp:RegExp,test:(e,t)=>RegExp(e).test(t)};const kne=["view","item","group","xy","x","y"],vv=new Set([Function,eval,setTimeout,setInterval]);typeof setImmediate=="function"&&vv.add(setImmediate);const Cne={Literal:(e,t)=>t.value,Identifier:(e,t)=>{const n=t.name;return e.memberDepth>0?n:n==="datum"?e.datum:n==="event"?e.event:n==="item"?e.item:wne[n]||e.params["$"+n]},MemberExpression:(e,t)=>{const n=!t.computed,i=e(t.object);n&&(e.memberDepth+=1);const r=e(t.property);if(n&&(e.memberDepth-=1),vv.has(i[r])){console.error(`Prevented interpretation of member "${r}" which could lead to insecure code execution`);return}return i[r]},CallExpression:(e,t)=>{const n=t.arguments;let i=t.callee.name;return i.startsWith("_")&&(i=i.slice(1)),i==="if"?e(n[0])?e(n[1]):e(n[2]):(e.fn[i]||Ane[i]).apply(e.fn,n.map(e))},ArrayExpression:(e,t)=>t.elements.map(e),BinaryExpression:(e,t)=>Ene[t.operator](e(t.left),e(t.right)),UnaryExpression:(e,t)=>_ne[t.operator](e(t.argument)),ConditionalExpression:(e,t)=>e(t.test)?e(t.consequent):e(t.alternate),LogicalExpression:(e,t)=>t.operator==="&&"?e(t.left)&&e(t.right):e(t.left)||e(t.right),ObjectExpression:(e,t)=>t.properties.reduce((n,i)=>{e.memberDepth+=1;const r=e(i.key);return e.memberDepth-=1,vv.has(e(i.value))?console.error(`Prevented interpretation of property "${r}" which could lead to insecure code execution`):n[r]=e(i.value),n},{})};function ql(e,t,n,i,r,o){const s=a=>Cne[a.type](s,a);return s.memberDepth=0,s.fn=Object.create(t),s.params=n,s.datum=i,s.event=r,s.item=o,kne.forEach(a=>s.fn[a]=function(){return r.vega[a](...arguments)}),s(e)}var Fne={operator(e,t){const n=t.ast,i=e.functions;return r=>ql(n,i,r)},parameter(e,t){const n=t.ast,i=e.functions;return(r,o)=>ql(n,i,o,r)},event(e,t){const n=t.ast,i=e.functions;return r=>ql(n,i,void 0,void 0,r)},handler(e,t){const n=t.ast,i=e.functions;return(r,o)=>{const s=o.item&&o.item.datum;return ql(n,i,r,s,o)}},encode(e,t){const{marktype:n,channels:i}=t,r=e.functions,o=n==="group"||n==="image"||n==="rect";return(s,a)=>{const u=s.datum;let l=0,c;for(const f in i)c=ql(i[f].ast,r,a,u,void 0,s),s[f]!==c&&(s[f]=c,l=1);return n!=="rule"&&xne(s,i,o),l}}};const Mne="vega-lite",Tne='Dominik Moritz, Kanit "Ham" Wongsuphasawat, Arvind Satyanarayan, Jeffrey Heer',Dne="5.17.0",Nne=["Kanit Wongsuphasawat (http://kanitw.yellowpigz.com)","Dominik Moritz (https://www.domoritz.de)","Arvind Satyanarayan (https://arvindsatya.com)","Jeffrey Heer (https://jheer.org)"],One="https://vega.github.io/vega-lite/",Rne="Vega-Lite is a concise high-level language for interactive visualization.",Lne=["vega","chart","visualization"],Pne="build/vega-lite.js",Ine="build/vega-lite.min.js",zne="build/vega-lite.min.js",Bne="build/src/index",Une="build/src/index.d.ts",jne={vl2pdf:"./bin/vl2pdf",vl2png:"./bin/vl2png",vl2svg:"./bin/vl2svg",vl2vg:"./bin/vl2vg"},qne=["bin","build","src","vega-lite*","tsconfig.json"],Wne={changelog:"conventional-changelog -p angular -r 2",prebuild:"yarn clean:build",build:"yarn build:only","build:only":"tsc -p tsconfig.build.json && rollup -c","prebuild:examples":"yarn build:only","build:examples":"yarn data && TZ=America/Los_Angeles scripts/build-examples.sh","prebuild:examples-full":"yarn build:only","build:examples-full":"TZ=America/Los_Angeles scripts/build-examples.sh 1","build:example":"TZ=America/Los_Angeles scripts/build-example.sh","build:toc":"yarn build:jekyll && scripts/generate-toc","build:site":"rollup -c site/rollup.config.mjs","build:jekyll":"pushd site && bundle exec jekyll build -q && popd","build:versions":"scripts/update-version.sh",clean:"yarn clean:build && del-cli 'site/data/*' 'examples/compiled/*.png' && find site/examples ! -name 'index.md' ! -name 'data' -type f -delete","clean:build":"del-cli 'build/*' !build/vega-lite-schema.json",data:"rsync -r node_modules/vega-datasets/data/* site/data",schema:"mkdir -p build && ts-json-schema-generator -f tsconfig.json -p src/index.ts -t TopLevelSpec --no-type-check --no-ref-encode > build/vega-lite-schema.json && yarn renameschema && cp build/vega-lite-schema.json site/_data/",renameschema:"scripts/rename-schema.sh",presite:"yarn data && yarn schema && yarn build:site && yarn build:versions && scripts/create-example-pages.sh",site:"yarn site:only","site:only":"pushd site && bundle exec jekyll serve -I -l && popd",prettierbase:"prettier '**/*.{md,css,yml}'",format:"eslint . --fix && yarn prettierbase --write",lint:"eslint . && yarn prettierbase --check",test:"yarn jest test/ && yarn lint && yarn schema && yarn jest examples/ && yarn test:runtime","test:cover":"yarn jest --collectCoverage test/","test:inspect":"node --inspect-brk ./node_modules/.bin/jest --runInBand test","test:runtime":"TZ=America/Los_Angeles npx jest test-runtime/ --config test-runtime/jest-config.json","test:runtime:generate":"yarn build:only && del-cli test-runtime/resources && VL_GENERATE_TESTS=true yarn test:runtime",watch:"tsc -p tsconfig.build.json -w","watch:site":"yarn build:site -w","watch:test":"yarn jest --watch test/","watch:test:runtime":"TZ=America/Los_Angeles npx jest --watch test-runtime/ --config test-runtime/jest-config.json",release:"release-it"},Hne={type:"git",url:"https://github.com/vega/vega-lite.git"},Gne="BSD-3-Clause",Yne={url:"https://github.com/vega/vega-lite/issues"},Xne={"@babel/core":"^7.23.9","@babel/preset-env":"^7.23.9","@babel/preset-typescript":"^7.23.3","@release-it/conventional-changelog":"^8.0.1","@rollup/plugin-alias":"^5.1.0","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-terser":"^0.4.4","@types/d3":"^7.4.3","@types/jest":"^29.5.11","@types/pako":"^2.0.3","@typescript-eslint/eslint-plugin":"^6.20.0","@typescript-eslint/parser":"^6.20.0",ajv:"^8.12.0","ajv-formats":"^2.1.1",cheerio:"^1.0.0-rc.12","conventional-changelog-cli":"^4.1.0",d3:"^7.8.5","del-cli":"^5.1.0",eslint:"^8.56.0","eslint-config-prettier":"^9.1.0","eslint-plugin-jest":"^27.6.3","eslint-plugin-prettier":"^5.1.3","fast-json-stable-stringify":"~2.1.0","highlight.js":"^11.9.0",jest:"^29.7.0","jest-dev-server":"^9.0.2",mkdirp:"^3.0.1",pako:"^2.1.0",prettier:"^3.2.4",puppeteer:"^15.0.0","release-it":"^17.0.3",rollup:"^4.9.6","rollup-plugin-bundle-size":"^1.0.3",serve:"^14.2.1",terser:"^5.27.0","ts-jest":"^29.1.2","ts-json-schema-generator":"^1.5.0",typescript:"~5.3.3","vega-cli":"^5.27.0","vega-datasets":"^2.8.0","vega-embed":"^6.24.0","vega-tooltip":"^0.34.0","yaml-front-matter":"^4.1.1"},Vne={"json-stringify-pretty-compact":"~3.0.0",tslib:"~2.6.2","vega-event-selector":"~3.0.1","vega-expression":"~5.1.0","vega-util":"~1.17.2",yargs:"~17.7.2"},Kne={vega:"^5.24.0"},Jne={node:">=18"},Qne={name:Mne,author:Tne,version:Dne,collaborators:Nne,homepage:One,description:Rne,keywords:Lne,main:Pne,unpkg:Ine,jsdelivr:zne,module:Bne,types:Une,bin:jne,files:qne,scripts:Wne,repository:Hne,license:Gne,bugs:Yne,devDependencies:Xne,dependencies:Vne,peerDependencies:Kne,engines:Jne};function Iw(e){return!!e.or}function zw(e){return!!e.and}function Bw(e){return!!e.not}function ph(e,t){if(Bw(e))ph(e.not,t);else if(zw(e))for(const n of e.and)ph(n,t);else if(Iw(e))for(const n of e.or)ph(n,t);else t(e)}function hu(e,t){return Bw(e)?{not:hu(e.not,t)}:zw(e)?{and:e.and.map(n=>hu(n,t))}:Iw(e)?{or:e.or.map(n=>hu(n,t))}:t(e)}const ae=structuredClone;function ZO(e){throw new Error(e)}function zu(e,t){const n={};for(const i of t)re(e,i)&&(n[i]=e[i]);return n}function yn(e,t){const n={...e};for(const i of t)delete n[i];return n}Set.prototype.toJSON=function(){return`Set(${[...this].map(e=>Re(e)).join(",")})`};function ye(e){if(Ee(e))return e;const t=X(e)?e:Re(e);if(t.length<250)return t;let n=0;for(let i=0;ia===0?s:`[${s}]`),o=r.map((s,a)=>r.slice(0,a+1).join(""));for(const s of o)t.add(s)}return t}function qw(e,t){return e===void 0||t===void 0?!0:jw(xv(e),xv(t))}function Oe(e){return B(e).length===0}const B=Object.keys,kt=Object.values,Yo=Object.entries;function uf(e){return e===!0||e===!1}function We(e){const t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function Tc(e,t){return Bw(e)?`!(${Tc(e.not,t)})`:zw(e)?`(${e.and.map(n=>Tc(n,t)).join(") && (")})`:Iw(e)?`(${e.or.map(n=>Tc(n,t)).join(") || (")})`:t(e)}function Dp(e,t){if(t.length===0)return!0;const n=t.shift();return n in e&&Dp(e[n],t)&&delete e[n],Oe(e)}function Hf(e){return e.charAt(0).toUpperCase()+e.substr(1)}function Ww(e,t="datum"){const n=dr(e),i=[];for(let r=1;r<=n.length;r++){const o=`[${n.slice(0,r).map(H).join("][")}]`;i.push(`${t}${o}`)}return i.join(" && ")}function nR(e,t="datum"){return`${t}[${H(dr(e).join("."))}]`}function tie(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function ri(e){return`${dr(e).map(tie).join("\\.")}`}function fa(e,t,n){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function Hw(e){return`${dr(e).join(".")}`}function Bu(e){return e?dr(e).length:0}function Ze(...e){for(const t of e)if(t!==void 0)return t}let iR=42;function rR(e){const t=++iR;return e?String(e)+t:t}function nie(){iR=42}function oR(e){return sR(e)?e:`__${e}`}function sR(e){return e.startsWith("__")}function lf(e){if(e!==void 0)return(e%360+360)%360}function dm(e){return Ee(e)?!0:!isNaN(e)&&!isNaN(parseFloat(e))}const tk=Object.getPrototypeOf(structuredClone({}));function Nn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor.name!==t.constructor.name)return!1;let n,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(!Nn(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!Nn(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf!==tk.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString!==tk.toString)return e.toString()===t.toString();const r=Object.keys(e);if(n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[i]))return!1;for(i=n;i--!==0;){const o=r[i];if(!Nn(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Re(e){const t=[];return function n(i){if(i&&i.toJSON&&typeof i.toJSON=="function"&&(i=i.toJSON()),i===void 0)return;if(typeof i=="number")return isFinite(i)?""+i:"null";if(typeof i!="object")return JSON.stringify(i);let r,o;if(Array.isArray(i)){for(o="[",r=0;rxm(e[t])?We(`_${t}_${Yo(e[t])}`):We(`_${t}_${e[t]}`)).join("")}function Be(e){return e===!0||Da(e)&&!e.binned}function _t(e){return e==="binned"||Da(e)&&e.binned===!0}function Da(e){return V(e)}function xm(e){return e==null?void 0:e.param}function nk(e){switch(e){case Hr:case Gr:case ro:case En:case br:case xr:case cs:case oo:case us:case ls:case _n:return 6;case fs:return 4;default:return 10}}function Vf(e){return!!(e!=null&&e.expr)}function pn(e){const t=B(e||{}),n={};for(const i of t)n[i]=Mn(e[i]);return n}function wR(e){const{anchor:t,frame:n,offset:i,orient:r,angle:o,limit:s,color:a,subtitleColor:u,subtitleFont:l,subtitleFontSize:c,subtitleFontStyle:f,subtitleFontWeight:d,subtitleLineHeight:h,subtitlePadding:p,...g}=e,m={...g,...a?{fill:a}:{}},y={...t?{anchor:t}:{},...n?{frame:n}:{},...i?{offset:i}:{},...r?{orient:r}:{},...o!==void 0?{angle:o}:{},...s!==void 0?{limit:s}:{}},v={...u?{subtitleColor:u}:{},...l?{subtitleFont:l}:{},...c?{subtitleFontSize:c}:{},...f?{subtitleFontStyle:f}:{},...d?{subtitleFontWeight:d}:{},...h?{subtitleLineHeight:h}:{},...p?{subtitlePadding:p}:{}},b=zu(e,["align","baseline","dx","dy","limit"]);return{titleMarkConfig:m,subtitleMarkConfig:b,nonMarkTitleProperties:y,subtitle:v}}function vo(e){return X(e)||P(e)&&X(e[0])}function Q(e){return!!(e!=null&&e.signal)}function hs(e){return!!e.step}function Aie(e){return P(e)?!1:"fields"in e&&!("data"in e)}function kie(e){return P(e)?!1:"fields"in e&&"data"in e}function Ur(e){return P(e)?!1:"field"in e&&"data"in e}const Cie={aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius:1,size:1,shape:1,interpolate:1,tension:1,orient:1,align:1,baseline:1,text:1,dir:1,dx:1,dy:1,ellipsis:1,limit:1,radius:1,theta:1,angle:1,font:1,fontSize:1,fontWeight:1,fontStyle:1,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1,url:1,smooth:1},Fie=B(Cie),Mie={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},wv=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];function ER(e){const t=P(e.condition)?e.condition.map(ik):ik(e.condition);return{...Mn(e),condition:t}}function Mn(e){if(Vf(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function ik(e){if(Vf(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function je(e){if(Vf(e)){const{expr:t,...n}=e;return{signal:t,...n}}return Q(e)?e:e!==void 0?{value:e}:void 0}function Tie(e){return Q(e)?e.signal:H(e)}function rk(e){return Q(e)?e.signal:H(e.value)}function wi(e){return Q(e)?e.signal:e==null?null:H(e)}function Die(e,t,n){for(const i of n){const r=Zr(i,t.markDef,t.config);r!==void 0&&(e[i]=je(r))}return e}function _R(e){return[].concat(e.type,e.style??[])}function Fe(e,t,n,i={}){const{vgChannel:r,ignoreVgConfig:o}=i;return r&&t[r]!==void 0?t[r]:t[e]!==void 0?t[e]:o&&(!r||r===e)?void 0:Zr(e,t,n,i)}function Zr(e,t,n,{vgChannel:i}={}){return Ze(i?Np(e,t,n.style):void 0,Np(e,t,n.style),i?n[t.type][i]:void 0,n[t.type][e],i?n.mark[i]:n.mark[e])}function Np(e,t,n){return SR(e,_R(t),n)}function SR(e,t,n){t=Y(t);let i;for(const r of t){const o=n[r];o&&o[e]!==void 0&&(i=o[e])}return i}function $R(e,t){return Y(e).reduce((n,i)=>(n.field.push(G(i,t)),n.order.push(i.sort??"ascending"),n),{field:[],order:[]})}function AR(e,t){const n=[...e];return t.forEach(i=>{for(const r of n)if(Nn(r,i))return;n.push(i)}),n}function kR(e,t){return Nn(e,t)||!t?e:e?[...Y(e),...Y(t)].join(", "):t}function CR(e,t){const n=e.value,i=t.value;if(n==null||i===null)return{explicit:e.explicit,value:null};if((vo(n)||Q(n))&&(vo(i)||Q(i)))return{explicit:e.explicit,value:kR(n,i)};if(vo(n)||Q(n))return{explicit:e.explicit,value:n};if(vo(i)||Q(i))return{explicit:e.explicit,value:i};if(!vo(n)&&!Q(n)&&!vo(i)&&!Q(i))return{explicit:e.explicit,value:AR(n,i)};throw new Error("It should never reach here")}function eE(e){return`Invalid specification ${Re(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const Nie='Autosize "fit" only works for single views and layered views.';function ok(e){return`${e=="width"?"Width":"Height"} "container" only works for single views and layered views.`}function sk(e){const t=e=="width"?"Width":"Height",n=e=="width"?"x":"y";return`${t} "container" only works well with autosize "fit" or "fit-${n}".`}function ak(e){return e?`Dropping "fit-${e}" because spec has discrete ${Sn(e)}.`:'Dropping "fit" because spec has discrete size.'}function tE(e){return`Unknown field for ${e}. Cannot calculate view size.`}function uk(e){return`Cannot project a selection on encoding channel "${e}", which has no field.`}function Oie(e,t){return`Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`}function Rie(e){return`The "nearest" transform is not supported for ${e} marks.`}function FR(e){return`Selection not supported for ${e} yet.`}function Lie(e){return`Cannot find a selection named "${e}".`}const Pie="Scale bindings are currently only supported for scales with unbinned, continuous domains.",Iie="Sequntial scales are deprecated. The available quantitative scale type values are linear, log, pow, sqrt, symlog, time and utc",zie="Legend bindings are only supported for selections over an individual field or encoding channel.";function Bie(e){return`Lookups can only be performed on selection parameters. "${e}" is a variable parameter.`}function Uie(e){return`Cannot define and lookup the "${e}" selection in the same view. Try moving the lookup into a second, layered view?`}const jie="The same selection must be used to override scale domains in a layered view.",qie='Interval selections should be initialized using "x", "y", "longitude", or "latitude" keys.';function Wie(e){return`Unknown repeated value "${e}".`}function lk(e){return`The "columns" property cannot be used when "${e}" has nested row/column.`}const Hie="Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";function Gie(e){return`Unrecognized parse "${e}".`}function ck(e,t,n){return`An ancestor parsed field "${e}" as ${n} but a child wants to parse the field as ${t}.`}const Yie="Attempt to add the same child twice.";function Xie(e){return`Ignoring an invalid transform: ${Re(e)}.`}const Vie='If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';function fk(e){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`}function Kie(e){const{parentProjection:t,projection:n}=e;return`Layer's shared projection ${Re(t)} is overridden by a child projection ${Re(n)}.`}const Jie="Arc marks uses theta channel rather than angle, replacing angle with theta.";function Qie(e){return`${e}Offset dropped because ${e} is continuous`}function Zie(e,t,n){return`Channel ${e} is a ${t}. Converted to {value: ${Re(n)}}.`}function MR(e){return`Invalid field type "${e}".`}function ere(e,t){return`Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`}function tre(e){return`Invalid aggregation operator "${e}".`}function TR(e,t){const{fill:n,stroke:i}=t;return`Dropping color ${e} as the plot also has ${n&&i?"fill and stroke":n?"fill":"stroke"}.`}function nre(e){return`Position range does not support relative band size for ${e}.`}function Ev(e,t){return`Dropping ${Re(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`}const ire="Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";function wm(e,t,n){return`${e} dropped as it is incompatible with "${t}"${n?` when ${n}`:""}.`}function rre(e){return`${e}-encoding is dropped as ${e} is not a valid encoding channel.`}function ore(e){return`${e} encoding should be discrete (ordinal / nominal / binned).`}function sre(e){return`${e} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function are(e){return`Facet encoding dropped as ${e.join(" and ")} ${e.length>1?"are":"is"} also specified.`}function f1(e,t){return`Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${t==="ordinal"?"order":"magnitude"}.`}function ure(e){return`The ${e} for range marks cannot be an expression`}function lre(e,t){return`Line mark is for continuous lines and thus cannot be used with ${e&&t?"x2 and y2":e?"x2":"y2"}. We will use the rule mark (line segments) instead.`}function cre(e,t){return`Specified orient "${e}" overridden with "${t}".`}function fre(e){return`Cannot use the scale property "${e}" with non-color channel.`}function dre(e){return`Cannot use the relative band size with ${e} scale.`}function hre(e){return`Using unaggregated domain with raw field has no effect (${Re(e)}).`}function pre(e){return`Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`}function gre(e){return`Unaggregated domain is currently unsupported for log scale (${Re(e)}).`}function mre(e){return`Cannot apply size to non-oriented mark "${e}".`}function yre(e,t,n){return`Channel "${e}" does not work with "${t}" scale. We are using "${n}" scale instead.`}function vre(e,t){return`FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`}function DR(e,t,n){return`${n}-scale's "${t}" is dropped as it does not work with ${e} scale.`}function NR(e){return`The step for "${e}" is dropped because the ${e==="width"?"x":"y"} is continuous.`}function bre(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${Re(n)} and ${Re(i)}). Using ${Re(n)}.`}function xre(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${Re(n)} and ${Re(i)}). Using the union of the two domains.`}function wre(e){return`Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`}function Ere(e){return`Dropping sort property ${Re(e)} as unioned domains only support boolean or op "count", "min", and "max".`}const dk="Domains that should be unioned has conflicting sort properties. Sort will be set to true.",_re="Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.",Sre="Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.",$re="Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.";function Are(e){return`Cannot stack "${e}" if there is already "${e}2".`}function kre(e){return`Cannot stack non-linear scale (${e}).`}function Cre(e){return`Stacking is applied even though the aggregate function is non-summative ("${e}").`}function Op(e,t){return`Invalid ${e}: ${Re(t)}.`}function Fre(e){return`Dropping day from datetime ${Re(e)} as day cannot be combined with other units.`}function Mre(e,t){return`${t?"extent ":""}${t&&e?"and ":""}${e?"center ":""}${t&&e?"are ":"is "}not needed when data are aggregated.`}function Tre(e,t,n){return`${e} is not usually used with ${t} for ${n}.`}function Dre(e,t){return`Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`}function hk(e){return`1D error band does not support ${e}.`}function OR(e){return`Channel ${e} is required for "binned" bin.`}function Nre(e){return`Channel ${e} should not be used with "binned" bin.`}function Ore(e){return`Domain for ${e} is required for threshold scale.`}const RR=Yv(Gv);let ju=RR;function Rre(e){return ju=e,ju}function Lre(){return ju=RR,ju}function U(...e){ju.warn(...e)}function Pre(...e){ju.debug(...e)}function Na(e){if(e&&V(e)){for(const t of iE)if(t in e)return!0}return!1}const LR=["january","february","march","april","may","june","july","august","september","october","november","december"],Ire=LR.map(e=>e.substr(0,3)),PR=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],zre=PR.map(e=>e.substr(0,3));function Bre(e){if(dm(e)&&(e=+e),Ee(e))return e>4&&U(Op("quarter",e)),e-1;throw new Error(Op("quarter",e))}function Ure(e){if(dm(e)&&(e=+e),Ee(e))return e-1;{const t=e.toLowerCase(),n=LR.indexOf(t);if(n!==-1)return n;const i=t.substr(0,3),r=Ire.indexOf(i);if(r!==-1)return r;throw new Error(Op("month",e))}}function jre(e){if(dm(e)&&(e=+e),Ee(e))return e%7;{const t=e.toLowerCase(),n=PR.indexOf(t);if(n!==-1)return n;const i=t.substr(0,3),r=zre.indexOf(i);if(r!==-1)return r;throw new Error(Op("day",e))}}function nE(e,t){const n=[];if(t&&e.day!==void 0&&B(e).length>1&&(U(Fre(e)),e=ae(e),delete e.day),e.year!==void 0?n.push(e.year):n.push(2012),e.month!==void 0){const i=t?Ure(e.month):e.month;n.push(i)}else if(e.quarter!==void 0){const i=t?Bre(e.quarter):e.quarter;n.push(Ee(i)?i*3:`${i}*3`)}else n.push(0);if(e.date!==void 0)n.push(e.date);else if(e.day!==void 0){const i=t?jre(e.day):e.day;n.push(Ee(i)?i+1:`${i}+1`)}else n.push(1);for(const i of["hours","minutes","seconds","milliseconds"]){const r=e[i];n.push(typeof r>"u"?0:r)}return n}function ha(e){const n=nE(e,!0).join(", ");return e.utc?`utc(${n})`:`datetime(${n})`}function qre(e){const n=nE(e,!1).join(", ");return e.utc?`utc(${n})`:`datetime(${n})`}function Wre(e){const t=nE(e,!0);return e.utc?+new Date(Date.UTC(...t)):+new Date(...t)}const IR={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},iE=B(IR);function Hre(e){return!!IR[e]}function Oa(e){return V(e)?e.binned:zR(e)}function zR(e){return e&&e.startsWith("binned")}function rE(e){return e.startsWith("utc")}function Gre(e){return e.substring(3)}const Yre={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function Em(e){return iE.filter(t=>UR(e,t))}function BR(e){const t=Em(e);return t[t.length-1]}function UR(e,t){const n=e.indexOf(t);return!(n<0||n>0&&t==="seconds"&&e.charAt(n-1)==="i"||e.length>n+3&&t==="day"&&e.charAt(n+3)==="o"||n>0&&t==="year"&&e.charAt(n-1)==="f")}function Xre(e,t,{end:n}={end:!1}){const i=Ww(t),r=rE(e)?"utc":"";function o(u){return u==="quarter"?`(${r}quarter(${i})-1)`:`${r}${u}(${i})`}let s;const a={};for(const u of iE)UR(e,u)&&(a[u]=o(u),s=u);return n&&(a[s]+="+1"),qre(a)}function jR(e){if(!e)return;const t=Em(e);return`timeUnitSpecifier(${Re(t)}, ${Re(Yre)})`}function Vre(e,t,n){if(!e)return;const i=jR(e);return`${n||rE(e)?"utc":"time"}Format(${t}, ${i})`}function vt(e){if(!e)return;let t;return X(e)?zR(e)?t={unit:e.substring(6),binned:!0}:t={unit:e}:V(e)&&(t={...e,...e.unit?{unit:e.unit}:{}}),rE(t.unit)&&(t.utc=!0,t.unit=Gre(t.unit)),t}function Kre(e){const{utc:t,...n}=vt(e);return n.unit?(t?"utc":"")+B(n).map(i=>We(`${i==="unit"?"":`_${i}_`}${n[i]}`)).join(""):(t?"utc":"")+"timeunit"+B(n).map(i=>We(`_${i}_${n[i]}`)).join("")}function qR(e,t=n=>n){const n=vt(e),i=BR(n.unit);if(i&&i!=="day"){const r={year:2001,month:1,date:1,hours:0,minutes:0,seconds:0,milliseconds:0},{step:o,part:s}=WR(i,n.step),a={...r,[s]:+r[s]+o};return`${t(ha(a))} - ${t(ha(r))}`}}const Jre={year:1,month:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1};function Qre(e){return!!Jre[e]}function WR(e,t=1){if(Qre(e))return{part:e,step:t};switch(e){case"day":case"dayofyear":return{part:"date",step:t};case"quarter":return{part:"month",step:t*3};case"week":return{part:"date",step:t*7}}}function Zre(e){return e==null?void 0:e.param}function oE(e){return!!(e!=null&&e.field)&&e.equal!==void 0}function sE(e){return!!(e!=null&&e.field)&&e.lt!==void 0}function aE(e){return!!(e!=null&&e.field)&&e.lte!==void 0}function uE(e){return!!(e!=null&&e.field)&&e.gt!==void 0}function lE(e){return!!(e!=null&&e.field)&&e.gte!==void 0}function cE(e){if(e!=null&&e.field){if(P(e.range)&&e.range.length===2)return!0;if(Q(e.range))return!0}return!1}function fE(e){return!!(e!=null&&e.field)&&(P(e.oneOf)||P(e.in))}function eoe(e){return!!(e!=null&&e.field)&&e.valid!==void 0}function HR(e){return fE(e)||oE(e)||cE(e)||sE(e)||uE(e)||aE(e)||lE(e)}function Ui(e,t){return Dm(e,{timeUnit:t,wrapTime:!0})}function toe(e,t){return e.map(n=>Ui(n,t))}function GR(e,t=!0){const{field:n}=e,i=vt(e.timeUnit),{unit:r,binned:o}=i||{},s=G(e,{expr:"datum"}),a=r?`time(${o?s:Xre(r,n)})`:s;if(oE(e))return`${a}===${Ui(e.equal,r)}`;if(sE(e)){const u=e.lt;return`${a}<${Ui(u,r)}`}else if(uE(e)){const u=e.gt;return`${a}>${Ui(u,r)}`}else if(aE(e)){const u=e.lte;return`${a}<=${Ui(u,r)}`}else if(lE(e)){const u=e.gte;return`${a}>=${Ui(u,r)}`}else{if(fE(e))return`indexof([${toe(e.oneOf,r).join(",")}], ${a}) !== -1`;if(eoe(e))return dE(a,e.valid);if(cE(e)){const{range:u}=e,l=Q(u)?{signal:`${u.signal}[0]`}:u[0],c=Q(u)?{signal:`${u.signal}[1]`}:u[1];if(l!==null&&c!==null&&t)return"inrange("+a+", ["+Ui(l,r)+", "+Ui(c,r)+"])";const f=[];return l!==null&&f.push(`${a} >= ${Ui(l,r)}`),c!==null&&f.push(`${a} <= ${Ui(c,r)}`),f.length>0?f.join(" && "):"true"}}throw new Error(`Invalid field predicate: ${Re(e)}`)}function dE(e,t=!0){return t?`isValid(${e}) && isFinite(+${e})`:`!isValid(${e}) || !isFinite(+${e})`}function noe(e){return HR(e)&&e.timeUnit?{...e,timeUnit:vt(e.timeUnit)}:e}const Kf={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function ioe(e){return e==="quantitative"||e==="temporal"}function YR(e){return e==="ordinal"||e==="nominal"}const pa=Kf.quantitative,hE=Kf.ordinal,qu=Kf.temporal,pE=Kf.nominal,yl=Kf.geojson;function roe(e){if(e)switch(e=e.toLowerCase(),e){case"q":case pa:return"quantitative";case"t":case qu:return"temporal";case"o":case hE:return"ordinal";case"n":case pE:return"nominal";case yl:return"geojson"}}const vn={LINEAR:"linear",LOG:"log",POW:"pow",SQRT:"sqrt",SYMLOG:"symlog",IDENTITY:"identity",SEQUENTIAL:"sequential",TIME:"time",UTC:"utc",QUANTILE:"quantile",QUANTIZE:"quantize",THRESHOLD:"threshold",BIN_ORDINAL:"bin-ordinal",ORDINAL:"ordinal",POINT:"point",BAND:"band"},_v={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"};function ooe(e,t){const n=_v[e],i=_v[t];return n===i||n==="ordinal-position"&&i==="time"||i==="ordinal-position"&&n==="time"}const soe={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function pk(e){return soe[e]}const XR=new Set(["linear","log","pow","sqrt","symlog"]),VR=new Set([...XR,"time","utc"]);function KR(e){return XR.has(e)}const JR=new Set(["quantile","quantize","threshold"]),aoe=new Set([...VR,...JR,"sequential","identity"]),uoe=new Set(["ordinal","bin-ordinal","point","band"]);function bt(e){return uoe.has(e)}function Un(e){return aoe.has(e)}function Ei(e){return VR.has(e)}function Wu(e){return JR.has(e)}const loe={pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4,zero:!0};function coe(e){return!X(e)&&!!e.name}function QR(e){return e==null?void 0:e.param}function foe(e){return e==null?void 0:e.unionWith}function doe(e){return V(e)&&"field"in e}const hoe={type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,domainRaw:1,align:1,range:1,rangeMax:1,rangeMin:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},{type:Tpe,domain:Dpe,range:Npe,rangeMax:Ope,rangeMin:Rpe,scheme:Lpe,...poe}=hoe,goe=B(poe);function Sv(e,t){switch(t){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(e);case"bins":return!["point","band","identity","ordinal"].includes(e);case"round":return Ei(e)||e==="band"||e==="point";case"padding":case"rangeMin":case"rangeMax":return Ei(e)||["point","band"].includes(e);case"paddingOuter":case"align":return["point","band"].includes(e);case"paddingInner":return e==="band";case"domainMax":case"domainMid":case"domainMin":case"domainRaw":case"clamp":return Ei(e);case"nice":return Ei(e)||e==="quantize"||e==="threshold";case"exponent":return e==="pow";case"base":return e==="log";case"constant":return e==="symlog";case"zero":return Un(e)&&!ve(["log","time","utc","threshold","quantile"],e)}}function ZR(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return pu(e)?void 0:fre(t);case"align":case"type":case"bins":case"domain":case"domainMax":case"domainMin":case"domainRaw":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"rangeMax":case"rangeMin":case"reverse":case"round":case"clamp":case"zero":return}}function moe(e,t){return ve([hE,pE],t)?e===void 0||bt(e):t===qu?ve([vn.TIME,vn.UTC,void 0],e):t===pa?KR(e)||Wu(e)||e===void 0:!0}function yoe(e,t,n=!1){if(!so(e))return!1;switch(e){case He:case wt:case as:case ml:case ai:case Ri:return Ei(t)||t==="band"?!0:t==="point"?!n:!1;case ro:case cs:case oo:case us:case ls:case Ma:return Ei(t)||Wu(t)||ve(["band","point","ordinal"],t);case En:case br:case xr:return t!=="band";case fs:case _n:return t==="ordinal"||Wu(t)}}const cn={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"},e6=cn.arc,_m=cn.area,Sm=cn.bar,voe=cn.image,$m=cn.line,Am=cn.point,boe=cn.rect,Rp=cn.rule,t6=cn.text,gE=cn.tick,xoe=cn.trail,mE=cn.circle,yE=cn.square,n6=cn.geoshape;function ps(e){return["line","area","trail"].includes(e)}function cf(e){return["rect","bar","image","arc"].includes(e)}const woe=new Set(B(cn));function lr(e){return e.type}const Eoe=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit"],_oe=["fill","fillOpacity"],Soe=[...Eoe,..._oe],$oe={color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1},gk=B($oe),Aoe={area:["line","point"],bar:["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],rect:["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],line:["point"],tick:["bandSize","thickness"]},koe={color:"#4c78a8",invalid:"filter",timeUnitBandSize:1},Coe={mark:1,arc:1,area:1,bar:1,circle:1,image:1,line:1,point:1,rect:1,rule:1,square:1,text:1,tick:1,trail:1,geoshape:1},i6=B(Coe);function ga(e){return e&&e.band!=null}const Foe={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},r6=5,Moe={binSpacing:1,continuousBandSize:r6,minBandSize:.25,timeUnitBandPosition:.5},Toe={binSpacing:0,continuousBandSize:r6,minBandSize:.25,timeUnitBandPosition:.5},Doe={thickness:1};function Noe(e){return lr(e)?e.type:e}function vE(e){const{channel:t,channelDef:n,markDef:i,scale:r,config:o}=e,s=xE(e);return j(n)&&!bR(n.aggregate)&&r&&Ei(r.get("type"))?Ooe({fieldDef:n,channel:t,markDef:i,ref:s,config:o}):s}function Ooe({fieldDef:e,channel:t,markDef:n,ref:i,config:r}){return ps(n.type)?i:Fe("invalid",n,r)===null?[Roe(e,t),i]:i}function Roe(e,t){const n=bE(e,!0),r=Ta(t)==="y"?{field:{group:"height"}}:{value:0};return{test:n,...r}}function bE(e,t=!0){return dE(X(e)?e:G(e,{expr:"datum"}),!t)}function Loe(e){const{datum:t}=e;return Na(t)?ha(t):`${Re(t)}`}function Xs(e,t,n,i){const r={};if(t&&(r.scale=t),_r(e)){const{datum:o}=e;Na(o)?r.signal=ha(o):Q(o)?r.signal=o.signal:Vf(o)?r.signal=o.expr:r.value=o}else r.field=G(e,n);if(i){const{offset:o,band:s}=i;o&&(r.offset=o),s&&(r.band=s)}return r}function Lp({scaleName:e,fieldOrDatumDef:t,fieldOrDatumDef2:n,offset:i,startSuffix:r,endSuffix:o="end",bandPosition:s=.5}){const a=!Q(s)&&0{switch(t.fieldTitle){case"plain":return e.field;case"functional":return Koe(e);default:return Voe(e,t)}};let v6=y6;function b6(e){v6=e}function Joe(){b6(y6)}function gu(e,t,{allowDisabling:n,includeDefault:i=!0}){var a;const r=(a=SE(e))==null?void 0:a.title;if(!j(e))return r??e.title;const o=e,s=i?$E(o,t):void 0;return n?Ze(r,o.title,s):r??o.title??s}function SE(e){if(Gu(e)&&e.axis)return e.axis;if(g6(e)&&e.legend)return e.legend;if(EE(e)&&e.header)return e.header}function $E(e,t){return v6(e,t)}function zp(e){if(m6(e)){const{format:t,formatType:n}=e;return{format:t,formatType:n}}else{const t=SE(e)??{},{format:n,formatType:i}=t;return{format:n,formatType:i}}}function Qoe(e,t){var o;switch(t){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(_E(e)&&P(e.sort))return"ordinal";const{aggregate:n,bin:i,timeUnit:r}=e;if(r)return"temporal";if(i||n&&!ds(n)&&!Qr(n))return"quantitative";if(Ra(e)&&((o=e.scale)!=null&&o.type))switch(_v[e.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}function cr(e){if(j(e))return e;if(Mm(e))return e.condition}function st(e){if(ue(e))return e;if(Zf(e))return e.condition}function x6(e,t,n,i={}){if(X(e)||Ee(e)||es(e)){const r=X(e)?"string":Ee(e)?"number":"boolean";return U(Zie(t,r,e)),{value:e}}return ue(e)?Bp(e,t,n,i):Zf(e)?{...e,condition:Bp(e.condition,t,n,i)}:e}function Bp(e,t,n,i){if(m6(e)){const{format:r,formatType:o,...s}=e;if(ma(o)&&!n.customFormatTypes)return U(fk(t)),Bp(s,t,n,i)}else{const r=Gu(e)?"axis":g6(e)?"legend":EE(e)?"header":null;if(r&&e[r]){const{format:o,formatType:s,...a}=e[r];if(ma(s)&&!n.customFormatTypes)return U(fk(t)),Bp({...e,[r]:a},t,n,i)}}return j(e)?AE(e,t,i):Zoe(e)}function Zoe(e){let t=e.type;if(t)return e;const{datum:n}=e;return t=Ee(n)?"quantitative":X(n)?"nominal":Na(n)?"temporal":void 0,{...e,type:t}}function AE(e,t,{compositeMark:n=!1}={}){const{aggregate:i,timeUnit:r,bin:o,field:s}=e,a={...e};if(!n&&i&&!Zw(i)&&!ds(i)&&!Qr(i)&&(U(tre(i)),delete a.aggregate),r&&(a.timeUnit=vt(r)),s&&(a.field=`${s}`),Be(o)&&(a.bin=Tm(o,t)),_t(o)&&!et(t)&&U(Nre(t)),un(a)){const{type:u}=a,l=roe(u);u!==l&&(a.type=l),u!=="quantitative"&&bR(i)&&(U(ere(u,i)),a.type="quantitative")}else if(!hR(t)){const u=Qoe(a,t);a.type=u}if(un(a)){const{compatible:u,warning:l}=ese(a,t)||{};u===!1&&U(l)}if(_E(a)&&X(a.sort)){const{sort:u}=a;if(yk(u))return{...a,sort:{encoding:u}};const l=u.substr(1);if(u.charAt(0)==="-"&&yk(l))return{...a,sort:{encoding:l,order:"descending"}}}if(EE(a)){const{header:u}=a;if(u){const{orient:l,...c}=u;if(l)return{...a,header:{...c,labelOrient:u.labelOrient||l,titleOrient:u.titleOrient||l}}}}return a}function Tm(e,t){return es(e)?{maxbins:nk(t)}:e==="binned"?{binned:!0}:!e.maxbins&&!e.step?{...e,maxbins:nk(t)}:e}const Xa={compatible:!0};function ese(e,t){const n=e.type;if(n==="geojson"&&t!=="shape")return{compatible:!1,warning:`Channel ${t} should not be used with a geojson data.`};switch(t){case Hr:case Gr:case hm:return Ip(e)?Xa:{compatible:!1,warning:ore(t)};case He:case wt:case as:case ml:case En:case br:case xr:case Gf:case Yf:case pm:case da:case gm:case mm:case Ma:case ai:case Ri:case ym:return Xa;case Pi:case oi:case Li:case Ii:return n!==pa?{compatible:!1,warning:`Channel ${t} should be used with a quantitative field only, not ${e.type} field.`}:Xa;case oo:case us:case ls:case cs:case ro:case io:case no:case Oi:case vr:return n==="nominal"&&!e.sort?{compatible:!1,warning:`Channel ${t} should not be used with an unsorted discrete field.`}:Xa;case _n:case fs:return!Ip(e)&&!Yoe(e)?{compatible:!1,warning:sre(t)}:Xa;case Uu:return e.type==="nominal"&&!("sort"in e)?{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}:Xa}}function Yu(e){const{formatType:t}=zp(e);return t==="time"||!t&&tse(e)}function tse(e){return e&&(e.type==="temporal"||j(e)&&!!e.timeUnit)}function Dm(e,{timeUnit:t,type:n,wrapTime:i,undefinedIfExprNotRequired:r}){var u;const o=t&&((u=vt(t))==null?void 0:u.unit);let s=o||n==="temporal",a;return Vf(e)?a=e.expr:Q(e)?a=e.signal:Na(e)?(s=!0,a=ha(e)):(X(e)||Ee(e))&&s&&(a=`datetime(${Re(e)})`,Hre(o)&&(Ee(e)&&e<1e4||X(e)&&isNaN(Date.parse(e)))&&(a=ha({[o]:e}))),a?i&&s?`time(${a})`:a:r?void 0:Re(e)}function w6(e,t){const{type:n}=e;return t.map(i=>{const r=j(e)&&!Oa(e.timeUnit)?e.timeUnit:void 0,o=Dm(i,{timeUnit:r,type:n,undefinedIfExprNotRequired:!0});return o!==void 0?{signal:o}:i})}function ed(e,t){return Be(e.bin)?so(t)&&["ordinal","nominal"].includes(e.type):(console.warn("Only call this method for binned field defs."),!1)}const xk={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function td(e){return e==null?void 0:e.condition}const E6=["domain","grid","labels","ticks","title"],nse={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},_6={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},ise={..._6,style:1,labelExpr:1,encoding:1};function wk(e){return!!ise[e]}const rse={axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1},S6=B(rse);function ao(e){return"mark"in e}class Nm{constructor(t,n){this.name=t,this.run=n}hasMatchingType(t){return ao(t)?Noe(t.mark)===this.name:!1}}function Vs(e,t){const n=e&&e[t];return n?P(n)?ca(n,i=>!!i.field):j(n)||Mm(n):!1}function $6(e,t){const n=e&&e[t];return n?P(n)?ca(n,i=>!!i.field):j(n)||_r(n)||Zf(n):!1}function A6(e,t){if(et(t)){const n=e[t];if((j(n)||_r(n))&&(YR(n.type)||j(n)&&n.timeUnit)){const i=Vw(t);return $6(e,i)}}return!1}function kE(e){return ca(oie,t=>{if(Vs(e,t)){const n=e[t];if(P(n))return ca(n,i=>!!i.aggregate);{const i=cr(n);return i&&!!i.aggregate}}return!1})}function k6(e,t){const n=[],i=[],r=[],o=[],s={};return CE(e,(a,u)=>{if(j(a)){const{field:l,aggregate:c,bin:f,timeUnit:d,...h}=a;if(c||d||f){const p=SE(a),g=p==null?void 0:p.title;let m=G(a,{forAs:!0});const y={...g?[]:{title:gu(a,t,{allowDisabling:!0})},...h,field:m};if(c){let v;if(ds(c)?(v="argmax",m=G({op:"argmax",field:c.argmax},{forAs:!0}),y.field=`${m}.${l}`):Qr(c)?(v="argmin",m=G({op:"argmin",field:c.argmin},{forAs:!0}),y.field=`${m}.${l}`):c!=="boxplot"&&c!=="errorbar"&&c!=="errorband"&&(v=c),v){const b={op:v,as:m};l&&(b.field=l),o.push(b)}}else if(n.push(m),un(a)&&Be(f)){if(i.push({bin:f,field:l,as:m}),n.push(G(a,{binSuffix:"end"})),ed(a,u)&&n.push(G(a,{binSuffix:"range"})),et(u)){const v={field:`${m}_end`};s[`${u}2`]=v}y.bin="binned",hR(u)||(y.type=pa)}else if(d&&!Oa(d)){r.push({timeUnit:d,field:l,as:m});const v=un(a)&&a.type!==qu&&"time";v&&(u===Gf||u===da?y.formatType=v:gie(u)?y.legend={formatType:v,...y.legend}:et(u)&&(y.axis={formatType:v,...y.axis}))}s[u]=y}else n.push(l),s[u]=e[u]}else s[u]=e[u]}),{bins:i,timeUnits:r,aggregate:o,groupby:n,encoding:s}}function ose(e,t,n){const i=yie(t,n);if(i){if(i==="binned"){const r=e[t===Oi?He:wt];return!!(j(r)&&j(e[t])&&_t(r.bin))}}else return!1;return!0}function sse(e,t,n,i){const r={};for(const o of B(e))dR(o)||U(rre(o));for(let o of fie){if(!e[o])continue;const s=e[o];if(Xf(o)){const a=cie(o),u=r[a];if(j(u)&&ioe(u.type)&&j(s)&&!u.timeUnit){U(Qie(a));continue}}if(o==="angle"&&t==="arc"&&!e.theta&&(U(Jie),o=ai),!ose(e,o,t)){U(wm(o,t));continue}if(o===ro&&t==="line"){const a=cr(e[o]);if(a!=null&&a.aggregate){U(ire);continue}}if(o===En&&(n?"fill"in e:"stroke"in e)){U(TR("encoding",{fill:"fill"in e,stroke:"stroke"in e}));continue}if(o===Yf||o===Uu&&!P(s)&&!Fi(s)||o===da&&P(s)){if(s){if(o===Uu){const a=e[o];if(p6(a)){r[o]=a;continue}}r[o]=Y(s).reduce((a,u)=>(j(u)?a.push(AE(u,o)):U(Ev(u,o)),a),[])}}else{if(o===da&&s===null)r[o]=null;else if(!j(s)&&!_r(s)&&!Fi(s)&&!Fm(s)&&!Q(s)){U(Ev(s,o));continue}r[o]=x6(s,o,i)}}return r}function Om(e,t){const n={};for(const i of B(e)){const r=x6(e[i],i,t,{compositeMark:!0});n[i]=r}return n}function ase(e){const t=[];for(const n of B(e))if(Vs(e,n)){const i=e[n],r=Y(i);for(const o of r)j(o)?t.push(o):Mm(o)&&t.push(o.condition)}return t}function CE(e,t,n){if(e)for(const i of B(e)){const r=e[i];if(P(r))for(const o of r)t.call(n,o,i);else t.call(n,r,i)}}function use(e,t,n,i){return e?B(e).reduce((r,o)=>{const s=e[o];return P(s)?s.reduce((a,u)=>t.call(i,a,u,o),r):t.call(i,r,s,o)},n):n}function C6(e,t){return B(t).reduce((n,i)=>{switch(i){case He:case wt:case gm:case ym:case mm:case Oi:case vr:case as:case ml:case ai:case io:case Ri:case no:case Li:case Pi:case Ii:case oi:case Gf:case _n:case Ma:case da:return n;case Uu:if(e==="line"||e==="trail")return n;case Yf:case pm:{const r=t[i];if(P(r)||j(r))for(const o of Y(r))o.aggregate||n.push(G(o,{}));return n}case ro:if(e==="trail")return n;case En:case br:case xr:case oo:case us:case ls:case fs:case cs:{const r=cr(t[i]);return r&&!r.aggregate&&n.push(G(r,{})),n}}},[])}function lse(e){const{tooltip:t,...n}=e;if(!t)return{filteredEncoding:n};let i,r;if(P(t)){for(const o of t)o.aggregate?(i||(i=[]),i.push(o)):(r||(r=[]),r.push(o));i&&(n.tooltip=i)}else t.aggregate?n.tooltip=t:r=t;return P(r)&&r.length===1&&(r=r[0]),{customTooltipWithoutAggregatedField:r,filteredEncoding:n}}function Av(e,t,n,i=!0){if("tooltip"in n)return{tooltip:n.tooltip};const r=e.map(({fieldPrefix:s,titlePrefix:a})=>{const u=i?` of ${FE(t)}`:"";return{field:s+t.field,type:t.type,title:Q(a)?{signal:`${a}"${escape(u)}"`}:a+u}}),o=ase(n).map(Hoe);return{tooltip:[...r,...Ki(o,ye)]}}function FE(e){const{title:t,field:n}=e;return Ze(t,n)}function ME(e,t,n,i,r){const{scale:o,axis:s}=n;return({partName:a,mark:u,positionPrefix:l,endPositionPrefix:c=void 0,extraEncoding:f={}})=>{const d=FE(n);return F6(e,a,r,{mark:u,encoding:{[t]:{field:`${l}_${n.field}`,type:n.type,...d!==void 0?{title:d}:{},...o!==void 0?{scale:o}:{},...s!==void 0?{axis:s}:{}},...X(c)?{[`${t}2`]:{field:`${c}_${n.field}`}}:{},...i,...f}})}}function F6(e,t,n,i){const{clip:r,color:o,opacity:s}=e,a=e.type;return e[t]||e[t]===void 0&&n[t]?[{...i,mark:{...n[t],...r?{clip:r}:{},...o?{color:o}:{},...s?{opacity:s}:{},...lr(i.mark)?i.mark:{type:i.mark},style:`${a}-${String(t)}`,...es(e[t])?{}:e[t]}}]:[]}function M6(e,t,n){const{encoding:i}=e,r=t==="vertical"?"y":"x",o=i[r],s=i[`${r}2`],a=i[`${r}Error`],u=i[`${r}Error2`];return{continuousAxisChannelDef:Od(o,n),continuousAxisChannelDef2:Od(s,n),continuousAxisChannelDefError:Od(a,n),continuousAxisChannelDefError2:Od(u,n),continuousAxis:r}}function Od(e,t){if(e!=null&&e.aggregate){const{aggregate:n,...i}=e;return n!==t&&U(Dre(n,t)),i}else return e}function T6(e,t){const{mark:n,encoding:i}=e,{x:r,y:o}=i;if(lr(n)&&n.orient)return n.orient;if(Co(r)){if(Co(o)){const s=j(r)&&r.aggregate,a=j(o)&&o.aggregate;if(!s&&a===t)return"vertical";if(!a&&s===t)return"horizontal";if(s===t&&a===t)throw new Error("Both x and y cannot have aggregate");return Yu(o)&&!Yu(r)?"horizontal":"vertical"}return"horizontal"}else{if(Co(o))return"vertical";throw new Error(`Need a valid continuous axis for ${t}s`)}}const Up="boxplot",cse=["box","median","outliers","rule","ticks"],fse=new Nm(Up,N6);function D6(e){return Ee(e)?"tukey":e}function N6(e,{config:t}){e={...e,encoding:Om(e.encoding,t)};const{mark:n,encoding:i,params:r,projection:o,...s}=e,a=lr(n)?n:{type:n};r&&U(FR("boxplot"));const u=a.extent??t.boxplot.extent,l=Fe("size",a,t),c=a.invalid,f=D6(u),{bins:d,timeUnits:h,transform:p,continuousAxisChannelDef:g,continuousAxis:m,groupby:y,aggregate:v,encodingWithoutContinuousAxis:b,ticksOrient:x,boxOrient:w,customTooltipWithoutAggregatedField:_}=dse(e,u,t),{color:E,size:S,...$}=b,F=Gt=>ME(a,m,g,Gt,t.boxplot),k=F($),N=F(b),A=F({...$,...S?{size:S}:{}}),M=Av([{fieldPrefix:f==="min-max"?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:f==="min-max"?"lower_whisker_":"min_",titlePrefix:"Min"}],g,b),C={type:"tick",color:"black",opacity:1,orient:x,invalid:c,aria:!1},T=f==="min-max"?M:Av([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],g,b),L=[...k({partName:"rule",mark:{type:"rule",invalid:c,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:T}),...k({partName:"rule",mark:{type:"rule",invalid:c,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:T}),...k({partName:"ticks",mark:C,positionPrefix:"lower_whisker",extraEncoding:T}),...k({partName:"ticks",mark:C,positionPrefix:"upper_whisker",extraEncoding:T})],I=[...f!=="tukey"?L:[],...N({partName:"box",mark:{type:"bar",...l?{size:l}:{},orient:w,invalid:c,ariaRoleDescription:"box"},positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:M}),...A({partName:"median",mark:{type:"tick",invalid:c,...V(t.boxplot.median)&&t.boxplot.median.color?{color:t.boxplot.median.color}:{},...l?{size:l}:{},orient:x,aria:!1},positionPrefix:"mid_box",extraEncoding:M})];if(f==="min-max")return{...s,transform:(s.transform??[]).concat(p),layer:I};const z=`datum["lower_box_${g.field}"]`,Z=`datum["upper_box_${g.field}"]`,ee=`(${Z} - ${z})`,fe=`${z} - ${u} * ${ee}`,_e=`${Z} + ${u} * ${ee}`,me=`datum["${g.field}"]`,Ie={joinaggregate:O6(g.field),groupby:y},Sr={transform:[{filter:`(${fe} <= ${me}) && (${me} <= ${_e})`},{aggregate:[{op:"min",field:g.field,as:`lower_whisker_${g.field}`},{op:"max",field:g.field,as:`upper_whisker_${g.field}`},{op:"min",field:`lower_box_${g.field}`,as:`lower_box_${g.field}`},{op:"max",field:`upper_box_${g.field}`,as:`upper_box_${g.field}`},...v],groupby:y}],layer:L},{tooltip:Ia,...gs}=$,{scale:K,axis:de}=g,pe=FE(g),q=yn(de,["title"]),Et=F6(a,"outliers",t.boxplot,{transform:[{filter:`(${me} < ${fe}) || (${me} > ${_e})`}],mark:"point",encoding:{[m]:{field:g.field,type:g.type,...pe!==void 0?{title:pe}:{},...K!==void 0?{scale:K}:{},...Oe(q)?{}:{axis:q}},...gs,...E?{color:E}:{},..._?{tooltip:_}:{}}})[0];let Ce;const Mt=[...d,...h,Ie];return Et?Ce={transform:Mt,layer:[Et,Sr]}:(Ce=Sr,Ce.transform.unshift(...Mt)),{...s,layer:[Ce,{transform:p,layer:I}]}}function O6(e){return[{op:"q1",field:e,as:`lower_box_${e}`},{op:"q3",field:e,as:`upper_box_${e}`}]}function dse(e,t,n){const i=T6(e,Up),{continuousAxisChannelDef:r,continuousAxis:o}=M6(e,i,Up),s=r.field,a=D6(t),u=[...O6(s),{op:"median",field:s,as:`mid_box_${s}`},{op:"min",field:s,as:(a==="min-max"?"lower_whisker_":"min_")+s},{op:"max",field:s,as:(a==="min-max"?"upper_whisker_":"max_")+s}],l=a==="min-max"||a==="tukey"?[]:[{calculate:`datum["upper_box_${s}"] - datum["lower_box_${s}"]`,as:`iqr_${s}`},{calculate:`min(datum["upper_box_${s}"] + datum["iqr_${s}"] * ${t}, datum["max_${s}"])`,as:`upper_whisker_${s}`},{calculate:`max(datum["lower_box_${s}"] - datum["iqr_${s}"] * ${t}, datum["min_${s}"])`,as:`lower_whisker_${s}`}],{[o]:c,...f}=e.encoding,{customTooltipWithoutAggregatedField:d,filteredEncoding:h}=lse(f),{bins:p,timeUnits:g,aggregate:m,groupby:y,encoding:v}=k6(h,n),b=i==="vertical"?"horizontal":"vertical",x=i,w=[...p,...g,{aggregate:[...m,...u],groupby:y},...l];return{bins:p,timeUnits:g,transform:w,groupby:y,aggregate:m,continuousAxisChannelDef:r,continuousAxis:o,encodingWithoutContinuousAxis:v,ticksOrient:b,boxOrient:x,customTooltipWithoutAggregatedField:d}}const TE="errorbar",hse=["ticks","rule"],pse=new Nm(TE,R6);function R6(e,{config:t}){e={...e,encoding:Om(e.encoding,t)};const{transform:n,continuousAxisChannelDef:i,continuousAxis:r,encodingWithoutContinuousAxis:o,ticksOrient:s,markDef:a,outerSpec:u,tooltipEncoding:l}=L6(e,TE,t);delete o.size;const c=ME(a,r,i,o,t.errorbar),f=a.thickness,d=a.size,h={type:"tick",orient:s,aria:!1,...f!==void 0?{thickness:f}:{},...d!==void 0?{size:d}:{}},p=[...c({partName:"ticks",mark:h,positionPrefix:"lower",extraEncoding:l}),...c({partName:"ticks",mark:h,positionPrefix:"upper",extraEncoding:l}),...c({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar",...f!==void 0?{size:f}:{}},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:l})];return{...u,transform:n,...p.length>1?{layer:p}:{...p[0]}}}function gse(e,t){const{encoding:n}=e;if(mse(n))return{orient:T6(e,t),inputType:"raw"};const i=yse(n),r=vse(n),o=n.x,s=n.y;if(i){if(r)throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);const a=n.x2,u=n.y2;if(ue(a)&&ue(u))throw new Error(`${t} cannot have both x2 and y2`);if(ue(a)){if(Co(o))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${t}`)}else if(ue(u)){if(Co(s))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${t}`)}throw new Error("No ranged axis")}else{const a=n.xError,u=n.xError2,l=n.yError,c=n.yError2;if(ue(u)&&!ue(a))throw new Error(`${t} cannot have xError2 without xError`);if(ue(c)&&!ue(l))throw new Error(`${t} cannot have yError2 without yError`);if(ue(a)&&ue(l))throw new Error(`${t} cannot have both xError and yError with both are quantiative`);if(ue(a)){if(Co(o))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}else if(ue(l)){if(Co(s))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}function mse(e){return(ue(e.x)||ue(e.y))&&!ue(e.x2)&&!ue(e.y2)&&!ue(e.xError)&&!ue(e.xError2)&&!ue(e.yError)&&!ue(e.yError2)}function yse(e){return ue(e.x2)||ue(e.y2)}function vse(e){return ue(e.xError)||ue(e.xError2)||ue(e.yError)||ue(e.yError2)}function L6(e,t,n){const{mark:i,encoding:r,params:o,projection:s,...a}=e,u=lr(i)?i:{type:i};o&&U(FR(t));const{orient:l,inputType:c}=gse(e,t),{continuousAxisChannelDef:f,continuousAxisChannelDef2:d,continuousAxisChannelDefError:h,continuousAxisChannelDefError2:p,continuousAxis:g}=M6(e,l,t),{errorBarSpecificAggregate:m,postAggregateCalculates:y,tooltipSummary:v,tooltipTitleWithFieldName:b}=bse(u,f,d,h,p,c,t,n),{[g]:x,[g==="x"?"x2":"y2"]:w,[g==="x"?"xError":"yError"]:_,[g==="x"?"xError2":"yError2"]:E,...S}=r,{bins:$,timeUnits:F,aggregate:k,groupby:N,encoding:A}=k6(S,n),M=[...k,...m],C=c!=="raw"?[]:N,T=Av(v,f,A,b);return{transform:[...a.transform??[],...$,...F,...M.length===0?[]:[{aggregate:M,groupby:C}],...y],groupby:C,continuousAxisChannelDef:f,continuousAxis:g,encodingWithoutContinuousAxis:A,ticksOrient:l==="vertical"?"horizontal":"vertical",markDef:u,outerSpec:a,tooltipEncoding:T}}function bse(e,t,n,i,r,o,s,a){let u=[],l=[];const c=t.field;let f,d=!1;if(o==="raw"){const h=e.center?e.center:e.extent?e.extent==="iqr"?"median":"mean":a.errorbar.center,p=e.extent?e.extent:h==="mean"?"stderr":"iqr";if(h==="median"!=(p==="iqr")&&U(Tre(h,p,s)),p==="stderr"||p==="stdev")u=[{op:p,field:c,as:`extent_${c}`},{op:h,field:c,as:`center_${c}`}],l=[{calculate:`datum["center_${c}"] + datum["extent_${c}"]`,as:`upper_${c}`},{calculate:`datum["center_${c}"] - datum["extent_${c}"]`,as:`lower_${c}`}],f=[{fieldPrefix:"center_",titlePrefix:Hf(h)},{fieldPrefix:"upper_",titlePrefix:Ek(h,p,"+")},{fieldPrefix:"lower_",titlePrefix:Ek(h,p,"-")}],d=!0;else{let g,m,y;p==="ci"?(g="mean",m="ci0",y="ci1"):(g="median",m="q1",y="q3"),u=[{op:m,field:c,as:`lower_${c}`},{op:y,field:c,as:`upper_${c}`},{op:g,field:c,as:`center_${c}`}],f=[{fieldPrefix:"upper_",titlePrefix:gu({field:c,aggregate:y,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:gu({field:c,aggregate:m,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:gu({field:c,aggregate:g,type:"quantitative"},a,{allowDisabling:!1})}]}}else{(e.center||e.extent)&&U(Mre(e.center,e.extent)),o==="aggregated-upper-lower"?(f=[],l=[{calculate:`datum["${n.field}"]`,as:`upper_${c}`},{calculate:`datum["${c}"]`,as:`lower_${c}`}]):o==="aggregated-error"&&(f=[{fieldPrefix:"",titlePrefix:c}],l=[{calculate:`datum["${c}"] + datum["${i.field}"]`,as:`upper_${c}`}],r?l.push({calculate:`datum["${c}"] + datum["${r.field}"]`,as:`lower_${c}`}):l.push({calculate:`datum["${c}"] - datum["${i.field}"]`,as:`lower_${c}`}));for(const h of l)f.push({fieldPrefix:h.as.substring(0,6),titlePrefix:fa(fa(h.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:l,errorBarSpecificAggregate:u,tooltipSummary:f,tooltipTitleWithFieldName:d}}function Ek(e,t,n){return`${Hf(e)} ${n} ${t}`}const DE="errorband",xse=["band","borders"],wse=new Nm(DE,P6);function P6(e,{config:t}){e={...e,encoding:Om(e.encoding,t)};const{transform:n,continuousAxisChannelDef:i,continuousAxis:r,encodingWithoutContinuousAxis:o,markDef:s,outerSpec:a,tooltipEncoding:u}=L6(e,DE,t),l=s,c=ME(l,r,i,o,t.errorband),f=e.encoding.x!==void 0&&e.encoding.y!==void 0;let d={type:f?"area":"rect"},h={type:f?"line":"rule"};const p={...l.interpolate?{interpolate:l.interpolate}:{},...l.tension&&l.interpolate?{tension:l.tension}:{}};return f?(d={...d,...p,ariaRoleDescription:"errorband"},h={...h,...p,aria:!1}):l.interpolate?U(hk("interpolate")):l.tension&&U(hk("tension")),{...a,transform:n,layer:[...c({partName:"band",mark:d,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:u}),...c({partName:"borders",mark:h,positionPrefix:"lower",extraEncoding:u}),...c({partName:"borders",mark:h,positionPrefix:"upper",extraEncoding:u})]}}const I6={};function NE(e,t,n){const i=new Nm(e,t);I6[e]={normalizer:i,parts:n}}function Ese(){return B(I6)}NE(Up,N6,cse);NE(TE,R6,hse);NE(DE,P6,xse);const _se=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],z6={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},B6={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},Sse=B(z6),$se=B(B6),Ase={header:1,headerRow:1,headerColumn:1,headerFacet:1},U6=B(Ase),j6=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],kse={gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},Cse={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},Mi="_vgsid_",Fse={point:{on:"click",fields:[Mi],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[pointerdown, window:pointerup] > window:pointermove!",encodings:["x","y"],translate:"[pointerdown, window:pointerup] > window:pointermove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function OE(e){return e==="legend"||!!(e!=null&&e.legend)}function d1(e){return OE(e)&&V(e)}function RE(e){return!!(e!=null&&e.select)}function q6(e){const t=[];for(const n of e||[]){if(RE(n))continue;const{expr:i,bind:r,...o}=n;if(r&&i){const s={...o,bind:r,init:i};t.push(s)}else{const s={...o,...i?{update:i}:{},...r?{bind:r}:{}};t.push(s)}}return t}function Mse(e){return Rm(e)||PE(e)||LE(e)}function LE(e){return"concat"in e}function Rm(e){return"vconcat"in e}function PE(e){return"hconcat"in e}function W6({step:e,offsetIsDiscrete:t}){return t?e.for??"offset":"position"}function fr(e){return V(e)&&e.step!==void 0}function _k(e){return e.view||e.width||e.height}const Sk=20,Tse={align:1,bounds:1,center:1,columns:1,spacing:1},Dse=B(Tse);function Nse(e,t,n){const i=n[t],r={},{spacing:o,columns:s}=i;o!==void 0&&(r.spacing=o),s!==void 0&&(Cm(e)&&!Qf(e.facet)||LE(e))&&(r.columns=s),Rm(e)&&(r.columns=1);for(const a of Dse)if(e[a]!==void 0)if(a==="spacing"){const u=e[a];r[a]=Ee(u)?u:{row:u.row??o,column:u.column??o}}else r[a]=e[a];return r}function kv(e,t){return e[t]??e[t==="width"?"continuousWidth":"continuousHeight"]}function jp(e,t){const n=qp(e,t);return fr(n)?n.step:H6}function qp(e,t){const n=e[t]??e[t==="width"?"discreteWidth":"discreteHeight"];return Ze(n,{step:e.step})}const H6=20,Ose={continuousWidth:200,continuousHeight:200,step:H6},Rse={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:Ose,mark:koe,arc:{},area:{},bar:Moe,circle:{},geoshape:{},image:{},line:{},point:{},rect:Toe,rule:{color:"black"},square:{},text:{color:"black"},tick:Doe,trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:loe,projection:{},legend:kse,header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:Fse,style:{},title:{},facet:{spacing:Sk},concat:{spacing:Sk},normalizedNumberFormat:".0%"},Cr=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],$k={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},Ak={blue:Cr[0],orange:Cr[1],red:Cr[2],teal:Cr[3],green:Cr[4],yellow:Cr[5],purple:Cr[6],pink:Cr[7],brown:Cr[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function Lse(e={}){return{signals:[{name:"color",value:V(e)?{...Ak,...e}:Ak}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}function Pse(e){return{signals:[{name:"fontSize",value:V(e)?{...$k,...e}:$k}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}function Ise(e){return{text:{font:e},style:{"guide-label":{font:e},"guide-title":{font:e},"group-title":{font:e},"group-subtitle":{font:e}}}}function G6(e){const t=B(e||{}),n={};for(const i of t){const r=e[i];n[i]=td(r)?ER(r):Mn(r)}return n}function zse(e){const t=B(e),n={};for(const i of t)n[i]=G6(e[i]);return n}const Bse=[...i6,...S6,...U6,"background","padding","legend","lineBreak","scale","style","title","view"];function Y6(e={}){const{color:t,font:n,fontSize:i,selection:r,...o}=e,s=el({},ae(Rse),n?Ise(n):{},t?Lse(t):{},i?Pse(i):{},o||{});r&&tl(s,"selection",r,!0);const a=yn(s,Bse);for(const u of["background","lineBreak","padding"])s[u]&&(a[u]=Mn(s[u]));for(const u of i6)s[u]&&(a[u]=pn(s[u]));for(const u of S6)s[u]&&(a[u]=G6(s[u]));for(const u of U6)s[u]&&(a[u]=pn(s[u]));return s.legend&&(a.legend=pn(s.legend)),s.scale&&(a.scale=pn(s.scale)),s.style&&(a.style=zse(s.style)),s.title&&(a.title=pn(s.title)),s.view&&(a.view=pn(s.view)),a}const Use=new Set(["view",...woe]),jse=["color","fontSize","background","padding","facet","concat","numberFormat","numberFormatType","normalizedNumberFormat","normalizedNumberFormatType","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],qse={view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"],...Aoe};function Wse(e){e=ae(e);for(const t of jse)delete e[t];if(e.axis)for(const t in e.axis)td(e.axis[t])&&delete e.axis[t];if(e.legend)for(const t of _se)delete e.legend[t];if(e.mark){for(const t of gk)delete e.mark[t];e.mark.tooltip&&V(e.mark.tooltip)&&delete e.mark.tooltip}e.params&&(e.signals=(e.signals||[]).concat(q6(e.params)),delete e.params);for(const t of Use){for(const i of gk)delete e[t][i];const n=qse[t];if(n)for(const i of n)delete e[t][i];Gse(e,t)}for(const t of Ese())delete e[t];Hse(e);for(const t in e)V(e[t])&&Oe(e[t])&&delete e[t];return Oe(e)?void 0:e}function Hse(e){const{titleMarkConfig:t,subtitleMarkConfig:n,subtitle:i}=wR(e.title);Oe(t)||(e.style["group-title"]={...e.style["group-title"],...t}),Oe(n)||(e.style["group-subtitle"]={...e.style["group-subtitle"],...n}),Oe(i)?delete e.title:e.title=i}function Gse(e,t,n,i){const r=i?e[t][i]:e[t];t==="view"&&(n="cell");const o={...r,...e.style[n??t]};Oe(o)||(e.style[n??t]=o),i||delete e[t]}function Lm(e){return"layer"in e}function Yse(e){return"repeat"in e}function Xse(e){return!P(e.repeat)&&e.repeat.layer}class IE{map(t,n){return Cm(t)?this.mapFacet(t,n):Yse(t)?this.mapRepeat(t,n):PE(t)?this.mapHConcat(t,n):Rm(t)?this.mapVConcat(t,n):LE(t)?this.mapConcat(t,n):this.mapLayerOrUnit(t,n)}mapLayerOrUnit(t,n){if(Lm(t))return this.mapLayer(t,n);if(ao(t))return this.mapUnit(t,n);throw new Error(eE(t))}mapLayer(t,n){return{...t,layer:t.layer.map(i=>this.mapLayerOrUnit(i,n))}}mapHConcat(t,n){return{...t,hconcat:t.hconcat.map(i=>this.map(i,n))}}mapVConcat(t,n){return{...t,vconcat:t.vconcat.map(i=>this.map(i,n))}}mapConcat(t,n){const{concat:i,...r}=t;return{...r,concat:i.map(o=>this.map(o,n))}}mapFacet(t,n){return{...t,spec:this.map(t.spec,n)}}mapRepeat(t,n){return{...t,spec:this.map(t.spec,n)}}}const Vse={zero:1,center:1,normalize:1};function Kse(e){return e in Vse}const Jse=new Set([e6,Sm,_m,Rp,Am,mE,yE,$m,t6,gE]),Qse=new Set([Sm,_m,e6]);function Va(e){return j(e)&&Hu(e)==="quantitative"&&!e.bin}function kk(e,t,{orient:n,type:i}){const r=t==="x"?"y":"radius",o=t==="x"&&["bar","area"].includes(i),s=e[t],a=e[r];if(j(s)&&j(a))if(Va(s)&&Va(a)){if(s.stack)return t;if(a.stack)return r;const u=j(s)&&!!s.aggregate,l=j(a)&&!!a.aggregate;if(u!==l)return u?t:r;if(o){if(n==="vertical")return r;if(n==="horizontal")return t}}else{if(Va(s))return t;if(Va(a))return r}else{if(Va(s))return o&&n==="vertical"?void 0:t;if(Va(a))return o&&n==="horizontal"?void 0:r}}function Zse(e){switch(e){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}function X6(e,t){var g,m;const n=lr(e)?e:{type:e},i=n.type;if(!Jse.has(i))return null;const r=kk(t,"x",n)||kk(t,"theta",n);if(!r)return null;const o=t[r],s=j(o)?G(o,{}):void 0,a=Zse(r),u=[],l=new Set;if(t[a]){const y=t[a],v=j(y)?G(y,{}):void 0;v&&v!==s&&(u.push(a),l.add(v))}const c=a==="x"?"xOffset":"yOffset",f=t[c],d=j(f)?G(f,{}):void 0;d&&d!==s&&(u.push(c),l.add(d));const h=die.reduce((y,v)=>{if(v!=="tooltip"&&Vs(t,v)){const b=t[v];for(const x of Y(b)){const w=cr(x);if(w.aggregate)continue;const _=G(w,{});(!_||!l.has(_))&&y.push({channel:v,fieldDef:w})}}return y},[]);let p;return o.stack!==void 0?es(o.stack)?p=o.stack?"zero":null:p=o.stack:Qse.has(i)&&(p="zero"),!p||!Kse(p)||kE(t)&&h.length===0?null:(g=o==null?void 0:o.scale)!=null&&g.type&&((m=o==null?void 0:o.scale)==null?void 0:m.type)!==vn.LINEAR?(o!=null&&o.stack&&U(kre(o.scale.type)),null):ue(t[wr(r)])?(o.stack!==void 0&&U(Are(r)),null):(j(o)&&o.aggregate&&!Sie.has(o.aggregate)&&U(Cre(o.aggregate)),{groupbyChannels:u,groupbyFields:l,fieldChannel:r,impute:o.impute===null?!1:ps(i),stackBy:h,offset:p})}function V6(e,t,n){const i=pn(e),r=Fe("orient",i,n);if(i.orient=iae(i.type,t,r),r!==void 0&&r!==i.orient&&U(cre(i.orient,r)),i.type==="bar"&&i.orient){const u=Fe("cornerRadiusEnd",i,n);if(u!==void 0){const l=i.orient==="horizontal"&&t.x2||i.orient==="vertical"&&t.y2?["cornerRadius"]:Foe[i.orient];for(const c of l)i[c]=u;i.cornerRadiusEnd!==void 0&&delete i.cornerRadiusEnd}}const o=Fe("opacity",i,n),s=Fe("fillOpacity",i,n);return o===void 0&&s===void 0&&(i.opacity=tae(i.type,t)),Fe("cursor",i,n)===void 0&&(i.cursor=eae(i,t,n)),i}function eae(e,t,n){return t.href||e.href||Fe("href",e,n)?"pointer":e.cursor}function tae(e,t){if(ve([Am,gE,mE,yE],e)&&!kE(t))return .7}function nae(e,t,{graticule:n}){if(n)return!1;const i=Zr("filled",e,t),r=e.type;return Ze(i,r!==Am&&r!==$m&&r!==Rp)}function iae(e,t,n){switch(e){case Am:case mE:case yE:case t6:case boe:case voe:return}const{x:i,y:r,x2:o,y2:s}=t;switch(e){case Sm:if(j(i)&&(_t(i.bin)||j(r)&&r.aggregate&&!i.aggregate))return"vertical";if(j(r)&&(_t(r.bin)||j(i)&&i.aggregate&&!r.aggregate))return"horizontal";if(s||o){if(n)return n;if(!o)return(j(i)&&i.type===pa&&!Be(i.bin)||Pp(i))&&j(r)&&_t(r.bin)?"horizontal":"vertical";if(!s)return(j(r)&&r.type===pa&&!Be(r.bin)||Pp(r))&&j(i)&&_t(i.bin)?"vertical":"horizontal"}case Rp:if(o&&!(j(i)&&_t(i.bin))&&s&&!(j(r)&&_t(r.bin)))return;case _m:if(s)return j(r)&&_t(r.bin)?"horizontal":"vertical";if(o)return j(i)&&_t(i.bin)?"vertical":"horizontal";if(e===Rp){if(i&&!r)return"vertical";if(r&&!i)return"horizontal"}case $m:case gE:{const a=bk(i),u=bk(r);if(n)return n;if(a&&!u)return e!=="tick"?"horizontal":"vertical";if(!a&&u)return e!=="tick"?"vertical":"horizontal";if(a&&u)return"vertical";{const l=un(i)&&i.type===qu,c=un(r)&&r.type===qu;if(l&&!c)return"vertical";if(!l&&c)return"horizontal"}return}}return"vertical"}function rae(e){const{point:t,line:n,...i}=e;return B(i).length>1?i:i.type}function oae(e){for(const t of["line","area","rule","trail"])e[t]&&(e={...e,[t]:yn(e[t],["point","line"])});return e}function h1(e,t={},n){return e.point==="transparent"?{opacity:0}:e.point?V(e.point)?e.point:{}:e.point!==void 0?null:t.point||n.shape?V(t.point)?t.point:{}:void 0}function Ck(e,t={}){return e.line?e.line===!0?{}:e.line:e.line!==void 0?null:t.line?t.line===!0?{}:t.line:void 0}class sae{constructor(){this.name="path-overlay"}hasMatchingType(t,n){if(ao(t)){const{mark:i,encoding:r}=t,o=lr(i)?i:{type:i};switch(o.type){case"line":case"rule":case"trail":return!!h1(o,n[o.type],r);case"area":return!!h1(o,n[o.type],r)||!!Ck(o,n[o.type])}}return!1}run(t,n,i){const{config:r}=n,{params:o,projection:s,mark:a,name:u,encoding:l,...c}=t,f=Om(l,r),d=lr(a)?a:{type:a},h=h1(d,r[d.type],f),p=d.type==="area"&&Ck(d,r[d.type]),g=[{name:u,...o?{params:o}:{},mark:rae({...d.type==="area"&&d.opacity===void 0&&d.fillOpacity===void 0?{opacity:.7}:{},...d}),encoding:yn(f,["shape"])}],m=X6(V6(d,f,r),f);let y=f;if(m){const{fieldChannel:v,offset:b}=m;y={...f,[v]:{...f[v],...b?{stack:b}:{}}}}return y=yn(y,["y2","x2"]),p&&g.push({...s?{projection:s}:{},mark:{type:"line",...zu(d,["clip","interpolate","tension","tooltip"]),...p},encoding:y}),h&&g.push({...s?{projection:s}:{},mark:{type:"point",opacity:1,filled:!0,...zu(d,["clip","tooltip"]),...h},encoding:y}),i({...c,layer:g},{...n,config:oae(r)})}}function aae(e,t){return t?Qf(e)?J6(e,t):K6(e,t):e}function p1(e,t){return t?J6(e,t):e}function Cv(e,t,n){const i=t[e];if(qoe(i)){if(i.repeat in n)return{...t,[e]:n[i.repeat]};U(Wie(i.repeat));return}return t}function K6(e,t){if(e=Cv("field",e,t),e!==void 0){if(e===null)return null;if(_E(e)&&er(e.sort)){const n=Cv("field",e.sort,t);e={...e,...n?{sort:n}:{}}}return e}}function Fk(e,t){if(j(e))return K6(e,t);{const n=Cv("datum",e,t);return n!==e&&!n.type&&(n.type="nominal"),n}}function Mk(e,t){if(ue(e)){const n=Fk(e,t);if(n)return n;if(Fm(e))return{condition:e.condition}}else{if(Zf(e)){const n=Fk(e.condition,t);if(n)return{...e,condition:n};{const{condition:i,...r}=e;return r}}return e}}function J6(e,t){const n={};for(const i in e)if(re(e,i)){const r=e[i];if(P(r))n[i]=r.map(o=>Mk(o,t)).filter(o=>o);else{const o=Mk(r,t);o!==void 0&&(n[i]=o)}}return n}class uae{constructor(){this.name="RuleForRangedLine"}hasMatchingType(t){if(ao(t)){const{encoding:n,mark:i}=t;if(i==="line"||lr(i)&&i.type==="line")for(const r of lie){const o=Ta(r),s=n[o];if(n[r]&&(j(s)&&!_t(s.bin)||_r(s)))return!0}}return!1}run(t,n,i){const{encoding:r,mark:o}=t;return U(lre(!!r.x2,!!r.y2)),i({...t,mark:V(o)?{...o,type:"rule"}:"rule"},n)}}class lae extends IE{constructor(){super(...arguments),this.nonFacetUnitNormalizers=[fse,pse,wse,new sae,new uae]}map(t,n){if(ao(t)){const i=Vs(t.encoding,Hr),r=Vs(t.encoding,Gr),o=Vs(t.encoding,hm);if(i||r||o)return this.mapFacetedUnit(t,n)}return super.map(t,n)}mapUnit(t,n){const{parentEncoding:i,parentProjection:r}=n,o=p1(t.encoding,n.repeater),s={...t,...t.name?{name:[n.repeaterPrefix,t.name].filter(u=>u).join("_")}:{},...o?{encoding:o}:{}};if(i||r)return this.mapUnitWithParentEncodingOrProjection(s,n);const a=this.mapLayerOrUnit.bind(this);for(const u of this.nonFacetUnitNormalizers)if(u.hasMatchingType(s,n.config))return u.run(s,n,a);return s}mapRepeat(t,n){return Xse(t)?this.mapLayerRepeat(t,n):this.mapNonLayerRepeat(t,n)}mapLayerRepeat(t,n){const{repeat:i,spec:r,...o}=t,{row:s,column:a,layer:u}=i,{repeater:l={},repeaterPrefix:c=""}=n;return s||a?this.mapRepeat({...t,repeat:{...s?{row:s}:{},...a?{column:a}:{}},spec:{repeat:{layer:u},spec:r}},n):{...o,layer:u.map(f=>{const d={...l,layer:f},h=`${(r.name?`${r.name}_`:"")+c}child__layer_${We(f)}`,p=this.mapLayerOrUnit(r,{...n,repeater:d,repeaterPrefix:h});return p.name=h,p})}}mapNonLayerRepeat(t,n){const{repeat:i,spec:r,data:o,...s}=t;!P(i)&&t.columns&&(t=yn(t,["columns"]),U(lk("repeat")));const a=[],{repeater:u={},repeaterPrefix:l=""}=n,c=!P(i)&&i.row||[u?u.row:null],f=!P(i)&&i.column||[u?u.column:null],d=P(i)&&i||[u?u.repeat:null];for(const p of d)for(const g of c)for(const m of f){const y={repeat:p,row:g,column:m,layer:u.layer},v=(r.name?`${r.name}_`:"")+l+"child__"+(P(i)?`${We(p)}`:(i.row?`row_${We(g)}`:"")+(i.column?`column_${We(m)}`:"")),b=this.map(r,{...n,repeater:y,repeaterPrefix:v});b.name=v,a.push(yn(b,["data"]))}const h=P(i)?t.columns:i.column?i.column.length:1;return{data:r.data??o,align:"all",...s,columns:h,concat:a}}mapFacet(t,n){const{facet:i}=t;return Qf(i)&&t.columns&&(t=yn(t,["columns"]),U(lk("facet"))),super.mapFacet(t,n)}mapUnitWithParentEncodingOrProjection(t,n){const{encoding:i,projection:r}=t,{parentEncoding:o,parentProjection:s,config:a}=n,u=Dk({parentProjection:s,projection:r}),l=Tk({parentEncoding:o,encoding:p1(i,n.repeater)});return this.mapUnit({...t,...u?{projection:u}:{},...l?{encoding:l}:{}},{config:a})}mapFacetedUnit(t,n){const{row:i,column:r,facet:o,...s}=t.encoding,{mark:a,width:u,projection:l,height:c,view:f,params:d,encoding:h,...p}=t,{facetMapping:g,layout:m}=this.getFacetMappingAndLayout({row:i,column:r,facet:o},n),y=p1(s,n.repeater);return this.mapFacet({...p,...m,facet:g,spec:{...u?{width:u}:{},...c?{height:c}:{},...f?{view:f}:{},...l?{projection:l}:{},mark:a,encoding:y,...d?{params:d}:{}}},n)}getFacetMappingAndLayout(t,n){const{row:i,column:r,facet:o}=t;if(i||r){o&&U(are([...i?[Hr]:[],...r?[Gr]:[]]));const s={},a={};for(const u of[Hr,Gr]){const l=t[u];if(l){const{align:c,center:f,spacing:d,columns:h,...p}=l;s[u]=p;for(const g of["align","center","spacing"])l[g]!==void 0&&(a[g]??(a[g]={}),a[g][u]=l[g])}}return{facetMapping:s,layout:a}}else{const{align:s,center:a,spacing:u,columns:l,...c}=o;return{facetMapping:aae(c,n.repeater),layout:{...s?{align:s}:{},...a?{center:a}:{},...u?{spacing:u}:{},...l?{columns:l}:{}}}}}mapLayer(t,{parentEncoding:n,parentProjection:i,...r}){const{encoding:o,projection:s,...a}=t,u={...r,parentEncoding:Tk({parentEncoding:n,encoding:o,layer:!0}),parentProjection:Dk({parentProjection:i,projection:s})};return super.mapLayer({...a,...t.name?{name:[u.repeaterPrefix,t.name].filter(l=>l).join("_")}:{}},u)}}function Tk({parentEncoding:e,encoding:t={},layer:n}){let i={};if(e){const r=new Set([...B(e),...B(t)]);for(const o of r){const s=t[o],a=e[o];if(ue(s)){const u={...a,...s};i[o]=u}else Zf(s)?i[o]={...s,condition:{...a,...s.condition}}:s||s===null?i[o]=s:(n||Fi(a)||Q(a)||ue(a)||P(a))&&(i[o]=a)}}else i=t;return!i||Oe(i)?void 0:i}function Dk(e){const{parentProjection:t,projection:n}=e;return t&&n&&U(Kie({parentProjection:t,projection:n})),n??t}function zE(e){return"filter"in e}function cae(e){return(e==null?void 0:e.stop)!==void 0}function Q6(e){return"lookup"in e}function fae(e){return"data"in e}function dae(e){return"param"in e}function hae(e){return"pivot"in e}function pae(e){return"density"in e}function gae(e){return"quantile"in e}function mae(e){return"regression"in e}function yae(e){return"loess"in e}function vae(e){return"sample"in e}function bae(e){return"window"in e}function xae(e){return"joinaggregate"in e}function wae(e){return"flatten"in e}function Eae(e){return"calculate"in e}function Z6(e){return"bin"in e}function _ae(e){return"impute"in e}function Sae(e){return"timeUnit"in e}function $ae(e){return"aggregate"in e}function Aae(e){return"stack"in e}function kae(e){return"fold"in e}function Cae(e){return"extent"in e&&!("density"in e)}function Fae(e){return e.map(t=>zE(t)?{filter:hu(t.filter,noe)}:t)}class Mae extends IE{map(t,n){return n.emptySelections??(n.emptySelections={}),n.selectionPredicates??(n.selectionPredicates={}),t=Nk(t,n),super.map(t,n)}mapLayerOrUnit(t,n){if(t=Nk(t,n),t.encoding){const i={};for(const[r,o]of Yo(t.encoding))i[r]=e4(o,n);t={...t,encoding:i}}return super.mapLayerOrUnit(t,n)}mapUnit(t,n){const{selection:i,...r}=t;return i?{...r,params:Yo(i).map(([o,s])=>{const{init:a,bind:u,empty:l,...c}=s;c.type==="single"?(c.type="point",c.toggle=!1):c.type==="multi"&&(c.type="point"),n.emptySelections[o]=l!=="none";for(const f of kt(n.selectionPredicates[o]??{}))f.empty=l!=="none";return{name:o,value:a,select:c,bind:u}})}:t}}function Nk(e,t){const{transform:n,...i}=e;if(n){const r=n.map(o=>{if(zE(o))return{filter:Fv(o,t)};if(Z6(o)&&Da(o.bin))return{...o,bin:t4(o.bin)};if(Q6(o)){const{selection:s,...a}=o.from;return s?{...o,from:{param:s,...a}}:o}return o});return{...i,transform:r}}return e}function e4(e,t){var i,r;const n=ae(e);if(j(n)&&Da(n.bin)&&(n.bin=t4(n.bin)),Ra(n)&&((r=(i=n.scale)==null?void 0:i.domain)!=null&&r.selection)){const{selection:o,...s}=n.scale.domain;n.scale.domain={...s,...o?{param:o}:{}}}if(Fm(n))if(P(n.condition))n.condition=n.condition.map(o=>{const{selection:s,param:a,test:u,...l}=o;return a?o:{...l,test:Fv(o,t)}});else{const{selection:o,param:s,test:a,...u}=e4(n.condition,t);n.condition=s?n.condition:{...u,test:Fv(n.condition,t)}}return n}function t4(e){const t=e.extent;if(t!=null&&t.selection){const{selection:n,...i}=t;return{...e,extent:{...i,param:n}}}return e}function Fv(e,t){const n=i=>hu(i,r=>{var o;const s=t.emptySelections[r]??!0,a={param:r,empty:s};return(o=t.selectionPredicates)[r]??(o[r]=[]),t.selectionPredicates[r].push(a),a});return e.selection?n(e.selection):hu(e.test||e.filter,i=>i.selection?n(i.selection):i)}class Mv extends IE{map(t,n){const i=n.selections??[];if(t.params&&!ao(t)){const r=[];for(const o of t.params)RE(o)?i.push(o):r.push(o);t.params=r}return n.selections=i,super.map(t,n)}mapUnit(t,n){const i=n.selections;if(!i||!i.length)return t;const r=(n.path??[]).concat(t.name),o=[];for(const s of i)if(!s.views||!s.views.length)o.push(s);else for(const a of s.views)(X(a)&&(a===t.name||r.includes(a))||P(a)&&a.map(u=>r.indexOf(u)).every((u,l,c)=>u!==-1&&(l===0||u>c[l-1])))&&o.push(s);return o.length&&(t.params=o),t}}for(const e of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const t=Mv.prototype[e];Mv.prototype[e]=function(n,i){return t.call(this,n,Tae(n,i))}}function Tae(e,t){return e.name?{...t,path:(t.path??[]).concat(e.name)}:t}function n4(e,t){t===void 0&&(t=Y6(e.config));const n=Rae(e,t),{width:i,height:r}=e,o=Lae(n,{width:i,height:r,autosize:e.autosize},t);return{...n,...o?{autosize:o}:{}}}const Dae=new lae,Nae=new Mae,Oae=new Mv;function Rae(e,t={}){const n={config:t};return Oae.map(Dae.map(Nae.map(e,n),n),n)}function Ok(e){return X(e)?{type:e}:e??{}}function Lae(e,t,n){let{width:i,height:r}=t;const o=ao(e)||Lm(e),s={};o?i=="container"&&r=="container"?(s.type="fit",s.contains="padding"):i=="container"?(s.type="fit-x",s.contains="padding"):r=="container"&&(s.type="fit-y",s.contains="padding"):(i=="container"&&(U(ok("width")),i=void 0),r=="container"&&(U(ok("height")),r=void 0));const a={type:"pad",...s,...n?Ok(n.autosize):{},...Ok(e.autosize)};if(a.type==="fit"&&!o&&(U(Nie),a.type="pad"),i=="container"&&!(a.type=="fit"||a.type=="fit-x")&&U(sk("width")),r=="container"&&!(a.type=="fit"||a.type=="fit-y")&&U(sk("height")),!Nn(a,{type:"pad"}))return a}function Pae(e){return e==="fit"||e==="fit-x"||e==="fit-y"}function Iae(e){return e?`fit-${vm(e)}`:"fit"}const zae=["background","padding"];function Rk(e,t){const n={};for(const i of zae)e&&e[i]!==void 0&&(n[i]=Mn(e[i]));return t&&(n.params=e.params),n}class uo{constructor(t={},n={}){this.explicit=t,this.implicit=n}clone(){return new uo(ae(this.explicit),ae(this.implicit))}combine(){return{...this.explicit,...this.implicit}}get(t){return Ze(this.explicit[t],this.implicit[t])}getWithExplicit(t){return this.explicit[t]!==void 0?{explicit:!0,value:this.explicit[t]}:this.implicit[t]!==void 0?{explicit:!1,value:this.implicit[t]}:{explicit:!1,value:void 0}}setWithExplicit(t,{value:n,explicit:i}){n!==void 0&&this.set(t,n,i)}set(t,n,i){return delete this[i?"implicit":"explicit"][t],this[i?"explicit":"implicit"][t]=n,this}copyKeyFromSplit(t,{explicit:n,implicit:i}){n[t]!==void 0?this.set(t,n[t],!0):i[t]!==void 0&&this.set(t,i[t],!1)}copyKeyFromObject(t,n){n[t]!==void 0&&this.set(t,n[t],!0)}copyAll(t){for(const n of B(t.combine())){const i=t.getWithExplicit(n);this.setWithExplicit(n,i)}}}function Hi(e){return{explicit:!0,value:e}}function kn(e){return{explicit:!1,value:e}}function i4(e){return(t,n,i,r)=>{const o=e(t.value,n.value);return o>0?t:o<0?n:Pm(t,n,i,r)}}function Pm(e,t,n,i){return e.explicit&&t.explicit&&U(bre(n,i,e.value,t.value)),e}function Ko(e,t,n,i,r=Pm){return e===void 0||e.value===void 0?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:Nn(e.value,t.value)?e:r(e,t,n,i)}class Bae extends uo{constructor(t={},n={},i=!1){super(t,n),this.explicit=t,this.implicit=n,this.parseNothing=i}clone(){const t=super.clone();return t.parseNothing=this.parseNothing,t}}function Xu(e){return"url"in e}function ff(e){return"values"in e}function r4(e){return"name"in e&&!Xu(e)&&!ff(e)&&!Oo(e)}function Oo(e){return e&&(o4(e)||s4(e)||BE(e))}function o4(e){return"sequence"in e}function s4(e){return"sphere"in e}function BE(e){return"graticule"in e}var ze;(function(e){e[e.Raw=0]="Raw",e[e.Main=1]="Main",e[e.Row=2]="Row",e[e.Column=3]="Column",e[e.Lookup=4]="Lookup"})(ze||(ze={}));function a4(e){const{signals:t,hasLegend:n,index:i,...r}=e;return r.field=ri(r.field),r}function ya(e,t=!0,n=Wt){if(P(e)){const i=e.map(r=>ya(r,t,n));return t?`[${i.join(", ")}]`:i}else if(Na(e))return n(t?ha(e):Wre(e));return t?n(Re(e)):e}function Uae(e,t){for(const n of kt(e.component.selection??{})){const i=n.name;let r=`${i}${Qo}, ${n.resolve==="global"?"true":`{unit: ${Ks(e)}}`}`;for(const o of Um)o.defined(n)&&(o.signals&&(t=o.signals(e,n,t)),o.modifyExpr&&(r=o.modifyExpr(e,n,r)));t.push({name:i+bue,on:[{events:{signal:n.name+Qo},update:`modify(${H(n.name+va)}, ${r})`}]})}return UE(t)}function jae(e,t){if(e.component.selection&&B(e.component.selection).length){const n=H(e.getName("cell"));t.unshift({name:"facet",value:{},on:[{events:ss("pointermove","scope"),update:`isTuple(facet) ? facet : group(${n}).datum`}]})}return UE(t)}function qae(e,t){let n=!1;for(const i of kt(e.component.selection??{})){const r=i.name,o=H(r+va);if(t.filter(a=>a.name===r).length===0){const a=i.resolve==="global"?"union":i.resolve,u=i.type==="point"?", true, true)":")";t.push({name:i.name,update:`${$4}(${o}, ${H(a)}${u}`})}n=!0;for(const a of Um)a.defined(i)&&a.topLevelSignals&&(t=a.topLevelSignals(e,i,t))}return n&&t.filter(r=>r.name==="unit").length===0&&t.unshift({name:"unit",value:{},on:[{events:"pointermove",update:"isTuple(group()) ? group() : unit"}]}),UE(t)}function Wae(e,t){const n=[...t],i=Ks(e,{escape:!1});for(const r of kt(e.component.selection??{})){const o={name:r.name+va};if(r.project.hasSelectionId&&(o.transform=[{type:"collect",sort:{field:Mi}}]),r.init){const a=r.project.items.map(a4);o.values=r.project.hasSelectionId?r.init.map(u=>({unit:i,[Mi]:ya(u,!1)[0]})):r.init.map(u=>({unit:i,fields:a,values:ya(u,!1)}))}n.filter(a=>a.name===r.name+va).length||n.push(o)}return n}function u4(e,t){for(const n of kt(e.component.selection??{}))for(const i of Um)i.defined(n)&&i.marks&&(t=i.marks(e,n,t));return t}function Hae(e,t){for(const n of e.children)Ve(n)&&(t=u4(n,t));return t}function Gae(e,t,n,i){const r=M4(e,t.param,t);return{signal:Un(n.get("type"))&&P(i)&&i[0]>i[1]?`isValid(${r}) && reverse(${r})`:r}}function UE(e){return e.map(t=>(t.on&&!t.on.length&&delete t.on,t))}class Ne{constructor(t,n){this.debugName=n,this._children=[],this._parent=null,t&&(this.parent=t)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(t){this._parent=t,t&&t.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(t,n){if(this._children.includes(t)){U(Yie);return}n!==void 0?this._children.splice(n,0,t):this._children.push(t)}removeChild(t){const n=this._children.indexOf(t);return this._children.splice(n,1),n}remove(){let t=this._parent.removeChild(this);for(const n of this._children)n._parent=this._parent,this._parent.addChild(n,t++)}insertAsParentOf(t){const n=t.parent;n.removeChild(this),this.parent=n,t.parent=this}swapWithParent(){const t=this._parent,n=t.parent;for(const r of this._children)r.parent=t;this._children=[],t.removeChild(this);const i=t.parent.removeChild(t);this._parent=n,n.addChild(this,i),t.parent=this}}class on extends Ne{clone(){const t=new this.constructor;return t.debugName=`clone_${this.debugName}`,t._source=this._source,t._name=`clone_${this._name}`,t.type=this.type,t.refCounts=this.refCounts,t.refCounts[t._name]=0,t}constructor(t,n,i,r){super(t,n),this.type=i,this.refCounts=r,this._source=this._name=n,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}dependentFields(){return new Set}producedFields(){return new Set}hash(){return this._hash===void 0&&(this._hash=`Output ${rR()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(t){this._source=t}}function g1(e){return e.as!==void 0}function Lk(e){return`${e}_end`}class tr extends Ne{clone(){return new tr(null,ae(this.timeUnits))}constructor(t,n){super(t),this.timeUnits=n}static makeFromEncoding(t,n){const i=n.reduceFieldDef((r,o,s)=>{const{field:a,timeUnit:u}=o;if(u){let l;if(Oa(u)){if(Ve(n)){const{mark:c,markDef:f,config:d}=n,h=Vo({fieldDef:o,markDef:f,config:d});(cf(c)||h)&&(l={timeUnit:vt(u),field:a})}}else l={as:G(o,{forAs:!0}),field:a,timeUnit:u};if(Ve(n)){const{mark:c,markDef:f,config:d}=n,h=Vo({fieldDef:o,markDef:f,config:d});cf(c)&&et(s)&&h!==.5&&(l.rectBandPosition=h)}l&&(r[ye(l)]=l)}return r},{});return Oe(i)?null:new tr(t,i)}static makeFromTransform(t,n){const{timeUnit:i,...r}={...n},o=vt(i),s={...r,timeUnit:o};return new tr(t,{[ye(s)]:s})}merge(t){this.timeUnits={...this.timeUnits};for(const n in t.timeUnits)this.timeUnits[n]||(this.timeUnits[n]=t.timeUnits[n]);for(const n of t.children)t.removeChild(n),n.parent=this;t.remove()}removeFormulas(t){const n={};for(const[i,r]of Yo(this.timeUnits)){const o=g1(r)?r.as:`${r.field}_end`;t.has(o)||(n[i]=r)}this.timeUnits=n}producedFields(){return new Set(kt(this.timeUnits).map(t=>g1(t)?t.as:Lk(t.field)))}dependentFields(){return new Set(kt(this.timeUnits).map(t=>t.field))}hash(){return`TimeUnit ${ye(this.timeUnits)}`}assemble(){const t=[];for(const n of kt(this.timeUnits)){const{rectBandPosition:i}=n,r=vt(n.timeUnit);if(g1(n)){const{field:o,as:s}=n,{unit:a,utc:u,...l}=r,c=[s,`${s}_end`];t.push({field:ri(o),type:"timeunit",...a?{units:Em(a)}:{},...u?{timezone:"utc"}:{},...l,as:c}),t.push(...Pk(c,i,r))}else if(n){const{field:o}=n,s=o.replaceAll("\\.","."),a=l4({timeUnit:r,field:s}),u=Lk(s);t.push({type:"formula",expr:a,as:u}),t.push(...Pk([s,u],i,r))}}return t}}const Im="offsetted_rect_start",zm="offsetted_rect_end";function l4({timeUnit:e,field:t,reverse:n}){const{unit:i,utc:r}=e,o=BR(i),{part:s,step:a}=WR(o,e.step);return`${r?"utcOffset":"timeOffset"}('${s}', datum['${t}'], ${n?-a:a})`}function Pk([e,t],n,i){if(n!==void 0&&n!==.5){const r=`datum['${e}']`,o=`datum['${t}']`;return[{type:"formula",expr:Ik([l4({timeUnit:i,field:e,reverse:!0}),r],n+.5),as:`${e}_${Im}`},{type:"formula",expr:Ik([r,o],n+.5),as:`${e}_${zm}`}]}return[]}function Ik([e,t],n){return`${1-n} * ${e} + ${n} * ${t}`}const nd="_tuple_fields";class Yae{constructor(...t){this.items=t,this.hasChannel={},this.hasField={},this.hasSelectionId=!1}}const Xae={defined:()=>!0,parse:(e,t,n)=>{const i=t.name,r=t.project??(t.project=new Yae),o={},s={},a=new Set,u=(p,g)=>{const m=g==="visual"?p.channel:p.field;let y=We(`${i}_${m}`);for(let v=1;a.has(y);v++)y=We(`${i}_${m}_${v}`);return a.add(y),{[g]:y}},l=t.type,c=e.config.selection[l],f=n.value!==void 0?Y(n.value):null;let{fields:d,encodings:h}=V(n.select)?n.select:{};if(!d&&!h&&f){for(const p of f)if(V(p))for(const g of B(p))uie(g)?(h||(h=[])).push(g):l==="interval"?(U(qie),h=c.encodings):(d??(d=[])).push(g)}!d&&!h&&(h=c.encodings,"fields"in c&&(d=c.fields));for(const p of h??[]){const g=e.fieldDef(p);if(g){let m=g.field;if(g.aggregate){U(Oie(p,g.aggregate));continue}else if(!m){U(uk(p));continue}if(g.timeUnit&&!Oa(g.timeUnit)){m=e.vgField(p);const y={timeUnit:g.timeUnit,as:m,field:g.field};s[ye(y)]=y}if(!o[m]){const y=l==="interval"&&so(p)&&Un(e.getScaleComponent(p).get("type"))?"R":g.bin?"R-RE":"E",v={field:m,channel:p,type:y,index:r.items.length};v.signals={...u(v,"data"),...u(v,"visual")},r.items.push(o[m]=v),r.hasField[m]=o[m],r.hasSelectionId=r.hasSelectionId||m===Mi,cR(p)?(v.geoChannel=p,v.channel=lR(p),r.hasChannel[v.channel]=o[m]):r.hasChannel[p]=o[m]}}else U(uk(p))}for(const p of d??[]){if(r.hasField[p])continue;const g={type:"E",field:p,index:r.items.length};g.signals={...u(g,"data")},r.items.push(g),r.hasField[p]=g,r.hasSelectionId=r.hasSelectionId||p===Mi}f&&(t.init=f.map(p=>r.items.map(g=>V(p)?p[g.geoChannel||g.channel]!==void 0?p[g.geoChannel||g.channel]:p[g.field]:p))),Oe(s)||(r.timeUnit=new tr(null,s))},signals:(e,t,n)=>{const i=t.name+nd;return n.filter(o=>o.name===i).length>0||t.project.hasSelectionId?n:n.concat({name:i,value:t.project.items.map(a4)})}},Yr={defined:e=>e.type==="interval"&&e.resolve==="global"&&e.bind&&e.bind==="scales",parse:(e,t)=>{const n=t.scales=[];for(const i of t.project.items){const r=i.channel;if(!so(r))continue;const o=e.getScaleComponent(r),s=o?o.get("type"):void 0;if(s=="sequential"&&U(Iie),!o||!Un(s)){U(Pie);continue}o.set("selectionExtent",{param:t.name,field:i.field},!0),n.push(i)}},topLevelSignals:(e,t,n)=>{const i=t.scales.filter(s=>n.filter(a=>a.name===s.signals.data).length===0);if(!e.parent||zk(e)||i.length===0)return n;const r=n.filter(s=>s.name===t.name)[0];let o=r.update;if(o.indexOf($4)>=0)r.update=`{${i.map(s=>`${H(ri(s.field))}: ${s.signals.data}`).join(", ")}}`;else{for(const s of i){const a=`${H(ri(s.field))}: ${s.signals.data}`;o.includes(a)||(o=`${o.substring(0,o.length-1)}, ${a}}`)}r.update=o}return n.concat(i.map(s=>({name:s.signals.data})))},signals:(e,t,n)=>{if(e.parent&&!zk(e))for(const i of t.scales){const r=n.find(o=>o.name===i.signals.data);r.push="outer",delete r.value,delete r.update}return n}};function Tv(e,t){return`domain(${H(e.scaleName(t))})`}function zk(e){return e.parent&&El(e.parent)&&!e.parent.parent}const mu="_brush",c4="_scale_trigger",Wl="geo_interval_init_tick",f4="_init",Vae="_center",Kae={defined:e=>e.type==="interval",parse:(e,t,n)=>{var i;if(e.hasProjection){const r={...V(n.select)?n.select:{}};r.fields=[Mi],r.encodings||(r.encodings=n.value?B(n.value):[Pi,Li]),n.select={type:"interval",...r}}if(t.translate&&!Yr.defined(t)){const r=`!event.item || event.item.mark.name !== ${H(t.name+mu)}`;for(const o of t.events){if(!o.between){U(`${o} is not an ordered event stream for interval selections.`);continue}const s=Y((i=o.between[0]).filter??(i.filter=[]));s.indexOf(r)<0&&s.push(r)}}},signals:(e,t,n)=>{const i=t.name,r=i+Qo,o=kt(t.project.hasChannel).filter(a=>a.channel===He||a.channel===wt),s=t.init?t.init[0]:null;if(n.push(...o.reduce((a,u)=>a.concat(Jae(e,t,u,s&&s[u.index])),[])),e.hasProjection){const a=H(e.projectionName()),u=e.projectionName()+Vae,{x:l,y:c}=t.project.hasChannel,f=l&&l.signals.visual,d=c&&c.signals.visual,h=l?s&&s[l.index]:`${u}[0]`,p=c?s&&s[c.index]:`${u}[1]`,g=w=>e.getSizeSignalRef(w).signal,m=`[[${f?f+"[0]":"0"}, ${d?d+"[0]":"0"}],[${f?f+"[1]":g("width")}, ${d?d+"[1]":g("height")}]]`;s&&(n.unshift({name:i+f4,init:`[scale(${a}, [${l?h[0]:h}, ${c?p[0]:p}]), scale(${a}, [${l?h[1]:h}, ${c?p[1]:p}])]`}),(!l||!c)&&(n.find(_=>_.name===u)||n.unshift({name:u,update:`invert(${a}, [${g("width")}/2, ${g("height")}/2])`})));const y=`intersect(${m}, {markname: ${H(e.getName("marks"))}}, unit.mark)`,v=`{unit: ${Ks(e)}}`,b=`vlSelectionTuples(${y}, ${v})`,x=o.map(w=>w.signals.visual);return n.concat({name:r,on:[{events:[...x.length?[{signal:x.join(" || ")}]:[],...s?[{signal:Wl}]:[]],update:b}]})}else{if(!Yr.defined(t)){const l=i+c4,c=o.map(f=>{const d=f.channel,{data:h,visual:p}=f.signals,g=H(e.scaleName(d)),m=e.getScaleComponent(d).get("type"),y=Un(m)?"+":"";return`(!isArray(${h}) || (${y}invert(${g}, ${p})[0] === ${y}${h}[0] && ${y}invert(${g}, ${p})[1] === ${y}${h}[1]))`});c.length&&n.push({name:l,value:{},on:[{events:o.map(f=>({scale:e.scaleName(f.channel)})),update:c.join(" && ")+` ? ${l} : {}`}]})}const a=o.map(l=>l.signals.data),u=`unit: ${Ks(e)}, fields: ${i+nd}, values`;return n.concat({name:r,...s?{init:`{${u}: ${ya(s)}}`}:{},...a.length?{on:[{events:[{signal:a.join(" || ")}],update:`${a.join(" && ")} ? {${u}: [${a}]} : null`}]}:{}})}},topLevelSignals:(e,t,n)=>(Ve(e)&&e.hasProjection&&t.init&&(n.filter(r=>r.name===Wl).length||n.unshift({name:Wl,value:null,on:[{events:"timer{1}",update:`${Wl} === null ? {} : ${Wl}`}]})),n),marks:(e,t,n)=>{const i=t.name,{x:r,y:o}=t.project.hasChannel,s=r==null?void 0:r.signals.visual,a=o==null?void 0:o.signals.visual,u=`data(${H(t.name+va)})`;if(Yr.defined(t)||!r&&!o)return n;const l={x:r!==void 0?{signal:`${s}[0]`}:{value:0},y:o!==void 0?{signal:`${a}[0]`}:{value:0},x2:r!==void 0?{signal:`${s}[1]`}:{field:{group:"width"}},y2:o!==void 0?{signal:`${a}[1]`}:{field:{group:"height"}}};if(t.resolve==="global")for(const m of B(l))l[m]=[{test:`${u}.length && ${u}[0].unit === ${Ks(e)}`,...l[m]},{value:0}];const{fill:c,fillOpacity:f,cursor:d,...h}=t.mark,p=B(h).reduce((m,y)=>(m[y]=[{test:[r!==void 0&&`${s}[0] !== ${s}[1]`,o!==void 0&&`${a}[0] !== ${a}[1]`].filter(v=>v).join(" && "),value:h[y]},{value:null}],m),{}),g=d??(t.translate?"move":null);return[{name:`${i+mu}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:c},fillOpacity:{value:f}},update:l}},...n,{name:i+mu,type:"rect",clip:!0,encode:{enter:{...g?{cursor:{value:g}}:{},fill:{value:"transparent"}},update:{...l,...p}}}]}};function Jae(e,t,n,i){const r=!e.hasProjection,o=n.channel,s=n.signals.visual,a=H(r?e.scaleName(o):e.projectionName()),u=d=>`scale(${a}, ${d})`,l=e.getSizeSignalRef(o===He?"width":"height").signal,c=`${o}(unit)`,f=t.events.reduce((d,h)=>[...d,{events:h.between[0],update:`[${c}, ${c}]`},{events:h,update:`[${s}[0], clamp(${c}, 0, ${l})]`}],[]);if(r){const d=n.signals.data,h=Yr.defined(t),p=e.getScaleComponent(o),g=p?p.get("type"):void 0,m=i?{init:ya(i,!0,u)}:{value:[]};return f.push({events:{signal:t.name+c4},update:Un(g)?`[${u(`${d}[0]`)}, ${u(`${d}[1]`)}]`:"[0, 0]"}),h?[{name:d,on:[]}]:[{name:s,...m,on:f},{name:d,...i?{init:ya(i)}:{},on:[{events:{signal:s},update:`${s}[0] === ${s}[1] ? null : invert(${a}, ${s})`}]}]}else{const d=o===He?0:1,h=t.name+f4,p=i?{init:`[${h}[0][${d}], ${h}[1][${d}]]`}:{value:[]};return[{name:s,...p,on:f}]}}const Qae={defined:e=>e.type==="point",signals:(e,t,n)=>{const i=t.name,r=i+nd,o=t.project,s="(item().isVoronoi ? datum.datum : datum)",a=kt(e.component.selection??{}).reduce((f,d)=>d.type==="interval"?f.concat(d.name+mu):f,[]).map(f=>`indexof(item().mark.name, '${f}') < 0`).join(" && "),u=`datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0${a?` && ${a}`:""}`;let l=`unit: ${Ks(e)}, `;if(t.project.hasSelectionId)l+=`${Mi}: ${s}[${H(Mi)}]`;else{const f=o.items.map(d=>{const h=e.fieldDef(d.channel);return h!=null&&h.bin?`[${s}[${H(e.vgField(d.channel,{}))}], ${s}[${H(e.vgField(d.channel,{binSuffix:"end"}))}]]`:`${s}[${H(d.field)}]`}).join(", ");l+=`fields: ${r}, values: [${f}]`}const c=t.events;return n.concat([{name:i+Qo,on:c?[{events:c,update:`${u} ? {${l}} : null`,force:!0}]:[]}])}};function vl(e,t,n,i){const r=Fm(t)&&t.condition,o=i(t);if(r){const a=Y(r).map(u=>{const l=i(u);if(joe(u)){const{param:c,empty:f}=u;return{test:F4(e,{param:c,empty:f}),...l}}else return{test:Gp(e,u.test),...l}});return{[n]:[...a,...o!==void 0?[o]:[]]}}else return o!==void 0?{[n]:o}:{}}function jE(e,t="text"){const n=e.encoding[t];return vl(e,n,t,i=>Bm(i,e.config))}function Bm(e,t,n="datum"){if(e){if(Fi(e))return je(e.value);if(ue(e)){const{format:i,formatType:r}=zp(e);return wE({fieldOrDatumDef:e,format:i,formatType:r,expr:n,config:t})}}}function d4(e,t={}){const{encoding:n,markDef:i,config:r,stack:o}=e,s=n.tooltip;if(P(s))return{tooltip:Bk({tooltip:s},o,r,t)};{const a=t.reactiveGeom?"datum.datum":"datum";return vl(e,s,"tooltip",u=>{const l=Bm(u,r,a);if(l)return l;if(u===null)return;let c=Fe("tooltip",i,r);if(c===!0&&(c={content:"encoding"}),X(c))return{value:c};if(V(c))return Q(c)?c:c.content==="encoding"?Bk(n,o,r,t):{signal:a}})}}function h4(e,t,n,{reactiveGeom:i}={}){const r={...n,...n.tooltipFormat},o={},s=i?"datum.datum":"datum",a=[];function u(c,f){const d=Ta(f),h=un(c)?c:{...c,type:e[d].type},p=h.title||$E(h,r),g=Y(p).join(", ").replaceAll(/"/g,'\\"');let m;if(et(f)){const y=f==="x"?"x2":"y2",v=cr(e[y]);if(_t(h.bin)&&v){const b=G(h,{expr:s}),x=G(v,{expr:s}),{format:w,formatType:_}=zp(h);m=Jf(b,x,w,_,r),o[y]=!0}}if((et(f)||f===ai||f===Ri)&&t&&t.fieldChannel===f&&t.offset==="normalize"){const{format:y,formatType:v}=zp(h);m=wE({fieldOrDatumDef:h,format:y,formatType:v,expr:s,config:r,normalizeStack:!0}).signal}m??(m=Bm(h,r,s).signal),a.push({channel:f,key:g,value:m})}CE(e,(c,f)=>{j(c)?u(c,f):Mm(c)&&u(c.condition,f)});const l={};for(const{channel:c,key:f,value:d}of a)!o[c]&&!l[f]&&(l[f]=d);return l}function Bk(e,t,n,{reactiveGeom:i}={}){const r=h4(e,t,n,{reactiveGeom:i}),o=Yo(r).map(([s,a])=>`"${s}": ${a}`);return o.length>0?{signal:`{${o.join(", ")}}`}:void 0}function Zae(e){const{markDef:t,config:n}=e,i=Fe("aria",t,n);return i===!1?{}:{...i?{aria:i}:{},...eue(e),...tue(e)}}function eue(e){const{mark:t,markDef:n,config:i}=e;if(i.aria===!1)return{};const r=Fe("ariaRoleDescription",n,i);return r!=null?{ariaRoleDescription:{value:r}}:t in Mie?{}:{ariaRoleDescription:{value:t}}}function tue(e){const{encoding:t,markDef:n,config:i,stack:r}=e,o=t.description;if(o)return vl(e,o,"description",u=>Bm(u,e.config));const s=Fe("description",n,i);if(s!=null)return{description:je(s)};if(i.aria===!1)return{};const a=h4(t,r,i);if(!Oe(a))return{description:{signal:Yo(a).map(([u,l],c)=>`"${c>0?"; ":""}${u}: " + (${l})`).join(" + ")}}}function dt(e,t,n={}){const{markDef:i,encoding:r,config:o}=t,{vgChannel:s}=n;let{defaultRef:a,defaultValue:u}=n;a===void 0&&(u??(u=Fe(e,i,o,{vgChannel:s,ignoreVgConfig:!0})),u!==void 0&&(a=je(u)));const l=r[e];return vl(t,l,s??e,c=>xE({channel:e,channelDef:c,markDef:i,config:o,scaleName:t.scaleName(e),scale:t.getScaleComponent(e),stack:null,defaultRef:a}))}function p4(e,t={filled:void 0}){const{markDef:n,encoding:i,config:r}=e,{type:o}=n,s=t.filled??Fe("filled",n,r),a=ve(["bar","point","circle","square","geoshape"],o)?"transparent":void 0,u=Fe(s===!0?"color":void 0,n,r,{vgChannel:"fill"})??r.mark[s===!0&&"color"]??a,l=Fe(s===!1?"color":void 0,n,r,{vgChannel:"stroke"})??r.mark[s===!1&&"color"],c=s?"fill":"stroke",f={...u?{fill:je(u)}:{},...l?{stroke:je(l)}:{}};return n.color&&(s?n.fill:n.stroke)&&U(TR("property",{fill:"fill"in n,stroke:"stroke"in n})),{...f,...dt("color",e,{vgChannel:c,defaultValue:s?u:l}),...dt("fill",e,{defaultValue:i.fill?u:void 0}),...dt("stroke",e,{defaultValue:i.stroke?l:void 0})}}function nue(e){const{encoding:t,mark:n}=e,i=t.order;return!ps(n)&&Fi(i)?vl(e,i,"zindex",r=>je(r.value)):{}}function Vu({channel:e,markDef:t,encoding:n={},model:i,bandPosition:r}){const o=`${e}Offset`,s=t[o],a=n[o];if((o==="xOffset"||o==="yOffset")&&a)return{offsetType:"encoding",offset:xE({channel:o,channelDef:a,markDef:t,config:i==null?void 0:i.config,scaleName:i.scaleName(o),scale:i.getScaleComponent(o),stack:null,defaultRef:je(s),bandPosition:r})};const u=t[o];return u?{offsetType:"visual",offset:u}:{}}function It(e,t,{defaultPos:n,vgChannel:i}){const{encoding:r,markDef:o,config:s,stack:a}=t,u=r[e],l=r[wr(e)],c=t.scaleName(e),f=t.getScaleComponent(e),{offset:d,offsetType:h}=Vu({channel:e,markDef:o,encoding:r,model:t,bandPosition:.5}),p=qE({model:t,defaultPos:n,channel:e,scaleName:c,scale:f}),g=!u&&et(e)&&(r.latitude||r.longitude)?{field:t.getName(e)}:iue({channel:e,channelDef:u,channel2Def:l,markDef:o,config:s,scaleName:c,scale:f,stack:a,offset:d,defaultRef:p,bandPosition:h==="encoding"?0:void 0});return g?{[i||e]:g}:void 0}function iue(e){const{channel:t,channelDef:n,scaleName:i,stack:r,offset:o,markDef:s}=e;if(ue(n)&&r&&t===r.fieldChannel){if(j(n)){let a=n.bandPosition;if(a===void 0&&s.type==="text"&&(t==="radius"||t==="theta")&&(a=.5),a!==void 0)return Lp({scaleName:i,fieldOrDatumDef:n,startSuffix:"start",bandPosition:a,offset:o})}return Xs(n,i,{suffix:"end"},{offset:o})}return vE(e)}function qE({model:e,defaultPos:t,channel:n,scaleName:i,scale:r}){const{markDef:o,config:s}=e;return()=>{const a=Ta(n),u=Xo(n),l=Fe(n,o,s,{vgChannel:u});if(l!==void 0)return Dc(n,l);switch(t){case"zeroOrMin":case"zeroOrMax":if(i){const c=r.get("type");if(!ve([vn.LOG,vn.TIME,vn.UTC],c)){if(r.domainDefinitelyIncludesZero())return{scale:i,value:0}}}if(t==="zeroOrMin")return a==="y"?{field:{group:"height"}}:{value:0};switch(a){case"radius":return{signal:`min(${e.width.signal},${e.height.signal})/2`};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":return{...e[Sn(n)],mult:.5}}}}const rue={left:"x",center:"xc",right:"x2"},oue={top:"y",middle:"yc",bottom:"y2"};function g4(e,t,n,i="middle"){if(e==="radius"||e==="theta")return Xo(e);const r=e==="x"?"align":"baseline",o=Fe(r,t,n);let s;return Q(o)?(U(ure(r)),s=void 0):s=o,e==="x"?rue[s||(i==="top"?"left":"center")]:oue[s||i]}function Wp(e,t,{defaultPos:n,defaultPos2:i,range:r}){return r?m4(e,t,{defaultPos:n,defaultPos2:i}):It(e,t,{defaultPos:n})}function m4(e,t,{defaultPos:n,defaultPos2:i}){const{markDef:r,config:o}=t,s=wr(e),a=Sn(e),u=sue(t,i,s),l=u[a]?g4(e,r,o):Xo(e);return{...It(e,t,{defaultPos:n,vgChannel:l}),...u}}function sue(e,t,n){const{encoding:i,mark:r,markDef:o,stack:s,config:a}=e,u=Ta(n),l=Sn(n),c=Xo(n),f=i[u],d=e.scaleName(u),h=e.getScaleComponent(u),{offset:p}=n in i||n in o?Vu({channel:n,markDef:o,encoding:i,model:e}):Vu({channel:u,markDef:o,encoding:i,model:e});if(!f&&(n==="x2"||n==="y2")&&(i.latitude||i.longitude)){const m=Sn(n),y=e.markDef[m];return y!=null?{[m]:{value:y}}:{[c]:{field:e.getName(n)}}}const g=aue({channel:n,channelDef:f,channel2Def:i[n],markDef:o,config:a,scaleName:d,scale:h,stack:s,offset:p,defaultRef:void 0});return g!==void 0?{[c]:g}:Rd(n,o)||Rd(n,{[n]:Np(n,o,a.style),[l]:Np(l,o,a.style)})||Rd(n,a[r])||Rd(n,a.mark)||{[c]:qE({model:e,defaultPos:t,channel:n,scaleName:d,scale:h})()}}function aue({channel:e,channelDef:t,channel2Def:n,markDef:i,config:r,scaleName:o,scale:s,stack:a,offset:u,defaultRef:l}){return ue(t)&&a&&e.charAt(0)===a.fieldChannel.charAt(0)?Xs(t,o,{suffix:"start"},{offset:u}):vE({channel:e,channelDef:n,scaleName:o,scale:s,stack:a,markDef:i,config:r,offset:u,defaultRef:l})}function Rd(e,t){const n=Sn(e),i=Xo(e);if(t[i]!==void 0)return{[i]:Dc(e,t[i])};if(t[e]!==void 0)return{[i]:Dc(e,t[e])};if(t[n]){const r=t[n];if(ga(r))U(nre(n));else return{[n]:Dc(e,r)}}}function Jo(e,t){const{config:n,encoding:i,markDef:r}=e,o=r.type,s=wr(t),a=Sn(t),u=i[t],l=i[s],c=e.getScaleComponent(t),f=c?c.get("type"):void 0,d=r.orient,h=i[a]??i.size??Fe("size",r,n,{vgChannel:a}),p=pR(t),g=o==="bar"&&(t==="x"?d==="vertical":d==="horizontal");return j(u)&&(Be(u.bin)||_t(u.bin)||u.timeUnit&&!l)&&!(h&&!ga(h))&&!i[p]&&!bt(f)?cue({fieldDef:u,fieldDef2:l,channel:t,model:e}):(ue(u)&&bt(f)||g)&&!l?lue(u,t,e):m4(t,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"})}function uue(e,t,n,i,r,o,s){if(ga(r))if(n){const u=n.get("type");if(u==="band"){let l=`bandwidth('${t}')`;r.band!==1&&(l=`${r.band} * ${l}`);const c=Zr("minBandSize",{type:s},i);return{signal:c?`max(${wi(c)}, ${l})`:l}}else r.band!==1&&(U(dre(u)),r=void 0)}else return{mult:r.band,field:{group:e}};else{if(Q(r))return r;if(r)return{value:r}}if(n){const u=n.get("range");if(hs(u)&&Ee(u.step))return{value:u.step-2}}if(!o){const{bandPaddingInner:u,barBandPaddingInner:l,rectBandPaddingInner:c}=i.scale,f=Ze(u,s==="bar"?l:c);if(Q(f))return{signal:`(1 - (${f.signal})) * ${e}`};if(Ee(f))return{signal:`${1-f} * ${e}`}}return{value:jp(i.view,e)-2}}function lue(e,t,n){var $,F;const{markDef:i,encoding:r,config:o,stack:s}=n,a=i.orient,u=n.scaleName(t),l=n.getScaleComponent(t),c=Sn(t),f=wr(t),d=pR(t),h=n.scaleName(d),p=n.getScaleComponent(Vw(t)),g=a==="horizontal"&&t==="y"||a==="vertical"&&t==="x";let m;(r.size||i.size)&&(g?m=dt("size",n,{vgChannel:c,defaultRef:je(i.size)}):U(mre(i.type)));const y=!!m,v=d6({channel:t,fieldDef:e,markDef:i,config:o,scaleType:($=l||p)==null?void 0:$.get("type"),useVlSizeChannel:g});m=m||{[c]:uue(c,h||u,p||l,o,v,!!e,i.type)};const b=((F=l||p)==null?void 0:F.get("type"))==="band"&&ga(v)&&!y?"top":"middle",x=g4(t,i,o,b),w=x==="xc"||x==="yc",{offset:_,offsetType:E}=Vu({channel:t,markDef:i,encoding:r,model:n,bandPosition:w?.5:0}),S=vE({channel:t,channelDef:e,markDef:i,config:o,scaleName:u,scale:l,stack:s,offset:_,defaultRef:qE({model:n,defaultPos:"mid",channel:t,scaleName:u,scale:l}),bandPosition:w?E==="encoding"?0:.5:Q(v)?{signal:`(1-${v})/2`}:ga(v)?(1-v.band)/2:0});if(c)return{[x]:S,...m};{const k=Xo(f),N=m[c],A=_?{...N,offset:_}:N;return{[x]:S,[k]:P(S)?[S[0],{...S[1],offset:A}]:{...S,offset:A}}}}function Uk(e,t,n,i,r,o,s){if(uR(e))return 0;const a=e==="x"||e==="y2",u=a?-t/2:t/2;if(Q(n)||Q(r)||Q(i)||o){const l=wi(n),c=wi(r),f=wi(i),d=wi(o),p=o?`(${s} < ${d} ? ${a?"":"-"}0.5 * (${d} - (${s})) : ${u})`:u,g=f?`${f} + `:"",m=l?`(${l} ? -1 : 1) * `:"",y=c?`(${c} + ${p})`:p;return{signal:g+m+y}}else return r=r||0,i+(n?-r-u:+r+u)}function cue({fieldDef:e,fieldDef2:t,channel:n,model:i}){var F;const{config:r,markDef:o,encoding:s}=i,a=i.getScaleComponent(n),u=i.scaleName(n),l=a?a.get("type"):void 0,c=a.get("reverse"),f=d6({channel:n,fieldDef:e,markDef:o,config:r,scaleType:l}),d=(F=i.component.axes[n])==null?void 0:F[0],h=(d==null?void 0:d.get("translate"))??.5,p=et(n)?Fe("binSpacing",o,r)??0:0,g=wr(n),m=Xo(n),y=Xo(g),v=Zr("minBandSize",o,r),{offset:b}=Vu({channel:n,markDef:o,encoding:s,model:i,bandPosition:0}),{offset:x}=Vu({channel:g,markDef:o,encoding:s,model:i,bandPosition:0}),w=Poe({fieldDef:e,scaleName:u}),_=Uk(n,p,c,h,b,v,w),E=Uk(g,p,c,h,x??b,v,w),S=Q(f)?{signal:`(1-${f.signal})/2`}:ga(f)?(1-f.band)/2:.5,$=Vo({fieldDef:e,fieldDef2:t,markDef:o,config:r});if(Be(e.bin)||e.timeUnit){const k=e.timeUnit&&$!==.5;return{[y]:jk({fieldDef:e,scaleName:u,bandPosition:S,offset:E,useRectOffsetField:k}),[m]:jk({fieldDef:e,scaleName:u,bandPosition:Q(S)?{signal:`1-${S.signal}`}:1-S,offset:_,useRectOffsetField:k})}}else if(_t(e.bin)){const k=Xs(e,u,{},{offset:E});if(j(t))return{[y]:k,[m]:Xs(t,u,{},{offset:_})};if(Da(e.bin)&&e.bin.step)return{[y]:k,[m]:{signal:`scale("${u}", ${G(e,{expr:"datum"})} + ${e.bin.step})`,offset:_}}}U(OR(g))}function jk({fieldDef:e,scaleName:t,bandPosition:n,offset:i,useRectOffsetField:r}){return Lp({scaleName:t,fieldOrDatumDef:e,bandPosition:n,offset:i,...r?{startSuffix:Im,endSuffix:zm}:{}})}const fue=new Set(["aria","width","height"]);function ui(e,t){const{fill:n=void 0,stroke:i=void 0}=t.color==="include"?p4(e):{};return{...due(e.markDef,t),...qk(e,"fill",n),...qk(e,"stroke",i),...dt("opacity",e),...dt("fillOpacity",e),...dt("strokeOpacity",e),...dt("strokeWidth",e),...dt("strokeDash",e),...nue(e),...d4(e),...jE(e,"href"),...Zae(e)}}function qk(e,t,n){const{config:i,mark:r,markDef:o}=e;if(Fe("invalid",o,i)==="hide"&&n&&!ps(r)){const a=hue(e,{invalid:!0,channels:bm});if(a)return{[t]:[{test:a,value:null},...Y(n)]}}return n?{[t]:n}:{}}function due(e,t){return Fie.reduce((n,i)=>(!fue.has(i)&&e[i]!==void 0&&t[i]!=="ignore"&&(n[i]=je(e[i])),n),{})}function hue(e,{invalid:t=!1,channels:n}){const i=n.reduce((o,s)=>{const a=e.getScaleComponent(s);if(a){const u=a.get("type"),l=e.vgField(s,{expr:"datum"});l&&Un(u)&&(o[l]=!0)}return o},{}),r=B(i);if(r.length>0){const o=t?"||":"&&";return r.map(s=>bE(s,t)).join(` ${o} `)}}function WE(e){const{config:t,markDef:n}=e;if(Fe("invalid",n,t)){const r=pue(e,{channels:Er});if(r)return{defined:{signal:r}}}return{}}function pue(e,{invalid:t=!1,channels:n}){const i=n.reduce((o,s)=>{var u;const a=e.getScaleComponent(s);if(a){const l=a.get("type"),c=e.vgField(s,{expr:"datum",binSuffix:(u=e.stack)!=null&&u.impute?"mid":void 0});c&&Un(l)&&(o[c]=!0)}return o},{}),r=B(i);if(r.length>0){const o=t?"||":"&&";return r.map(s=>bE(s,t)).join(` ${o} `)}}function Wk(e,t){if(t!==void 0)return{[e]:je(t)}}const m1="voronoi",y4={defined:e=>e.type==="point"&&e.nearest,parse:(e,t)=>{if(t.events)for(const n of t.events)n.markname=e.getName(m1)},marks:(e,t,n)=>{const{x:i,y:r}=t.project.hasChannel,o=e.mark;if(ps(o))return U(Rie(o)),n;const s={name:e.getName(m1),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:{fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0},...d4(e,{reactiveGeom:!0})}},transform:[{type:"voronoi",x:{expr:i||!r?"datum.datum.x || 0":"0"},y:{expr:r||!i?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]};let a=0,u=!1;return n.forEach((l,c)=>{const f=l.name??"";f===e.component.mark[0].name?a=c:f.indexOf(m1)>=0&&(u=!0)}),u||n.splice(a+1,0,s),n}},v4={defined:e=>e.type==="point"&&e.resolve==="global"&&e.bind&&e.bind!=="scales"&&!OE(e.bind),parse:(e,t,n)=>A4(t,n),topLevelSignals:(e,t,n)=>{const i=t.name,r=t.project,o=t.bind,s=t.init&&t.init[0],a=y4.defined(t)?"(item().isVoronoi ? datum.datum : datum)":"datum";return r.items.forEach((u,l)=>{const c=We(`${i}_${u.field}`);n.filter(d=>d.name===c).length||n.unshift({name:c,...s?{init:ya(s[l])}:{value:null},on:t.events?[{events:t.events,update:`datum && item().mark.marktype !== 'group' ? ${a}[${H(u.field)}] : null`}]:[],bind:o[u.field]??o[u.channel]??o})}),n},signals:(e,t,n)=>{const i=t.name,r=t.project,o=n.filter(l=>l.name===i+Qo)[0],s=i+nd,a=r.items.map(l=>We(`${i}_${l.field}`)),u=a.map(l=>`${l} !== null`).join(" && ");return a.length&&(o.update=`${u} ? {fields: ${s}, values: [${a.join(", ")}]} : null`),delete o.value,delete o.on,n}},Hp="_toggle",b4={defined:e=>e.type==="point"&&!!e.toggle,signals:(e,t,n)=>n.concat({name:t.name+Hp,value:!1,on:[{events:t.events,update:t.toggle}]}),modifyExpr:(e,t)=>{const n=t.name+Qo,i=t.name+Hp;return`${i} ? null : ${n}, `+(t.resolve==="global"?`${i} ? null : true, `:`${i} ? null : {unit: ${Ks(e)}}, `)+`${i} ? ${n} : null`}},gue={defined:e=>e.clear!==void 0&&e.clear!==!1,parse:(e,t)=>{t.clear&&(t.clear=X(t.clear)?ss(t.clear,"view"):t.clear)},topLevelSignals:(e,t,n)=>{if(v4.defined(t))for(const i of t.project.items){const r=n.findIndex(o=>o.name===We(`${t.name}_${i.field}`));r!==-1&&n[r].on.push({events:t.clear,update:"null"})}return n},signals:(e,t,n)=>{function i(r,o){r!==-1&&n[r].on&&n[r].on.push({events:t.clear,update:o})}if(t.type==="interval")for(const r of t.project.items){const o=n.findIndex(s=>s.name===r.signals.visual);if(i(o,"[0, 0]"),o===-1){const s=n.findIndex(a=>a.name===r.signals.data);i(s,"null")}}else{let r=n.findIndex(o=>o.name===t.name+Qo);i(r,"null"),b4.defined(t)&&(r=n.findIndex(o=>o.name===t.name+Hp),i(r,"false"))}return n}},x4={defined:e=>{const t=e.resolve==="global"&&e.bind&&OE(e.bind),n=e.project.items.length===1&&e.project.items[0].field!==Mi;return t&&!n&&U(zie),t&&n},parse:(e,t,n)=>{const i=ae(n);if(i.select=X(i.select)?{type:i.select,toggle:t.toggle}:{...i.select,toggle:t.toggle},A4(t,i),V(n.select)&&(n.select.on||n.select.clear)){const s='event.item && indexof(event.item.mark.role, "legend") < 0';for(const a of t.events)a.filter=Y(a.filter??[]),a.filter.includes(s)||a.filter.push(s)}const r=d1(t.bind)?t.bind.legend:"click",o=X(r)?ss(r,"view"):Y(r);t.bind={legend:{merge:o}}},topLevelSignals:(e,t,n)=>{const i=t.name,r=d1(t.bind)&&t.bind.legend,o=s=>a=>{const u=ae(a);return u.markname=s,u};for(const s of t.project.items){if(!s.hasLegend)continue;const a=`${We(s.field)}_legend`,u=`${i}_${a}`;if(n.filter(c=>c.name===u).length===0){const c=r.merge.map(o(`${a}_symbols`)).concat(r.merge.map(o(`${a}_labels`))).concat(r.merge.map(o(`${a}_entries`)));n.unshift({name:u,...t.init?{}:{value:null},on:[{events:c,update:"isDefined(datum.value) ? datum.value : item().items[0].items[0].datum.value",force:!0},{events:r.merge,update:`!event.item || !datum ? null : ${u}`,force:!0}]})}}return n},signals:(e,t,n)=>{const i=t.name,r=t.project,o=n.find(d=>d.name===i+Qo),s=i+nd,a=r.items.filter(d=>d.hasLegend).map(d=>We(`${i}_${We(d.field)}_legend`)),l=`${a.map(d=>`${d} !== null`).join(" && ")} ? {fields: ${s}, values: [${a.join(", ")}]} : null`;t.events&&a.length>0?o.on.push({events:a.map(d=>({signal:d})),update:l}):a.length>0&&(o.update=l,delete o.value,delete o.on);const c=n.find(d=>d.name===i+Hp),f=d1(t.bind)&&t.bind.legend;return c&&(t.events?c.on.push({...c.on[0],events:f}):c.on[0].events=f),n}};function mue(e,t,n){var r;const i=(r=e.fieldDef(t))==null?void 0:r.field;for(const o of kt(e.component.selection??{})){const s=o.project.hasField[i]??o.project.hasChannel[t];if(s&&x4.defined(o)){const a=n.get("selections")??[];a.push(o.name),n.set("selections",a,!1),s.hasLegend=!0}}}const w4="_translate_anchor",E4="_translate_delta",yue={defined:e=>e.type==="interval"&&e.translate,signals:(e,t,n)=>{const i=t.name,r=Yr.defined(t),o=i+w4,{x:s,y:a}=t.project.hasChannel;let u=ss(t.translate,"scope");return r||(u=u.map(l=>(l.between[0].markname=i+mu,l))),n.push({name:o,value:{},on:[{events:u.map(l=>l.between[0]),update:"{x: x(unit), y: y(unit)"+(s!==void 0?`, extent_x: ${r?Tv(e,He):`slice(${s.signals.visual})`}`:"")+(a!==void 0?`, extent_y: ${r?Tv(e,wt):`slice(${a.signals.visual})`}`:"")+"}"}]},{name:i+E4,value:{},on:[{events:u,update:`{x: ${o}.x - x(unit), y: ${o}.y - y(unit)}`}]}),s!==void 0&&Hk(e,t,s,"width",n),a!==void 0&&Hk(e,t,a,"height",n),n}};function Hk(e,t,n,i,r){const o=t.name,s=o+w4,a=o+E4,u=n.channel,l=Yr.defined(t),c=r.filter(w=>w.name===n.signals[l?"data":"visual"])[0],f=e.getSizeSignalRef(i).signal,d=e.getScaleComponent(u),h=d&&d.get("type"),p=d&&d.get("reverse"),g=l?u===He?p?"":"-":p?"-":"":"",m=`${s}.extent_${u}`,y=`${g}${a}.${u} / ${l?`${f}`:`span(${m})`}`,v=!l||!d?"panLinear":h==="log"?"panLog":h==="symlog"?"panSymlog":h==="pow"?"panPow":"panLinear",b=l?h==="pow"?`, ${d.get("exponent")??1}`:h==="symlog"?`, ${d.get("constant")??1}`:"":"",x=`${v}(${m}, ${y}${b})`;c.on.push({events:{signal:a},update:l?x:`clampRange(${x}, 0, ${f})`})}const _4="_zoom_anchor",S4="_zoom_delta",vue={defined:e=>e.type==="interval"&&e.zoom,signals:(e,t,n)=>{const i=t.name,r=Yr.defined(t),o=i+S4,{x:s,y:a}=t.project.hasChannel,u=H(e.scaleName(He)),l=H(e.scaleName(wt));let c=ss(t.zoom,"scope");return r||(c=c.map(f=>(f.markname=i+mu,f))),n.push({name:i+_4,on:[{events:c,update:r?"{"+[u?`x: invert(${u}, x(unit))`:"",l?`y: invert(${l}, y(unit))`:""].filter(f=>f).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:o,on:[{events:c,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),s!==void 0&&Gk(e,t,s,"width",n),a!==void 0&&Gk(e,t,a,"height",n),n}};function Gk(e,t,n,i,r){const o=t.name,s=n.channel,a=Yr.defined(t),u=r.filter(v=>v.name===n.signals[a?"data":"visual"])[0],l=e.getSizeSignalRef(i).signal,c=e.getScaleComponent(s),f=c&&c.get("type"),d=a?Tv(e,s):u.name,h=o+S4,p=`${o}${_4}.${s}`,g=!a||!c?"zoomLinear":f==="log"?"zoomLog":f==="symlog"?"zoomSymlog":f==="pow"?"zoomPow":"zoomLinear",m=a?f==="pow"?`, ${c.get("exponent")??1}`:f==="symlog"?`, ${c.get("constant")??1}`:"":"",y=`${g}(${d}, ${p}, ${h}${m})`;u.on.push({events:{signal:h},update:a?y:`clampRange(${y}, 0, ${l})`})}const va="_store",Qo="_tuple",bue="_modify",$4="vlSelectionResolve",Um=[Qae,Kae,Xae,b4,v4,Yr,x4,gue,yue,vue,y4];function xue(e){let t=e.parent;for(;t&&!Ln(t);)t=t.parent;return t}function Ks(e,{escape:t}={escape:!0}){let n=t?H(e.name):e.name;const i=xue(e);if(i){const{facet:r}=i;for(const o of Kn)r[o]&&(n+=` + '__facet_${o}_' + (facet[${H(i.vgField(o))}])`)}return n}function HE(e){return kt(e.component.selection??{}).reduce((t,n)=>t||n.project.hasSelectionId,!1)}function A4(e,t){(X(t.select)||!t.select.on)&&delete e.events,(X(t.select)||!t.select.clear)&&delete e.clear,(X(t.select)||!t.select.toggle)&&delete e.toggle}function Dv(e){const t=[];return e.type==="Identifier"?[e.name]:e.type==="Literal"?[e.value]:(e.type==="MemberExpression"&&(t.push(...Dv(e.object)),t.push(...Dv(e.property))),t)}function k4(e){return e.object.type==="MemberExpression"?k4(e.object):e.object.name==="datum"}function C4(e){const t=cw(e),n=new Set;return t.visit(i=>{i.type==="MemberExpression"&&k4(i)&&n.add(Dv(i).slice(1).join("."))}),n}class bl extends Ne{clone(){return new bl(null,this.model,ae(this.filter))}constructor(t,n,i){super(t),this.model=n,this.filter=i,this.expr=Gp(this.model,this.filter,this),this._dependentFields=C4(this.expr)}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function wue(e,t){const n={},i=e.config.selection;if(!t||!t.length)return n;for(const r of t){const o=We(r.name),s=r.select,a=X(s)?s:s.type,u=V(s)?ae(s):{type:a},l=i[a];for(const d in l)d==="fields"||d==="encodings"||(d==="mark"&&(u[d]={...l[d],...u[d]}),(u[d]===void 0||u[d]===!0)&&(u[d]=ae(l[d]??u[d])));const c=n[o]={...u,name:o,type:a,init:r.value,bind:r.bind,events:X(u.on)?ss(u.on,"scope"):Y(ae(u.on))},f=ae(r);for(const d of Um)d.defined(c)&&d.parse&&d.parse(e,c,f)}return n}function F4(e,t,n,i="datum"){const r=X(t)?t:t.param,o=We(r),s=H(o+va);let a;try{a=e.getSelectionComponent(o,r)}catch{return`!!${o}`}if(a.project.timeUnit){const d=n??e.component.data.raw,h=a.project.timeUnit.clone();d.parent?h.insertAsParentOf(d):d.parent=h}const u=a.project.hasSelectionId?"vlSelectionIdTest(":"vlSelectionTest(",l=a.resolve==="global"?")":`, ${H(a.resolve)})`,c=`${u}${s}, ${i}${l}`,f=`length(data(${s}))`;return t.empty===!1?`${f} && ${c}`:`!${f} || ${c}`}function M4(e,t,n){const i=We(t),r=n.encoding;let o=n.field,s;try{s=e.getSelectionComponent(i,t)}catch{return i}if(!r&&!o)o=s.project.items[0].field,s.project.items.length>1&&U(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${H(o)}.`);else if(r&&!o){const a=s.project.items.filter(u=>u.channel===r);!a.length||a.length>1?(o=s.project.items[0].field,U((a.length?"Multiple ":"No ")+`matching ${H(r)} encoding found for selection ${H(n.param)}. Using "field": ${H(o)}.`)):o=a[0].field}return`${s.name}[${H(ri(o))}]`}function Eue(e,t){for(const[n,i]of Yo(e.component.selection??{})){const r=e.getName(`lookup_${n}`);e.component.data.outputNodes[r]=i.materialized=new on(new bl(t,e,{param:n}),r,ze.Lookup,e.component.data.outputNodeRefCounts)}}function Gp(e,t,n){return Tc(t,i=>X(i)?i:Zre(i)?F4(e,i,n):GR(i))}function _ue(e,t){if(e)return P(e)&&!vo(e)?e.map(n=>$E(n,t)).join(", "):e}function y1(e,t,n,i){var r,o;e.encode??(e.encode={}),(r=e.encode)[t]??(r[t]={}),(o=e.encode[t]).update??(o.update={}),e.encode[t].update[n]=i}function yc(e,t,n,i={header:!1}){var f,d;const{disable:r,orient:o,scale:s,labelExpr:a,title:u,zindex:l,...c}=e.combine();if(!r){for(const h in c){const p=nse[h],g=c[h];if(p&&p!==t&&p!=="both")delete c[h];else if(td(g)){const{condition:m,...y}=g,v=Y(m),b=xk[h];if(b){const{vgProp:x,part:w}=b,_=[...v.map(E=>{const{test:S,...$}=E;return{test:Gp(null,S),...$}}),y];y1(c,w,x,_),delete c[h]}else if(b===null){const x={signal:v.map(w=>{const{test:_,...E}=w;return`${Gp(null,_)} ? ${rk(E)} : `}).join("")+rk(y)};c[h]=x}}else if(Q(g)){const m=xk[h];if(m){const{vgProp:y,part:v}=m;y1(c,v,y,g),delete c[h]}}ve(["labelAlign","labelBaseline"],h)&&c[h]===null&&delete c[h]}if(t==="grid"){if(!c.grid)return;if(c.encode){const{grid:h}=c.encode;c.encode={...h?{grid:h}:{}},Oe(c.encode)&&delete c.encode}return{scale:s,orient:o,...c,domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:Ze(l,0)}}else{if(!i.header&&e.mainExtracted)return;if(a!==void 0){let p=a;(d=(f=c.encode)==null?void 0:f.labels)!=null&&d.update&&Q(c.encode.labels.update.text)&&(p=fa(a,"datum.label",c.encode.labels.update.text.signal)),y1(c,"labels","text",{signal:p})}if(c.labelAlign===null&&delete c.labelAlign,c.encode){for(const p of E6)e.hasAxisPart(p)||delete c.encode[p];Oe(c.encode)&&delete c.encode}const h=_ue(u,n);return{scale:s,orient:o,grid:!1,...h?{title:h}:{},...c,...n.aria===!1?{aria:!1}:{},zindex:Ze(l,0)}}}}function T4(e){const{axes:t}=e.component,n=[];for(const i of Er)if(t[i]){for(const r of t[i])if(!r.get("disable")&&!r.get("gridScale")){const o=i==="x"?"height":"width",s=e.getSizeSignalRef(o).signal;o!==s&&n.push({name:o,update:s})}}return n}function Sue(e,t){const{x:n=[],y:i=[]}=e;return[...n.map(r=>yc(r,"grid",t)),...i.map(r=>yc(r,"grid",t)),...n.map(r=>yc(r,"main",t)),...i.map(r=>yc(r,"main",t))].filter(r=>r)}function Yk(e,t,n,i){return Object.assign.apply(null,[{},...e.map(r=>{if(r==="axisOrient"){const o=n==="x"?"bottom":"left",s=t[n==="x"?"axisBottom":"axisLeft"]||{},a=t[n==="x"?"axisTop":"axisRight"]||{},u=new Set([...B(s),...B(a)]),l={};for(const c of u.values())l[c]={signal:`${i.signal} === "${o}" ? ${wi(s[c])} : ${wi(a[c])}`};return l}return t[r]})])}function $ue(e,t,n,i){const r=t==="band"?["axisDiscrete","axisBand"]:t==="point"?["axisDiscrete","axisPoint"]:KR(t)?["axisQuantitative"]:t==="time"||t==="utc"?["axisTemporal"]:[],o=e==="x"?"axisX":"axisY",s=Q(n)?"axisOrient":`axis${Hf(n)}`,a=[...r,...r.map(l=>o+l.substr(4))],u=["axis",s,o];return{vlOnlyAxisConfig:Yk(a,i,e,n),vgAxisConfig:Yk(u,i,e,n),axisConfigStyle:Aue([...u,...a],i)}}function Aue(e,t){var i;const n=[{}];for(const r of e){let o=(i=t[r])==null?void 0:i.style;if(o){o=Y(o);for(const s of o)n.push(t.style[s])}}return Object.assign.apply(null,n)}function Nv(e,t,n,i={}){var o;const r=SR(e,n,t);if(r!==void 0)return{configFrom:"style",configValue:r};for(const s of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(((o=i[s])==null?void 0:o[e])!==void 0)return{configFrom:s,configValue:i[s][e]};return{}}const Xk={scale:({model:e,channel:t})=>e.scaleName(t),format:({format:e})=>e,formatType:({formatType:e})=>e,grid:({fieldOrDatumDef:e,axis:t,scaleType:n})=>t.grid??kue(n,e),gridScale:({model:e,channel:t})=>Cue(e,t),labelAlign:({axis:e,labelAngle:t,orient:n,channel:i})=>e.labelAlign||N4(t,n,i),labelAngle:({labelAngle:e})=>e,labelBaseline:({axis:e,labelAngle:t,orient:n,channel:i})=>e.labelBaseline||D4(t,n,i),labelFlush:({axis:e,fieldOrDatumDef:t,channel:n})=>e.labelFlush??Mue(t.type,n),labelOverlap:({axis:e,fieldOrDatumDef:t,scaleType:n})=>e.labelOverlap??Tue(t.type,n,j(t)&&!!t.timeUnit,j(t)?t.sort:void 0),orient:({orient:e})=>e,tickCount:({channel:e,model:t,axis:n,fieldOrDatumDef:i,scaleType:r})=>{const o=e==="x"?"width":e==="y"?"height":void 0,s=o?t.getSizeSignalRef(o):void 0;return n.tickCount??Nue({fieldOrDatumDef:i,scaleType:r,size:s,values:n.values})},tickMinStep:Oue,title:({axis:e,model:t,channel:n})=>{if(e.title!==void 0)return e.title;const i=O4(t,n);if(i!==void 0)return i;const r=t.typedFieldDef(n),o=n==="x"?"x2":"y2",s=t.fieldDef(o);return AR(r?[vk(r)]:[],j(s)?[vk(s)]:[])},values:({axis:e,fieldOrDatumDef:t})=>Rue(e,t),zindex:({axis:e,fieldOrDatumDef:t,mark:n})=>e.zindex??Lue(n,t)};function kue(e,t){return!bt(e)&&j(t)&&!Be(t==null?void 0:t.bin)&&!_t(t==null?void 0:t.bin)}function Cue(e,t){const n=t==="x"?"y":"x";if(e.getScaleComponent(n))return e.scaleName(n)}function Fue(e,t,n,i,r){const o=t==null?void 0:t.labelAngle;if(o!==void 0)return Q(o)?o:lf(o);{const{configValue:s}=Nv("labelAngle",i,t==null?void 0:t.style,r);return s!==void 0?lf(s):n===He&&ve([pE,hE],e.type)&&!(j(e)&&e.timeUnit)?270:void 0}}function Ov(e){return`(((${e.signal} % 360) + 360) % 360)`}function D4(e,t,n,i){if(e!==void 0)if(n==="x"){if(Q(e)){const r=Ov(e),o=Q(t)?`(${t.signal} === "top")`:t==="top";return{signal:`(45 < ${r} && ${r} < 135) || (225 < ${r} && ${r} < 315) ? "middle" :(${r} <= 45 || 315 <= ${r}) === ${o} ? "bottom" : "top"`}}if(45{if(Ra(i)&&f6(i.sort)){const{field:o,timeUnit:s}=i,a=i.sort,u=a.map((l,c)=>`${GR({field:o,timeUnit:s,equal:l})} ? ${c} : `).join("")+a.length;t=new Ku(t,{calculate:u,as:Ju(i,r,{forAs:!0})})}}),t}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${ye(this.transform)}`}}function Ju(e,t,n){return G(e,{prefix:t,suffix:"sort_index",...n})}function jm(e,t){return ve(["top","bottom"],t)?"column":ve(["left","right"],t)||e==="row"?"row":"column"}function Qu(e,t,n,i){const r=i==="row"?n.headerRow:i==="column"?n.headerColumn:n.headerFacet;return Ze((t||{})[e],r[e],n.header[e])}function qm(e,t,n,i){const r={};for(const o of e){const s=Qu(o,t||{},n,i);s!==void 0&&(r[o]=s)}return r}const GE=["row","column"],YE=["header","footer"];function Pue(e,t){const n=e.component.layoutHeaders[t].title,i=e.config?e.config:void 0,r=e.component.layoutHeaders[t].facetFieldDef?e.component.layoutHeaders[t].facetFieldDef:void 0,{titleAnchor:o,titleAngle:s,titleOrient:a}=qm(["titleAnchor","titleAngle","titleOrient"],r.header,i,t),u=jm(t,a),l=lf(s);return{name:`${t}-title`,type:"group",role:`${u}-title`,title:{text:n,...t==="row"?{orient:"left"}:{},style:"guide-title",...L4(l,u),...R4(u,l,o),...P4(i,r,t,Sse,z6)}}}function R4(e,t,n="middle"){switch(n){case"start":return{align:"left"};case"end":return{align:"right"}}const i=N4(t,e==="row"?"left":"top",e==="row"?"y":"x");return i?{align:i}:{}}function L4(e,t){const n=D4(e,t==="row"?"left":"top",t==="row"?"y":"x",!0);return n?{baseline:n}:{}}function Iue(e,t){const n=e.component.layoutHeaders[t],i=[];for(const r of YE)if(n[r])for(const o of n[r]){const s=Bue(e,t,r,n,o);s!=null&&i.push(s)}return i}function zue(e,t){const{sort:n}=e;return er(n)?{field:G(n,{expr:"datum"}),order:n.order??"ascending"}:P(n)?{field:Ju(e,t,{expr:"datum"}),order:"ascending"}:{field:G(e,{expr:"datum"}),order:n??"ascending"}}function Rv(e,t,n){const{format:i,formatType:r,labelAngle:o,labelAnchor:s,labelOrient:a,labelExpr:u}=qm(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e.header,n,t),l=wE({fieldOrDatumDef:e,format:i,formatType:r,expr:"parent",config:n}).signal,c=jm(t,a);return{text:{signal:u?fa(fa(u,"datum.label",l),"datum.value",G(e,{expr:"parent"})):l},...t==="row"?{orient:"left"}:{},style:"guide-label",frame:"group",...L4(o,c),...R4(c,o,s),...P4(n,e,t,$se,B6)}}function Bue(e,t,n,i,r){if(r){let o=null;const{facetFieldDef:s}=i,a=e.config?e.config:void 0;if(s&&r.labels){const{labelOrient:f}=qm(["labelOrient"],s.header,a,t);(t==="row"&&!ve(["top","bottom"],f)||t==="column"&&!ve(["left","right"],f))&&(o=Rv(s,t,a))}const u=Ln(e)&&!Qf(e.facet),l=r.axes,c=(l==null?void 0:l.length)>0;if(o||c){const f=t==="row"?"height":"width";return{name:e.getName(`${t}_${n}`),type:"group",role:`${t}-${n}`,...i.facetFieldDef?{from:{data:e.getName(`${t}_domain`)},sort:zue(s,t)}:{},...c&&u?{from:{data:e.getName(`facet_domain_${t}`)}}:{},...o?{title:o}:{},...r.sizeSignal?{encode:{update:{[f]:r.sizeSignal}}}:{},...c?{axes:l}:{}}}}return null}const Uue={column:{start:0,end:1},row:{start:1,end:0}};function jue(e,t){return Uue[t][e]}function que(e,t){const n={};for(const i of Kn){const r=e[i];if(r!=null&&r.facetFieldDef){const{titleAnchor:o,titleOrient:s}=qm(["titleAnchor","titleOrient"],r.facetFieldDef.header,t,i),a=jm(i,s),u=jue(o,a);u!==void 0&&(n[a]=u)}}return Oe(n)?void 0:n}function P4(e,t,n,i,r){const o={};for(const s of i){if(!r[s])continue;const a=Qu(s,t==null?void 0:t.header,e,n);a!==void 0&&(o[r[s]]=a)}return o}function XE(e){return[...Ld(e,"width"),...Ld(e,"height"),...Ld(e,"childWidth"),...Ld(e,"childHeight")]}function Ld(e,t){const n=t==="width"?"x":"y",i=e.component.layoutSize.get(t);if(!i||i==="merged")return[];const r=e.getSizeSignalRef(t).signal;if(i==="step"){const o=e.getScaleComponent(n);if(o){const s=o.get("type"),a=o.get("range");if(bt(s)&&hs(a)){const u=e.scaleName(n);return Ln(e.parent)&&e.parent.component.resolve.scale[n]==="independent"?[Vk(u,a)]:[Vk(u,a),{name:r,update:I4(u,o,`domain('${u}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}else if(i=="container"){const o=r.endsWith("width"),s=o?"containerSize()[0]":"containerSize()[1]",a=kv(e.config.view,o?"width":"height"),u=`isFinite(${s}) ? ${s} : ${a}`;return[{name:r,init:u,on:[{update:u,events:"window:resize"}]}]}else return[{name:r,value:i}]}function Vk(e,t){const n=`${e}_step`;return Q(t.step)?{name:n,update:t.step.signal}:{name:n,value:t.step}}function I4(e,t,n){const i=t.get("type"),r=t.get("padding"),o=Ze(t.get("paddingOuter"),r);let s=t.get("paddingInner");return s=i==="band"?s!==void 0?s:r:1,`bandspace(${n}, ${wi(s)}, ${wi(o)}) * ${e}_step`}function z4(e){return e==="childWidth"?"width":e==="childHeight"?"height":e}function B4(e,t){return B(e).reduce((n,i)=>{const r=e[i];return{...n,...vl(t,r,i,o=>je(o.value))}},{})}function U4(e,t){if(Ln(t))return e==="theta"?"independent":"shared";if(El(t))return"shared";if(t_(t))return et(e)||e==="theta"||e==="radius"?"independent":"shared";throw new Error("invalid model type for resolve")}function VE(e,t){const n=e.scale[t],i=et(t)?"axis":"legend";return n==="independent"?(e[i][t]==="shared"&&U(wre(t)),"independent"):e[i][t]||"shared"}const Wue={...Cse,disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1},j4=B(Wue);class Hue extends uo{}const Kk={symbols:Gue,gradient:Yue,labels:Xue,entries:Vue};function Gue(e,{fieldOrDatumDef:t,model:n,channel:i,legendCmpt:r,legendType:o}){if(o!=="symbol")return;const{markDef:s,encoding:a,config:u,mark:l}=n,c=s.filled&&l!=="trail";let f={...Die({},n,Soe),...p4(n,{filled:c})};const d=r.get("symbolOpacity")??u.legend.symbolOpacity,h=r.get("symbolFillColor")??u.legend.symbolFillColor,p=r.get("symbolStrokeColor")??u.legend.symbolStrokeColor,g=d===void 0?q4(a.opacity)??s.opacity:void 0;if(f.fill){if(i==="fill"||c&&i===En)delete f.fill;else if(f.fill.field)h?delete f.fill:(f.fill=je(u.legend.symbolBaseFillColor??"black"),f.fillOpacity=je(g??1));else if(P(f.fill)){const m=Lv(a.fill??a.color)??s.fill??(c&&s.color);m&&(f.fill=je(m))}}if(f.stroke){if(i==="stroke"||!c&&i===En)delete f.stroke;else if(f.stroke.field||p)delete f.stroke;else if(P(f.stroke)){const m=Ze(Lv(a.stroke||a.color),s.stroke,c?s.color:void 0);m&&(f.stroke={value:m})}}if(i!==oo){const m=j(t)&&H4(n,r,t);m?f.opacity=[{test:m,...je(g??1)},je(u.legend.unselectedOpacity)]:g&&(f.opacity=je(g))}return f={...f,...e},Oe(f)?void 0:f}function Yue(e,{model:t,legendType:n,legendCmpt:i}){if(n!=="gradient")return;const{config:r,markDef:o,encoding:s}=t;let a={};const l=(i.get("gradientOpacity")??r.legend.gradientOpacity)===void 0?q4(s.opacity)||o.opacity:void 0;return l&&(a.opacity=je(l)),a={...a,...e},Oe(a)?void 0:a}function Xue(e,{fieldOrDatumDef:t,model:n,channel:i,legendCmpt:r}){const o=n.legend(i)||{},s=n.config,a=j(t)?H4(n,r,t):void 0,u=a?[{test:a,value:1},{value:s.legend.unselectedOpacity}]:void 0,{format:l,formatType:c}=o;let f;ma(c)?f=_i({fieldOrDatumDef:t,field:"datum.value",format:l,formatType:c,config:s}):l===void 0&&c===void 0&&s.customFormatTypes&&(t.type==="quantitative"&&s.numberFormatType?f=_i({fieldOrDatumDef:t,field:"datum.value",format:s.numberFormat,formatType:s.numberFormatType,config:s}):t.type==="temporal"&&s.timeFormatType&&j(t)&&t.timeUnit===void 0&&(f=_i({fieldOrDatumDef:t,field:"datum.value",format:s.timeFormat,formatType:s.timeFormatType,config:s})));const d={...u?{opacity:u}:{},...f?{text:f}:{},...e};return Oe(d)?void 0:d}function Vue(e,{legendCmpt:t}){const n=t.get("selections");return n!=null&&n.length?{...e,fill:{value:"transparent"}}:e}function q4(e){return W4(e,(t,n)=>Math.max(t,n.value))}function Lv(e){return W4(e,(t,n)=>Ze(t,n.value))}function W4(e,t){if(Woe(e))return Y(e.condition).reduce(t,e.value);if(Fi(e))return e.value}function H4(e,t,n){const i=t.get("selections");if(!(i!=null&&i.length))return;const r=H(n.field);return i.map(o=>`(!length(data(${H(We(o)+va)})) || (${o}[${r}] && indexof(${o}[${r}], datum.value) >= 0))`).join(" || ")}const Jk={direction:({direction:e})=>e,format:({fieldOrDatumDef:e,legend:t,config:n})=>{const{format:i,formatType:r}=t;return a6(e,e.type,i,r,n,!1)},formatType:({legend:e,fieldOrDatumDef:t,scaleType:n})=>{const{formatType:i}=e;return u6(i,t,n)},gradientLength:e=>{const{legend:t,legendConfig:n}=e;return t.gradientLength??n.gradientLength??nle(e)},labelOverlap:({legend:e,legendConfig:t,scaleType:n})=>e.labelOverlap??t.labelOverlap??ile(n),symbolType:({legend:e,markDef:t,channel:n,encoding:i})=>e.symbolType??Jue(t.type,n,i.shape,t.shape),title:({fieldOrDatumDef:e,config:t})=>gu(e,t,{allowDisabling:!0}),type:({legendType:e,scaleType:t,channel:n})=>{if(pu(n)&&Ei(t)){if(e==="gradient")return}else if(e==="symbol")return;return e},values:({fieldOrDatumDef:e,legend:t})=>Kue(t,e)};function Kue(e,t){const n=e.values;if(P(n))return w6(t,n);if(Q(n))return n}function Jue(e,t,n,i){if(t!=="shape"){const r=Lv(n)??i;if(r)return r}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}function Que(e){const{legend:t}=e;return Ze(t.type,Zue(e))}function Zue({channel:e,timeUnit:t,scaleType:n}){if(pu(e)){if(ve(["quarter","month","day"],t))return"symbol";if(Ei(n))return"gradient"}return"symbol"}function ele({legendConfig:e,legendType:t,orient:n,legend:i}){return i.direction??e[t?"gradientDirection":"symbolDirection"]??tle(n,t)}function tle(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return t==="gradient"?"horizontal":void 0}}function nle({legendConfig:e,model:t,direction:n,orient:i,scaleType:r}){const{gradientHorizontalMaxLength:o,gradientHorizontalMinLength:s,gradientVerticalMaxLength:a,gradientVerticalMinLength:u}=e;if(Ei(r))return n==="horizontal"?i==="top"||i==="bottom"?Qk(t,"width",s,o):s:Qk(t,"height",u,a)}function Qk(e,t,n,i){return{signal:`clamp(${e.getSizeSignalRef(t).signal}, ${n}, ${i})`}}function ile(e){if(ve(["quantile","threshold","log","symlog"],e))return"greedy"}function G4(e){const t=Ve(e)?rle(e):ule(e);return e.component.legends=t,t}function rle(e){const{encoding:t}=e,n={};for(const i of[En,...j6]){const r=st(t[i]);!r||!e.getScaleComponent(i)||i===_n&&j(r)&&r.type===yl||(n[i]=ale(e,i))}return n}function ole(e,t){const n=e.scaleName(t);if(e.mark==="trail"){if(t==="color")return{stroke:n};if(t==="size")return{strokeWidth:n}}return t==="color"?e.markDef.filled?{fill:n}:{stroke:n}:{[t]:n}}function sle(e,t,n,i){switch(t){case"disable":return n!==void 0;case"values":return!!(n!=null&&n.values);case"title":if(t==="title"&&e===(i==null?void 0:i.title))return!0}return e===(n||{})[t]}function ale(e,t){var x;let n=e.legend(t);const{markDef:i,encoding:r,config:o}=e,s=o.legend,a=new Hue({},ole(e,t));mue(e,t,a);const u=n!==void 0?!n:s.disable;if(a.set("disable",u,n!==void 0),u)return a;n=n||{};const l=e.getScaleComponent(t).get("type"),c=st(r[t]),f=j(c)?(x=vt(c.timeUnit))==null?void 0:x.unit:void 0,d=n.orient||o.legend.orient||"right",h=Que({legend:n,channel:t,timeUnit:f,scaleType:l}),p=ele({legend:n,legendType:h,orient:d,legendConfig:s}),g={legend:n,channel:t,model:e,markDef:i,encoding:r,fieldOrDatumDef:c,legendConfig:s,config:o,scaleType:l,orient:d,legendType:h,direction:p};for(const w of j4){if(h==="gradient"&&w.startsWith("symbol")||h==="symbol"&&w.startsWith("gradient"))continue;const _=w in Jk?Jk[w](g):n[w];if(_!==void 0){const E=sle(_,w,n,e.fieldDef(t));(E||o.legend[w]===void 0)&&a.set(w,_,E)}}const m=(n==null?void 0:n.encoding)??{},y=a.get("selections"),v={},b={fieldOrDatumDef:c,model:e,channel:t,legendCmpt:a,legendType:h};for(const w of["labels","legend","title","symbols","gradient","entries"]){const _=B4(m[w]??{},e),E=w in Kk?Kk[w](_,b):_;E!==void 0&&!Oe(E)&&(v[w]={...y!=null&&y.length&&j(c)?{name:`${We(c.field)}_legend_${w}`}:{},...y!=null&&y.length?{interactive:!!y}:{},update:E})}return Oe(v)||a.set("encode",v,!!(n!=null&&n.encoding)),a}function ule(e){const{legends:t,resolve:n}=e.component;for(const i of e.children){G4(i);for(const r of B(i.component.legends))n.legend[r]=VE(e.component.resolve,r),n.legend[r]==="shared"&&(t[r]=Y4(t[r],i.component.legends[r]),t[r]||(n.legend[r]="independent",delete t[r]))}for(const i of B(t))for(const r of e.children)r.component.legends[i]&&n.legend[i]==="shared"&&delete r.component.legends[i];return t}function Y4(e,t){var o,s,a,u;if(!e)return t.clone();const n=e.getWithExplicit("orient"),i=t.getWithExplicit("orient");if(n.explicit&&i.explicit&&n.value!==i.value)return;let r=!1;for(const l of j4){const c=Ko(e.getWithExplicit(l),t.getWithExplicit(l),l,"legend",(f,d)=>{switch(l){case"symbolType":return lle(f,d);case"title":return CR(f,d);case"type":return r=!0,kn("symbol")}return Pm(f,d,l,"legend")});e.setWithExplicit(l,c)}return r&&((s=(o=e.implicit)==null?void 0:o.encode)!=null&&s.gradient&&Dp(e.implicit,["encode","gradient"]),(u=(a=e.explicit)==null?void 0:a.encode)!=null&&u.gradient&&Dp(e.explicit,["encode","gradient"])),e}function lle(e,t){return t.value==="circle"?t:e}function cle(e,t,n,i){var r,o;e.encode??(e.encode={}),(r=e.encode)[t]??(r[t]={}),(o=e.encode[t]).update??(o.update={}),e.encode[t].update[n]=i}function X4(e){const t=e.component.legends,n={};for(const r of B(t)){const o=e.getScaleComponent(r),s=Re(o.get("domains"));if(n[s])for(const a of n[s])Y4(a,t[r])||n[s].push(t[r]);else n[s]=[t[r].clone()]}return kt(n).flat().map(r=>fle(r,e.config)).filter(r=>r!==void 0)}function fle(e,t){var s,a,u;const{disable:n,labelExpr:i,selections:r,...o}=e.combine();if(!n){if(t.aria===!1&&o.aria==null&&(o.aria=!1),(s=o.encode)!=null&&s.symbols){const l=o.encode.symbols.update;l.fill&&l.fill.value!=="transparent"&&!l.stroke&&!o.stroke&&(l.stroke={value:"transparent"});for(const c of j6)o[c]&&delete l[c]}if(o.title||delete o.title,i!==void 0){let l=i;(u=(a=o.encode)==null?void 0:a.labels)!=null&&u.update&&Q(o.encode.labels.update.text)&&(l=fa(i,"datum.label",o.encode.labels.update.text.signal)),cle(o,"labels","text",{signal:l})}return o}}function dle(e){return El(e)||t_(e)?hle(e):V4(e)}function hle(e){return e.children.reduce((t,n)=>t.concat(n.assembleProjections()),V4(e))}function V4(e){const t=e.component.projection;if(!t||t.merged)return[];const n=t.combine(),{name:i}=n;if(t.data){const r={signal:`[${t.size.map(s=>s.signal).join(", ")}]`},o=t.data.reduce((s,a)=>{const u=Q(a)?a.signal:`data('${e.lookupDataSource(a)}')`;return ve(s,u)||s.push(u),s},[]);if(o.length<=0)throw new Error("Projection's fit didn't find any data sources");return[{name:i,size:r,fit:{signal:o.length>1?`[${o.join(", ")}]`:o[0]},...n}]}else return[{name:i,translate:{signal:"[width / 2, height / 2]"},...n}]}const ple=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class K4 extends uo{constructor(t,n,i,r){super({...n},{name:t}),this.specifiedProjection=n,this.size=i,this.data=r,this.merged=!1}get isFit(){return!!this.data}}function J4(e){e.component.projection=Ve(e)?gle(e):vle(e)}function gle(e){if(e.hasProjection){const t=pn(e.specifiedProjection),n=!(t&&(t.scale!=null||t.translate!=null)),i=n?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,r=n?mle(e):void 0,o=new K4(e.projectionName(!0),{...pn(e.config.projection),...t},i,r);return o.get("type")||o.set("type","equalEarth",!1),o}}function mle(e){const t=[],{encoding:n}=e;for(const i of[[Pi,Li],[oi,Ii]])(st(n[i[0]])||st(n[i[1]]))&&t.push({signal:e.getName(`geojson_${t.length}`)});return e.channelHasField(_n)&&e.typedFieldDef(_n).type===yl&&t.push({signal:e.getName(`geojson_${t.length}`)}),t.length===0&&t.push(e.requestDataName(ze.Main)),t}function yle(e,t){const n=Uw(ple,r=>!!(!re(e.explicit,r)&&!re(t.explicit,r)||re(e.explicit,r)&&re(t.explicit,r)&&Nn(e.get(r),t.get(r))));if(Nn(e.size,t.size)){if(n)return e;if(Nn(e.explicit,{}))return t;if(Nn(t.explicit,{}))return e}return null}function vle(e){if(e.children.length===0)return;let t;for(const i of e.children)J4(i);const n=Uw(e.children,i=>{const r=i.component.projection;if(r)if(t){const o=yle(t,r);return o&&(t=o),!!o}else return t=r,!0;else return!0});if(t&&n){const i=e.projectionName(!0),r=new K4(i,t.specifiedProjection,t.size,ae(t.data));for(const o of e.children){const s=o.component.projection;s&&(s.isFit&&r.data.push(...o.component.projection.data),o.renameProjection(s.get("name"),i),s.merged=!0)}return r}}function ble(e,t,n,i){if(ed(t,n)){const r=Ve(e)?e.axis(n)??e.legend(n)??{}:{},o=G(t,{expr:"datum"}),s=G(t,{expr:"datum",binSuffix:"end"});return{formulaAs:G(t,{binSuffix:"range",forAs:!0}),formula:Jf(o,s,r.format,r.formatType,i)}}return{}}function Q4(e,t){return`${xR(e)}_${t}`}function xle(e,t){return{signal:e.getName(`${t}_bins`),extentSignal:e.getName(`${t}_extent`)}}function KE(e,t,n){const i=Tm(n,void 0)??{},r=Q4(i,t);return e.getName(`${r}_bins`)}function wle(e){return"as"in e}function Zk(e,t,n){let i,r;wle(e)?i=X(e.as)?[e.as,`${e.as}_end`]:[e.as[0],e.as[1]]:i=[G(e,{forAs:!0}),G(e,{binSuffix:"end",forAs:!0})];const o={...Tm(t,void 0)},s=Q4(o,e.field),{signal:a,extentSignal:u}=xle(n,s);if(xm(o.extent)){const c=o.extent;r=M4(n,c.param,c),delete o.extent}const l={bin:o,field:e.field,as:[i],...a?{signal:a}:{},...u?{extentSignal:u}:{},...r?{span:r}:{}};return{key:s,binComponent:l}}class nr extends Ne{clone(){return new nr(null,ae(this.bins))}constructor(t,n){super(t),this.bins=n}static makeFromEncoding(t,n){const i=n.reduceFieldDef((r,o,s)=>{if(un(o)&&Be(o.bin)){const{key:a,binComponent:u}=Zk(o,o.bin,n);r[a]={...u,...r[a],...ble(n,o,s,n.config)}}return r},{});return Oe(i)?null:new nr(t,i)}static makeFromTransform(t,n,i){const{key:r,binComponent:o}=Zk(n,n.bin,i);return new nr(t,{[r]:o})}merge(t,n){for(const i of B(t.bins))i in this.bins?(n(t.bins[i].signal,this.bins[i].signal),this.bins[i].as=Ki([...this.bins[i].as,...t.bins[i].as],ye)):this.bins[i]=t.bins[i];for(const i of t.children)t.removeChild(i),i.parent=this;t.remove()}producedFields(){return new Set(kt(this.bins).map(t=>t.as).flat(2))}dependentFields(){return new Set(kt(this.bins).map(t=>t.field))}hash(){return`Bin ${ye(this.bins)}`}assemble(){return kt(this.bins).flatMap(t=>{const n=[],[i,...r]=t.as,{extent:o,...s}=t.bin,a={type:"bin",field:ri(t.field),as:i,signal:t.signal,...xm(o)?{extent:null}:{extent:o},...t.span?{span:{signal:`span(${t.span})`}}:{},...s};!o&&t.extentSignal&&(n.push({type:"extent",field:ri(t.field),signal:t.extentSignal}),a.extent={signal:t.extentSignal}),n.push(a);for(const u of r)for(let l=0;l<2;l++)n.push({type:"formula",expr:G({field:i[l]},{expr:"datum"}),as:u[l]});return t.formula&&n.push({type:"formula",expr:t.formula,as:t.formulaAs}),n})}}function Ele(e,t,n,i){var o;const r=Ve(i)?i.encoding[wr(t)]:void 0;if(un(n)&&Ve(i)&&h6(n,r,i.markDef,i.config)){e.add(G(n,{})),e.add(G(n,{suffix:"end"}));const{mark:s,markDef:a,config:u}=i,l=Vo({fieldDef:n,markDef:a,config:u});cf(s)&&l!==.5&&et(t)&&(e.add(G(n,{suffix:Im})),e.add(G(n,{suffix:zm}))),n.bin&&ed(n,t)&&e.add(G(n,{binSuffix:"range"}))}else if(cR(t)){const s=lR(t);e.add(i.getName(s))}else e.add(G(n));return Ra(n)&&doe((o=n.scale)==null?void 0:o.range)&&e.add(n.scale.range.field),e}function _le(e,t){for(const n of B(t)){const i=t[n];for(const r of B(i))n in e?e[n][r]=new Set([...e[n][r]??[],...i[r]]):e[n]={[r]:i[r]}}}class $i extends Ne{clone(){return new $i(null,new Set(this.dimensions),ae(this.measures))}constructor(t,n,i){super(t),this.dimensions=n,this.measures=i}get groupBy(){return this.dimensions}static makeFromEncoding(t,n){let i=!1;n.forEachFieldDef(s=>{s.aggregate&&(i=!0)});const r={},o=new Set;return!i||(n.forEachFieldDef((s,a)=>{const{aggregate:u,field:l}=s;if(u)if(u==="count")r["*"]??(r["*"]={}),r["*"].count=new Set([G(s,{forAs:!0})]);else{if(Qr(u)||ds(u)){const c=Qr(u)?"argmin":"argmax",f=u[c];r[f]??(r[f]={}),r[f][c]=new Set([G({op:c,field:f},{forAs:!0})])}else r[l]??(r[l]={}),r[l][u]=new Set([G(s,{forAs:!0})]);so(a)&&n.scaleDomain(a)==="unaggregated"&&(r[l]??(r[l]={}),r[l].min=new Set([G({field:l,aggregate:"min"},{forAs:!0})]),r[l].max=new Set([G({field:l,aggregate:"max"},{forAs:!0})]))}else Ele(o,a,s,n)}),o.size+B(r).length===0)?null:new $i(t,o,r)}static makeFromTransform(t,n){const i=new Set,r={};for(const o of n.aggregate){const{op:s,field:a,as:u}=o;s&&(s==="count"?(r["*"]??(r["*"]={}),r["*"].count=new Set([u||G(o,{forAs:!0})])):(r[a]??(r[a]={}),r[a][s]=new Set([u||G(o,{forAs:!0})])))}for(const o of n.groupby??[])i.add(o);return i.size+B(r).length===0?null:new $i(t,i,r)}merge(t){return tR(this.dimensions,t.dimensions)?(_le(this.measures,t.measures),!0):(Pre("different dimensions, cannot merge"),!1)}addDimensions(t){t.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...B(this.measures)])}producedFields(){const t=new Set;for(const n of B(this.measures))for(const i of B(this.measures[n])){const r=this.measures[n][i];r.size===0?t.add(`${i}_${n}`):r.forEach(t.add,t)}return t}hash(){return`Aggregate ${ye({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const t=[],n=[],i=[];for(const o of B(this.measures))for(const s of B(this.measures[o]))for(const a of this.measures[o][s])i.push(a),t.push(s),n.push(o==="*"?null:ri(o));return{type:"aggregate",groupby:[...this.dimensions].map(ri),ops:t,fields:n,as:i}}}class xl extends Ne{constructor(t,n,i,r){super(t),this.model=n,this.name=i,this.data=r;for(const o of Kn){const s=n.facet[o];if(s){const{bin:a,sort:u}=s;this[o]={name:n.getName(`${o}_domain`),fields:[G(s),...Be(a)?[G(s,{binSuffix:"end"})]:[]],...er(u)?{sortField:u}:P(u)?{sortIndexField:Ju(s,o)}:{}}}}this.childModel=n.child}hash(){let t="Facet";for(const n of Kn)this[n]&&(t+=` ${n.charAt(0)}:${ye(this[n])}`);return t}get fields(){var n;const t=[];for(const i of Kn)(n=this[i])!=null&&n.fields&&t.push(...this[i].fields);return t}dependentFields(){const t=new Set(this.fields);for(const n of Kn)this[n]&&(this[n].sortField&&t.add(this[n].sortField.field),this[n].sortIndexField&&t.add(this[n].sortIndexField));return t}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const t={};for(const n of Er){const i=this.childModel.component.scales[n];if(i&&!i.merged){const r=i.get("type"),o=i.get("range");if(bt(r)&&hs(o)){const s=Wm(this.childModel,n),a=e_(s);a?t[n]=a:U(tE(n))}}}return t}assembleRowColumnHeaderData(t,n,i){const r={row:"y",column:"x",facet:void 0}[t],o=[],s=[],a=[];r&&i&&i[r]&&(n?(o.push(`distinct_${i[r]}`),s.push("max")):(o.push(i[r]),s.push("distinct")),a.push(`distinct_${i[r]}`));const{sortField:u,sortIndexField:l}=this[t];if(u){const{op:c=km,field:f}=u;o.push(f),s.push(c),a.push(G(u,{forAs:!0}))}else l&&(o.push(l),s.push("max"),a.push(l));return{name:this[t].name,source:n??this.data,transform:[{type:"aggregate",groupby:this[t].fields,...o.length?{fields:o,ops:s,as:a}:{}}]}}assembleFacetHeaderData(t){var u;const{columns:n}=this.model.layout,{layoutHeaders:i}=this.model.component,r=[],o={};for(const l of GE){for(const c of YE){const f=(i[l]&&i[l][c])??[];for(const d of f)if(((u=d.axes)==null?void 0:u.length)>0){o[l]=!0;break}}if(o[l]){const c=`length(data("${this.facet.name}"))`,f=l==="row"?n?{signal:`ceil(${c} / ${n})`}:1:n?{signal:`min(${c}, ${n})`}:{signal:c};r.push({name:`${this.facet.name}_${l}`,transform:[{type:"sequence",start:0,stop:f}]})}}const{row:s,column:a}=o;return(s||a)&&r.unshift(this.assembleRowColumnHeaderData("facet",null,t)),r}assemble(){const t=[];let n=null;const i=this.getChildIndependentFieldsWithStep(),{column:r,row:o,facet:s}=this;if(r&&o&&(i.x||i.y)){n=`cross_${this.column.name}_${this.row.name}`;const a=[].concat(i.x??[],i.y??[]),u=a.map(()=>"distinct");t.push({name:n,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:a,ops:u}]})}for(const a of[Gr,Hr])this[a]&&t.push(this.assembleRowColumnHeaderData(a,n,i));if(s){const a=this.assembleFacetHeaderData(i);a&&t.push(...a)}return t}}function eC(e){return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function Sle(e,t){const n=Ww(e);if(t==="number")return`toNumber(${n})`;if(t==="boolean")return`toBoolean(${n})`;if(t==="string")return`toString(${n})`;if(t==="date")return`toDate(${n})`;if(t==="flatten")return n;if(t.startsWith("date:")){const i=eC(t.slice(5,t.length));return`timeParse(${n},'${i}')`}else if(t.startsWith("utc:")){const i=eC(t.slice(4,t.length));return`utcParse(${n},'${i}')`}else return U(Gie(t)),null}function $le(e){const t={};return ph(e.filter,n=>{if(HR(n)){let i=null;oE(n)?i=Mn(n.equal):aE(n)?i=Mn(n.lte):sE(n)?i=Mn(n.lt):uE(n)?i=Mn(n.gt):lE(n)?i=Mn(n.gte):cE(n)?i=n.range[0]:fE(n)&&(i=(n.oneOf??n.in)[0]),i&&(Na(i)?t[n.field]="date":Ee(i)?t[n.field]="number":X(i)&&(t[n.field]="string")),n.timeUnit&&(t[n.field]="date")}}),t}function Ale(e){const t={};function n(i){Yu(i)?t[i.field]="date":i.type==="quantitative"&&_ie(i.aggregate)?t[i.field]="number":Bu(i.field)>1?i.field in t||(t[i.field]="flatten"):Ra(i)&&er(i.sort)&&Bu(i.sort.field)>1&&(i.sort.field in t||(t[i.sort.field]="flatten"))}if((Ve(e)||Ln(e))&&e.forEachFieldDef((i,r)=>{if(un(i))n(i);else{const o=Ta(r),s=e.fieldDef(o);n({...i,type:s.type})}}),Ve(e)){const{mark:i,markDef:r,encoding:o}=e;if(ps(i)&&!e.encoding.order){const s=r.orient==="horizontal"?"y":"x",a=o[s];j(a)&&a.type==="quantitative"&&!(a.field in t)&&(t[a.field]="number")}}return t}function kle(e){const t={};if(Ve(e)&&e.component.selection)for(const n of B(e.component.selection)){const i=e.component.selection[n];for(const r of i.project.items)!r.channel&&Bu(r.field)>1&&(t[r.field]="flatten")}return t}class zt extends Ne{clone(){return new zt(null,ae(this._parse))}constructor(t,n){super(t),this._parse=n}hash(){return`Parse ${ye(this._parse)}`}static makeExplicit(t,n,i){var s;let r={};const o=n.data;return!Oo(o)&&((s=o==null?void 0:o.format)!=null&&s.parse)&&(r=o.format.parse),this.makeWithAncestors(t,r,{},i)}static makeWithAncestors(t,n,i,r){for(const a of B(i)){const u=r.getWithExplicit(a);u.value!==void 0&&(u.explicit||u.value===i[a]||u.value==="derived"||i[a]==="flatten"?delete i[a]:U(ck(a,i[a],u.value)))}for(const a of B(n)){const u=r.get(a);u!==void 0&&(u===n[a]?delete n[a]:U(ck(a,n[a],u)))}const o=new uo(n,i);r.copyAll(o);const s={};for(const a of B(o.combine())){const u=o.get(a);u!==null&&(s[a]=u)}return B(s).length===0||r.parseNothing?null:new zt(t,s)}get parse(){return this._parse}merge(t){this._parse={...this._parse,...t.parse},t.remove()}assembleFormatParse(){const t={};for(const n of B(this._parse)){const i=this._parse[n];Bu(n)===1&&(t[n]=i)}return t}producedFields(){return new Set(B(this._parse))}dependentFields(){return new Set(B(this._parse))}assembleTransforms(t=!1){return B(this._parse).filter(n=>t?Bu(n)>1:!0).map(n=>{const i=Sle(n,this._parse[n]);return i?{type:"formula",expr:i,as:Hw(n)}:null}).filter(n=>n!==null)}}class Zo extends Ne{clone(){return new Zo(null)}constructor(t){super(t)}dependentFields(){return new Set}producedFields(){return new Set([Mi])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:Mi}}}class id extends Ne{clone(){return new id(null,this.params)}constructor(t,n){super(t),this.params=n}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${ye(this.params)}`}assemble(){return{type:"graticule",...this.params===!0?{}:this.params}}}class rd extends Ne{clone(){return new rd(null,this.params)}constructor(t,n){super(t),this.params=n}dependentFields(){return new Set}producedFields(){return new Set([this.params.as??"data"])}hash(){return`Hash ${ye(this.params)}`}assemble(){return{type:"sequence",...this.params}}}class ba extends Ne{constructor(t){super(null),t??(t={name:"source"});let n;if(Oo(t)||(n=t.format?{...yn(t.format,["parse"])}:{}),ff(t))this._data={values:t.values};else if(Xu(t)){if(this._data={url:t.url},!n.type){let i=/(?:\.([^.]+))?$/.exec(t.url)[1];ve(["json","csv","tsv","dsv","topojson"],i)||(i="json"),n.type=i}}else s4(t)?this._data={values:[{type:"Sphere"}]}:(r4(t)||Oo(t))&&(this._data={});this._generator=Oo(t),t.name&&(this._name=t.name),n&&!Oe(n)&&(this._data.format=n)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(t){this._name=t}set parent(t){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return{name:this._name,...this._data,transform:[]}}}var tC=function(e,t,n,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(e,n):r?r.value=n:t.set(e,n),n},Cle=function(e,t,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(e):i?i.value:t.get(e)},vc;function JE(e){return e instanceof ba||e instanceof id||e instanceof rd}class QE{constructor(){vc.set(this,void 0),tC(this,vc,!1,"f")}setModified(){tC(this,vc,!0,"f")}get modifiedFlag(){return Cle(this,vc,"f")}}vc=new WeakMap;class La extends QE{getNodeDepths(t,n,i){i.set(t,n);for(const r of t.children)this.getNodeDepths(r,n+1,i);return i}optimize(t){const i=[...this.getNodeDepths(t,0,new Map).entries()].sort((r,o)=>o[1]-r[1]);for(const r of i)this.run(r[0]);return this.modifiedFlag}}class ZE extends QE{optimize(t){this.run(t);for(const n of t.children)this.optimize(n);return this.modifiedFlag}}class Fle extends ZE{mergeNodes(t,n){const i=n.shift();for(const r of n)t.removeChild(r),r.parent=i,r.remove()}run(t){const n=t.children.map(r=>r.hash()),i={};for(let r=0;r1&&(this.setModified(),this.mergeNodes(t,i[r]))}}class Mle extends ZE{constructor(t){super(),this.requiresSelectionId=t&&HE(t)}run(t){t instanceof Zo&&(this.requiresSelectionId&&(JE(t.parent)||t.parent instanceof $i||t.parent instanceof zt)||(this.setModified(),t.remove()))}}class Tle extends QE{optimize(t){return this.run(t,new Set),this.modifiedFlag}run(t,n){let i=new Set;t instanceof tr&&(i=t.producedFields(),jw(i,n)&&(this.setModified(),t.removeFormulas(n),t.producedFields.length===0&&t.remove()));for(const r of t.children)this.run(r,new Set([...n,...i]))}}class Dle extends ZE{constructor(){super()}run(t){t instanceof on&&!t.isRequired()&&(this.setModified(),t.remove())}}class Nle extends La{run(t){if(!JE(t)&&!(t.numChildren()>1)){for(const n of t.children)if(n instanceof zt)if(t instanceof zt)this.setModified(),t.merge(n);else{if(qw(t.producedFields(),n.dependentFields()))continue;this.setModified(),n.swapWithParent()}}}}class Ole extends La{run(t){const n=[...t.children],i=t.children.filter(r=>r instanceof zt);if(t.numChildren()>1&&i.length>=1){const r={},o=new Set;for(const s of i){const a=s.parse;for(const u of B(a))u in r?r[u]!==a[u]&&o.add(u):r[u]=a[u]}for(const s of o)delete r[s];if(!Oe(r)){this.setModified();const s=new zt(t,r);for(const a of n){if(a instanceof zt)for(const u of B(r))delete a.parse[u];t.removeChild(a),a.parent=s,a instanceof zt&&B(a.parse).length===0&&a.remove()}}}}}class Rle extends La{run(t){t instanceof on||t.numChildren()>0||t instanceof xl||t instanceof ba||(this.setModified(),t.remove())}}class Lle extends La{run(t){const n=t.children.filter(r=>r instanceof tr),i=n.pop();for(const r of n)this.setModified(),i.merge(r)}}class Ple extends La{run(t){const n=t.children.filter(r=>r instanceof $i),i={};for(const r of n){const o=ye(r.groupBy);o in i||(i[o]=[]),i[o].push(r)}for(const r of B(i)){const o=i[r];if(o.length>1){const s=o.pop();for(const a of o)s.merge(a)&&(t.removeChild(a),a.parent=s,a.remove(),this.setModified())}}}}class Ile extends La{constructor(t){super(),this.model=t}run(t){const n=!(JE(t)||t instanceof bl||t instanceof zt||t instanceof Zo),i=[],r=[];for(const o of t.children)o instanceof nr&&(n&&!qw(t.producedFields(),o.dependentFields())?i.push(o):r.push(o));if(i.length>0){const o=i.pop();for(const s of i)o.merge(s,this.model.renameSignal.bind(this.model));this.setModified(),t instanceof nr?t.merge(o,this.model.renameSignal.bind(this.model)):o.swapWithParent()}if(r.length>1){const o=r.pop();for(const s of r)o.merge(s,this.model.renameSignal.bind(this.model));this.setModified()}}}class zle extends La{run(t){const n=[...t.children];if(!ca(n,s=>s instanceof on)||t.numChildren()<=1)return;const r=[];let o;for(const s of n)if(s instanceof on){let a=s;for(;a.numChildren()===1;){const[u]=a.children;if(u instanceof on)a=u;else break}r.push(...a.children),o?(t.removeChild(s),s.parent=o.parent,o.parent.removeChild(o),o.parent=a,this.setModified()):o=a}else r.push(s);if(r.length){this.setModified();for(const s of r)s.parent.removeChild(s),s.parent=o}}}class Pa extends Ne{clone(){return new Pa(null,ae(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=Ki(this.transform.groupby.concat(t),n=>n)}dependentFields(){const t=new Set;return this.transform.groupby&&this.transform.groupby.forEach(t.add,t),this.transform.joinaggregate.map(n=>n.field).filter(n=>n!==void 0).forEach(t.add,t),t}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(t){return t.as??G(t)}hash(){return`JoinAggregateTransform ${ye(this.transform)}`}assemble(){const t=[],n=[],i=[];for(const o of this.transform.joinaggregate)n.push(o.op),i.push(this.getDefaultName(o)),t.push(o.field===void 0?null:o.field);const r=this.transform.groupby;return{type:"joinaggregate",as:i,ops:n,fields:t,...r!==void 0?{groupby:r}:{}}}}function Ble(e){return e.stack.stackBy.reduce((t,n)=>{const i=n.fieldDef,r=G(i);return r&&t.push(r),t},[])}function Ule(e){return P(e)&&e.every(t=>X(t))&&e.length>1}class Xr extends Ne{clone(){return new Xr(null,ae(this._stack))}constructor(t,n){super(t),this._stack=n}static makeFromTransform(t,n){const{stack:i,groupby:r,as:o,offset:s="zero"}=n,a=[],u=[];if(n.sort!==void 0)for(const f of n.sort)a.push(f.field),u.push(Ze(f.order,"ascending"));const l={field:a,order:u};let c;return Ule(o)?c=o:X(o)?c=[o,`${o}_end`]:c=[`${n.stack}_start`,`${n.stack}_end`],new Xr(t,{dimensionFieldDefs:[],stackField:i,groupby:r,offset:s,sort:l,facetby:[],as:c})}static makeFromEncoding(t,n){const i=n.stack,{encoding:r}=n;if(!i)return null;const{groupbyChannels:o,fieldChannel:s,offset:a,impute:u}=i,l=o.map(h=>{const p=r[h];return cr(p)}).filter(h=>!!h),c=Ble(n),f=n.encoding.order;let d;if(P(f)||j(f))d=$R(f);else{const h=p6(f)?f.sort:s==="y"?"descending":"ascending";d=c.reduce((p,g)=>(p.field.includes(g)||(p.field.push(g),p.order.push(h)),p),{field:[],order:[]})}return new Xr(t,{dimensionFieldDefs:l,stackField:n.vgField(s),facetby:[],stackby:c,sort:d,offset:a,impute:u,as:[n.vgField(s,{suffix:"start",forAs:!0}),n.vgField(s,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(t){this._stack.facetby.push(...t)}dependentFields(){const t=new Set;return t.add(this._stack.stackField),this.getGroupbyFields().forEach(t.add,t),this._stack.facetby.forEach(t.add,t),this._stack.sort.field.forEach(t.add,t),t}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${ye(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:t,impute:n,groupby:i}=this._stack;return t.length>0?t.map(r=>r.bin?n?[G(r,{binSuffix:"mid"})]:[G(r,{}),G(r,{binSuffix:"end"})]:[G(r)]).flat():i??[]}assemble(){const t=[],{facetby:n,dimensionFieldDefs:i,stackField:r,stackby:o,sort:s,offset:a,impute:u,as:l}=this._stack;if(u)for(const c of i){const{bandPosition:f=.5,bin:d}=c;if(d){const h=G(c,{expr:"datum"}),p=G(c,{expr:"datum",binSuffix:"end"});t.push({type:"formula",expr:`${f}*${h}+${1-f}*${p}`,as:G(c,{binSuffix:"mid",forAs:!0})})}t.push({type:"impute",field:r,groupby:[...o,...n],key:G(c,{binSuffix:"mid"}),method:"value",value:0})}return t.push({type:"stack",groupby:[...this.getGroupbyFields(),...n],field:r,sort:s,as:l,offset:a}),t}}class wl extends Ne{clone(){return new wl(null,ae(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=Ki(this.transform.groupby.concat(t),n=>n)}dependentFields(){const t=new Set;return(this.transform.groupby??[]).forEach(t.add,t),(this.transform.sort??[]).forEach(n=>t.add(n.field)),this.transform.window.map(n=>n.field).filter(n=>n!==void 0).forEach(t.add,t),t}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(t){return t.as??G(t)}hash(){return`WindowTransform ${ye(this.transform)}`}assemble(){const t=[],n=[],i=[],r=[];for(const f of this.transform.window)n.push(f.op),i.push(this.getDefaultName(f)),r.push(f.param===void 0?null:f.param),t.push(f.field===void 0?null:f.field);const o=this.transform.frame,s=this.transform.groupby;if(o&&o[0]===null&&o[1]===null&&n.every(f=>Zw(f)))return{type:"joinaggregate",as:i,ops:n,fields:t,...s!==void 0?{groupby:s}:{}};const a=[],u=[];if(this.transform.sort!==void 0)for(const f of this.transform.sort)a.push(f.field),u.push(f.order??"ascending");const l={field:a,order:u},c=this.transform.ignorePeers;return{type:"window",params:r,as:i,ops:n,fields:t,sort:l,...c!==void 0?{ignorePeers:c}:{},...s!==void 0?{groupby:s}:{},...o!==void 0?{frame:o}:{}}}}function jle(e){function t(n){if(!(n instanceof xl)){const i=n.clone();if(i instanceof on){const r=Iv+i.getSource();i.setSource(r),e.model.component.data.outputNodes[r]=i}else(i instanceof $i||i instanceof Xr||i instanceof wl||i instanceof Pa)&&i.addDimensions(e.fields);for(const r of n.children.flatMap(t))r.parent=i;return[i]}return n.children.flatMap(t)}return t}function Pv(e){if(e instanceof xl)if(e.numChildren()===1&&!(e.children[0]instanceof on)){const t=e.children[0];(t instanceof $i||t instanceof Xr||t instanceof wl||t instanceof Pa)&&t.addDimensions(e.fields),t.swapWithParent(),Pv(e)}else{const t=e.model.component.data.main;Z4(t);const n=jle(e),i=e.children.map(n).flat();for(const r of i)r.parent=t}else e.children.map(Pv)}function Z4(e){if(e instanceof on&&e.type===ze.Main&&e.numChildren()===1){const t=e.children[0];t instanceof xl||(t.swapWithParent(),Z4(e))}}const Iv="scale_",Pd=5;function zv(e){for(const t of e){for(const n of t.children)if(n.parent!==t)return!1;if(!zv(t.children))return!1}return!0}function li(e,t){let n=!1;for(const i of t)n=e.optimize(i)||n;return n}function nC(e,t,n){let i=e.sources,r=!1;return r=li(new Dle,i)||r,r=li(new Mle(t),i)||r,i=i.filter(o=>o.numChildren()>0),r=li(new Rle,i)||r,i=i.filter(o=>o.numChildren()>0),n||(r=li(new Nle,i)||r,r=li(new Ile(t),i)||r,r=li(new Tle,i)||r,r=li(new Ole,i)||r,r=li(new Ple,i)||r,r=li(new Lle,i)||r,r=li(new Fle,i)||r,r=li(new zle,i)||r),e.sources=i,r}function qle(e,t){zv(e.sources);let n=0,i=0;for(let r=0;rt(n))}}function eL(e){Ve(e)?Wle(e):Hle(e)}function Wle(e){const t=e.component.scales;for(const n of B(t)){const i=Yle(e,n);if(t[n].setWithExplicit("domains",i),Vle(e,n),e.component.data.isFaceted){let o=e;for(;!Ln(o)&&o.parent;)o=o.parent;if(o.component.resolve.scale[n]==="shared")for(const a of i.value)Ur(a)&&(a.data=Iv+a.data.replace(Iv,""))}}}function Hle(e){for(const n of e.children)eL(n);const t=e.component.scales;for(const n of B(t)){let i,r=null;for(const o of e.children){const s=o.component.scales[n];if(s){i===void 0?i=s.getWithExplicit("domains"):i=Ko(i,s.getWithExplicit("domains"),"domains","scale",Bv);const a=s.get("selectionExtent");r&&a&&r.param!==a.param&&U(jie),r=a}}t[n].setWithExplicit("domains",i),r&&t[n].set("selectionExtent",r,!0)}}function Gle(e,t,n,i){if(e==="unaggregated"){const{valid:r,reason:o}=iC(t,n);if(!r){U(o);return}}else if(e===void 0&&i.useUnaggregatedDomain){const{valid:r}=iC(t,n);if(r)return"unaggregated"}return e}function Yle(e,t){const n=e.getScaleComponent(t).get("type"),{encoding:i}=e,r=Gle(e.scaleDomain(t),e.typedFieldDef(t),n,e.config.scale);return r!==e.scaleDomain(t)&&(e.specifiedScales[t]={...e.specifiedScales[t],domain:r}),t==="x"&&st(i.x2)?st(i.x)?Ko(ho(n,r,e,"x"),ho(n,r,e,"x2"),"domain","scale",Bv):ho(n,r,e,"x2"):t==="y"&&st(i.y2)?st(i.y)?Ko(ho(n,r,e,"y"),ho(n,r,e,"y2"),"domain","scale",Bv):ho(n,r,e,"y2"):ho(n,r,e,t)}function Xle(e,t,n){return e.map(i=>({signal:`{data: ${Dm(i,{timeUnit:n,type:t})}}`}))}function v1(e,t,n){var r;const i=(r=vt(n))==null?void 0:r.unit;return t==="temporal"||i?Xle(e,t,i):[e]}function ho(e,t,n,i){const{encoding:r,markDef:o,mark:s,config:a,stack:u}=n,l=st(r[i]),{type:c}=l,f=l.timeUnit;if(foe(t)){const p=ho(e,void 0,n,i),g=v1(t.unionWith,c,f);return Hi([...g,...p.value])}else{if(Q(t))return Hi([t]);if(t&&t!=="unaggregated"&&!QR(t))return Hi(v1(t,c,f))}if(u&&i===u.fieldChannel){if(u.offset==="normalize")return kn([[0,1]]);const p=n.requestDataName(ze.Main);return kn([{data:p,field:n.vgField(i,{suffix:"start"})},{data:p,field:n.vgField(i,{suffix:"end"})}])}const d=so(i)&&j(l)?Kle(n,i,e):void 0;if(_r(l)){const p=v1([l.datum],c,f);return kn(p)}const h=l;if(t==="unaggregated"){const p=n.requestDataName(ze.Main),{field:g}=l;return kn([{data:p,field:G({field:g,aggregate:"min"})},{data:p,field:G({field:g,aggregate:"max"})}])}else if(Be(h.bin)){if(bt(e))return kn(e==="bin-ordinal"?[]:[{data:uf(d)?n.requestDataName(ze.Main):n.requestDataName(ze.Raw),field:n.vgField(i,ed(h,i)?{binSuffix:"range"}:{}),sort:d===!0||!V(d)?{field:n.vgField(i,{}),op:"min"}:d}]);{const{bin:p}=h;if(Be(p)){const g=KE(n,h.field,p);return kn([new ft(()=>{const m=n.getSignalName(g);return`[${m}.start, ${m}.stop]`})])}else return kn([{data:n.requestDataName(ze.Main),field:n.vgField(i,{})}])}}else if(h.timeUnit&&ve(["time","utc"],e)){const p=r[wr(i)];if(h6(h,p,o,a)){const g=n.requestDataName(ze.Main),m=Vo({fieldDef:h,fieldDef2:p,markDef:o,config:a}),y=cf(s)&&m!==.5&&et(i);return kn([{data:g,field:n.vgField(i,y?{suffix:Im}:{})},{data:g,field:n.vgField(i,{suffix:y?zm:"end"})}])}}return kn(d?[{data:uf(d)?n.requestDataName(ze.Main):n.requestDataName(ze.Raw),field:n.vgField(i),sort:d}]:[{data:n.requestDataName(ze.Main),field:n.vgField(i)}])}function b1(e,t){const{op:n,field:i,order:r}=e;return{op:n??(t?"sum":km),...i?{field:ri(i)}:{},...r?{order:r}:{}}}function Vle(e,t){var a;const n=e.component.scales[t],i=e.specifiedScales[t].domain,r=(a=e.fieldDef(t))==null?void 0:a.bin,o=QR(i)&&i,s=Da(r)&&xm(r.extent)&&r.extent;(o||s)&&n.set("selectionExtent",o??s,!0)}function Kle(e,t,n){if(!bt(n))return;const i=e.fieldDef(t),r=i.sort;if(f6(r))return{op:"min",field:Ju(i,t),order:"ascending"};const{stack:o}=e,s=o?new Set([...o.groupbyFields,...o.stackBy.map(a=>a.fieldDef.field)]):void 0;if(er(r)){const a=o&&!s.has(r.field);return b1(r,a)}else if(c6(r)){const{encoding:a,order:u}=r,l=e.fieldDef(a),{aggregate:c,field:f}=l,d=o&&!s.has(f);if(Qr(c)||ds(c))return b1({field:G(l),order:u},d);if(Zw(c)||!c)return b1({op:c,field:f,order:u},d)}else{if(r==="descending")return{op:"min",field:e.vgField(t),order:"descending"};if(ve(["ascending",void 0],r))return!0}}function iC(e,t){const{aggregate:n,type:i}=e;return n?X(n)&&!$ie.has(n)?{valid:!1,reason:pre(n)}:i==="quantitative"&&t==="log"?{valid:!1,reason:gre(e)}:{valid:!0}:{valid:!1,reason:hre(e)}}function Bv(e,t,n,i){return e.explicit&&t.explicit&&U(xre(n,i,e.value,t.value)),{explicit:e.explicit,value:[...e.value,...t.value]}}function Jle(e){const t=Ki(e.map(s=>{if(Ur(s)){const{sort:a,...u}=s;return u}return s}),ye),n=Ki(e.map(s=>{if(Ur(s)){const a=s.sort;return a!==void 0&&!uf(a)&&("op"in a&&a.op==="count"&&delete a.field,a.order==="ascending"&&delete a.order),a}}).filter(s=>s!==void 0),ye);if(t.length===0)return;if(t.length===1){const s=e[0];if(Ur(s)&&n.length>0){let a=n[0];if(n.length>1){U(dk);const u=n.filter(l=>V(l)&&"op"in l&&l.op!=="min");n.every(l=>V(l)&&"op"in l)&&u.length===1?a=u[0]:a=!0}else if(V(a)&&"field"in a){const u=a.field;s.field===u&&(a=a.order?{order:a.order}:!0)}return{...s,sort:a}}return s}const i=Ki(n.map(s=>uf(s)||!("op"in s)||X(s.op)&&s.op in wie?s:(U(Ere(s)),!0)),ye);let r;i.length===1?r=i[0]:i.length>1&&(U(dk),r=!0);const o=Ki(e.map(s=>Ur(s)?s.data:null),s=>s);return o.length===1&&o[0]!==null?{data:o[0],fields:t.map(a=>a.field),...r?{sort:r}:{}}:{fields:t,...r?{sort:r}:{}}}function e_(e){if(Ur(e)&&X(e.field))return e.field;if(Aie(e)){let t;for(const n of e.fields)if(Ur(n)&&X(n.field)){if(!t)t=n.field;else if(t!==n.field)return U(_re),t}return U(Sre),t}else if(kie(e)){U($re);const t=e.fields[0];return X(t)?t:void 0}}function Wm(e,t){const i=e.component.scales[t].get("domains").map(r=>(Ur(r)&&(r.data=e.lookupDataSource(r.data)),r));return Jle(i)}function tL(e){return El(e)||t_(e)?e.children.reduce((t,n)=>t.concat(tL(n)),rC(e)):rC(e)}function rC(e){return B(e.component.scales).reduce((t,n)=>{const i=e.component.scales[n];if(i.merged)return t;const r=i.combine(),{name:o,type:s,selectionExtent:a,domains:u,range:l,reverse:c,...f}=r,d=Qle(r.range,o,n,e),h=Wm(e,n),p=a?Gae(e,a,i,h):null;return t.push({name:o,type:s,...h?{domain:h}:{},...p?{domainRaw:p}:{},range:d,...c!==void 0?{reverse:c}:{},...f}),t},[])}function Qle(e,t,n,i){if(et(n)){if(hs(e))return{step:{signal:`${t}_step`}}}else if(V(e)&&Ur(e))return{...e,data:i.lookupDataSource(e.data)};return e}class nL extends uo{constructor(t,n){super({},{name:t}),this.merged=!1,this.setWithExplicit("type",n)}domainDefinitelyIncludesZero(){return this.get("zero")!==!1?!0:ca(this.get("domains"),t=>P(t)&&t.length===2&&Ee(t[0])&&t[0]<=0&&Ee(t[1])&&t[1]>=0)}}const Zle=["range","scheme"];function ece(e){const t=e.component.scales;for(const n of bm){const i=t[n];if(!i)continue;const r=tce(n,e);i.setWithExplicit("range",r)}}function oC(e,t){const n=e.fieldDef(t);if(n!=null&&n.bin){const{bin:i,field:r}=n,o=Sn(t),s=e.getName(o);if(V(i)&&i.binned&&i.step!==void 0)return new ft(()=>{const a=e.scaleName(t),u=`(domain("${a}")[1] - domain("${a}")[0]) / ${i.step}`;return`${e.getSignalName(s)} / (${u})`});if(Be(i)){const a=KE(e,r,i);return new ft(()=>{const u=e.getSignalName(a),l=`(${u}.stop - ${u}.start) / ${u}.step`;return`${e.getSignalName(s)} / (${l})`})}}}function tce(e,t){const n=t.specifiedScales[e],{size:i}=t,o=t.getScaleComponent(e).get("type");for(const f of Zle)if(n[f]!==void 0){const d=Sv(o,f),h=ZR(e,f);if(!d)U(DR(o,f,e));else if(h)U(h);else switch(f){case"range":{const p=n.range;if(P(p)){if(et(e))return Hi(p.map(g=>{if(g==="width"||g==="height"){const m=t.getName(g),y=t.getSignalName.bind(t);return ft.fromName(y,m)}return g}))}else if(V(p))return Hi({data:t.requestDataName(ze.Main),field:p.field,sort:{op:"min",field:t.vgField(e)}});return Hi(p)}case"scheme":return Hi(nce(n[f]))}}const s=e===He||e==="xOffset"?"width":"height",a=i[s];if(fr(a)){if(et(e))if(bt(o)){const f=rL(a,t,e);if(f)return Hi({step:f})}else U(NR(s));else if(Xf(e)){const f=e===as?"x":"y";if(t.getScaleComponent(f).get("type")==="band"){const p=oL(a,o);if(p)return Hi(p)}}}const{rangeMin:u,rangeMax:l}=n,c=ice(e,t);return(u!==void 0||l!==void 0)&&Sv(o,"rangeMin")&&P(c)&&c.length===2?Hi([u??c[0],l??c[1]]):kn(c)}function nce(e){return coe(e)?{scheme:e.name,...yn(e,["name"])}:{scheme:e}}function iL(e,t,n,{center:i}={}){const r=Sn(e),o=t.getName(r),s=t.getSignalName.bind(t);return e===wt&&Un(n)?i?[ft.fromName(a=>`${s(a)}/2`,o),ft.fromName(a=>`-${s(a)}/2`,o)]:[ft.fromName(s,o),0]:i?[ft.fromName(a=>`-${s(a)}/2`,o),ft.fromName(a=>`${s(a)}/2`,o)]:[0,ft.fromName(s,o)]}function ice(e,t){const{size:n,config:i,mark:r,encoding:o}=t,{type:s}=st(o[e]),u=t.getScaleComponent(e).get("type"),{domain:l,domainMid:c}=t.specifiedScales[e];switch(e){case He:case wt:{if(ve(["point","band"],u)){const f=sL(e,n,i.view);if(fr(f))return{step:rL(f,t,e)}}return iL(e,t,u)}case as:case ml:return rce(e,t,u);case ro:{const f=t.component.scales[e].get("zero"),d=aL(r,f,i),h=ace(r,n,t,i);return Wu(u)?sce(d,h,oce(u,i,l,e)):[d,h]}case ai:return[0,Math.PI*2];case Ma:return[0,360];case Ri:return[0,new ft(()=>{const f=t.getSignalName(Ln(t.parent)?"child_width":"width"),d=t.getSignalName(Ln(t.parent)?"child_height":"height");return`min(${f},${d})/2`})];case cs:return[i.scale.minStrokeWidth,i.scale.maxStrokeWidth];case fs:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case _n:return"symbol";case En:case br:case xr:return u==="ordinal"?s==="nominal"?"category":"ordinal":c!==void 0?"diverging":r==="rect"||r==="geoshape"?"heatmap":"ramp";case oo:case us:case ls:return[i.scale.minOpacity,i.scale.maxOpacity]}}function rL(e,t,n){const{encoding:i}=t,r=t.getScaleComponent(n),o=Vw(n),s=i[o];if(W6({step:e,offsetIsDiscrete:ue(s)&&YR(s.type)})==="offset"&&$6(i,o)){const u=t.getScaleComponent(o);let c=`domain('${t.scaleName(o)}').length`;if(u.get("type")==="band"){const d=u.get("paddingInner")??u.get("padding")??0,h=u.get("paddingOuter")??u.get("padding")??0;c=`bandspace(${c}, ${d}, ${h})`}const f=r.get("paddingInner")??r.get("padding");return{signal:`${e.step} * ${c} / (1-${Tie(f)})`}}else return e.step}function oL(e,t){if(W6({step:e,offsetIsDiscrete:bt(t)})==="offset")return{step:e.step}}function rce(e,t,n){const i=e===as?"x":"y",r=t.getScaleComponent(i);if(!r)return iL(i,t,n,{center:!0});const o=r.get("type"),s=t.scaleName(i),{markDef:a,config:u}=t;if(o==="band"){const l=sL(i,t.size,t.config.view);if(fr(l)){const c=oL(l,n);if(c)return c}return[0,{signal:`bandwidth('${s}')`}]}else{const l=t.encoding[i];if(j(l)&&l.timeUnit){const c=qR(l.timeUnit,p=>`scale('${s}', ${p})`),f=t.config.scale.bandWithNestedOffsetPaddingInner,d=Vo({fieldDef:l,markDef:a,config:u})-.5,h=d!==0?` + ${d}`:"";if(f){const p=Q(f)?`${f.signal}/2`+h:`${f/2+d}`,g=Q(f)?`(1 - ${f.signal}/2)`+h:`${1-f/2+d}`;return[{signal:`${p} * (${c})`},{signal:`${g} * (${c})`}]}return[0,{signal:c}]}return ZO(`Cannot use ${e} scale if ${i} scale is not discrete.`)}}function sL(e,t,n){const i=e===He?"width":"height",r=t[i];return r||qp(n,i)}function oce(e,t,n,i){switch(e){case"quantile":return t.scale.quantileCount;case"quantize":return t.scale.quantizeCount;case"threshold":return n!==void 0&&P(n)?n.length+1:(U(Ore(i)),3)}}function sce(e,t,n){const i=()=>{const r=wi(t),o=wi(e),s=`(${r} - ${o}) / (${n} - 1)`;return`sequence(${o}, ${r} + ${s}, ${s})`};return Q(t)?new ft(i):{signal:i()}}function aL(e,t,n){if(t)return Q(t)?{signal:`${t.signal} ? 0 : ${aL(e,!1,n)}`}:0;switch(e){case"bar":case"tick":return n.scale.minBandSize;case"line":case"trail":case"rule":return n.scale.minStrokeWidth;case"text":return n.scale.minFontSize;case"point":case"square":case"circle":return n.scale.minSize}throw new Error(wm("size",e))}const sC=.95;function ace(e,t,n,i){const r={x:oC(n,"x"),y:oC(n,"y")};switch(e){case"bar":case"tick":{if(i.scale.maxBandSize!==void 0)return i.scale.maxBandSize;const o=aC(t,r,i.view);return Ee(o)?o-1:new ft(()=>`${o.signal} - 1`)}case"line":case"trail":case"rule":return i.scale.maxStrokeWidth;case"text":return i.scale.maxFontSize;case"point":case"square":case"circle":{if(i.scale.maxSize)return i.scale.maxSize;const o=aC(t,r,i.view);return Ee(o)?Math.pow(sC*o,2):new ft(()=>`pow(${sC} * ${o.signal}, 2)`)}}throw new Error(wm("size",e))}function aC(e,t,n){const i=fr(e.width)?e.width.step:jp(n,"width"),r=fr(e.height)?e.height.step:jp(n,"height");return t.x||t.y?new ft(()=>`min(${[t.x?t.x.signal:i,t.y?t.y.signal:r].join(", ")})`):Math.min(i,r)}function uL(e,t){Ve(e)?uce(e,t):cL(e,t)}function uce(e,t){const n=e.component.scales,{config:i,encoding:r,markDef:o,specifiedScales:s}=e;for(const a of B(n)){const u=s[a],l=n[a],c=e.getScaleComponent(a),f=st(r[a]),d=u[t],h=c.get("type"),p=c.get("padding"),g=c.get("paddingInner"),m=Sv(h,t),y=ZR(a,t);if(d!==void 0&&(m?y&&U(y):U(DR(h,t,a))),m&&y===void 0)if(d!==void 0){const v=f.timeUnit,b=f.type;switch(t){case"domainMax":case"domainMin":Na(u[t])||b==="temporal"||v?l.set(t,{signal:Dm(u[t],{type:b,timeUnit:v})},!0):l.set(t,u[t],!0);break;default:l.copyKeyFromObject(t,u)}}else{const v=t in uC?uC[t]({model:e,channel:a,fieldOrDatumDef:f,scaleType:h,scalePadding:p,scalePaddingInner:g,domain:u.domain,domainMin:u.domainMin,domainMax:u.domainMax,markDef:o,config:i,hasNestedOffsetScale:A6(r,a),hasSecondaryRangeChannel:!!r[wr(a)]}):i.scale[t];v!==void 0&&l.set(t,v,!1)}}}const uC={bins:({model:e,fieldOrDatumDef:t})=>j(t)?lce(e,t):void 0,interpolate:({channel:e,fieldOrDatumDef:t})=>cce(e,t.type),nice:({scaleType:e,channel:t,domain:n,domainMin:i,domainMax:r,fieldOrDatumDef:o})=>fce(e,t,n,i,r,o),padding:({channel:e,scaleType:t,fieldOrDatumDef:n,markDef:i,config:r})=>dce(e,t,r.scale,n,i,r.bar),paddingInner:({scalePadding:e,channel:t,markDef:n,scaleType:i,config:r,hasNestedOffsetScale:o})=>hce(e,t,n.type,i,r.scale,o),paddingOuter:({scalePadding:e,channel:t,scaleType:n,scalePaddingInner:i,config:r,hasNestedOffsetScale:o})=>pce(e,t,n,i,r.scale,o),reverse:({fieldOrDatumDef:e,scaleType:t,channel:n,config:i})=>{const r=j(e)?e.sort:void 0;return gce(t,r,n,i.scale)},zero:({channel:e,fieldOrDatumDef:t,domain:n,markDef:i,scaleType:r,config:o,hasSecondaryRangeChannel:s})=>mce(e,t,n,i,r,o.scale,s)};function lL(e){Ve(e)?ece(e):cL(e,"range")}function cL(e,t){const n=e.component.scales;for(const i of e.children)t==="range"?lL(i):uL(i,t);for(const i of B(n)){let r;for(const o of e.children){const s=o.component.scales[i];if(s){const a=s.getWithExplicit(t);r=Ko(r,a,t,"scale",i4((u,l)=>{switch(t){case"range":return u.step&&l.step?u.step-l.step:0}return 0}))}}n[i].setWithExplicit(t,r)}}function lce(e,t){const n=t.bin;if(Be(n)){const i=KE(e,t.field,n);return new ft(()=>e.getSignalName(i))}else if(_t(n)&&Da(n)&&n.step!==void 0)return{step:n.step}}function cce(e,t){if(ve([En,br,xr],e)&&t!=="nominal")return"hcl"}function fce(e,t,n,i,r,o){var s;if(!((s=cr(o))!=null&&s.bin||P(n)||r!=null||i!=null||ve([vn.TIME,vn.UTC],e)))return et(t)?!0:void 0}function dce(e,t,n,i,r,o){if(et(e)){if(Ei(t)){if(n.continuousPadding!==void 0)return n.continuousPadding;const{type:s,orient:a}=r;if(s==="bar"&&!(j(i)&&(i.bin||i.timeUnit))&&(a==="vertical"&&e==="x"||a==="horizontal"&&e==="y"))return o.continuousBandSize}if(t===vn.POINT)return n.pointPadding}}function hce(e,t,n,i,r,o=!1){if(e===void 0){if(et(t)){const{bandPaddingInner:s,barBandPaddingInner:a,rectBandPaddingInner:u,bandWithNestedOffsetPaddingInner:l}=r;return o?l:Ze(s,n==="bar"?a:u)}else if(Xf(t)&&i===vn.BAND)return r.offsetBandPaddingInner}}function pce(e,t,n,i,r,o=!1){if(e===void 0){if(et(t)){const{bandPaddingOuter:s,bandWithNestedOffsetPaddingOuter:a}=r;if(o)return a;if(n===vn.BAND)return Ze(s,Q(i)?{signal:`${i.signal}/2`}:i/2)}else if(Xf(t)){if(n===vn.POINT)return .5;if(n===vn.BAND)return r.offsetBandPaddingOuter}}}function gce(e,t,n,i){if(n==="x"&&i.xReverse!==void 0)return Un(e)&&t==="descending"?Q(i.xReverse)?{signal:`!${i.xReverse.signal}`}:!i.xReverse:i.xReverse;if(Un(e)&&t==="descending")return!0}function mce(e,t,n,i,r,o,s){if(!!n&&n!=="unaggregated"&&Un(r)){if(P(n)){const u=n[0],l=n[n.length-1];if(Ee(u)&&u<=0&&Ee(l)&&l>=0)return!0}return!1}if(e==="size"&&t.type==="quantitative"&&!Wu(r))return!0;if(!(j(t)&&t.bin)&&ve([...Er,...hie],e)){const{orient:u,type:l}=i;return ve(["bar","area","line","trail"],l)&&(u==="horizontal"&&e==="y"||u==="vertical"&&e==="x")?!1:ve(["bar","area"],l)&&!s?!0:o==null?void 0:o.zero}return!1}function yce(e,t,n,i,r=!1){const o=vce(t,n,i,r),{type:s}=e;return so(t)?s!==void 0?yoe(t,s)?j(n)&&!moe(s,n.type)?(U(vre(s,o)),o):s:(U(yre(t,s,o)),o):o:null}function vce(e,t,n,i){var r;switch(t.type){case"nominal":case"ordinal":{if(pu(e)||c1(e)==="discrete")return e==="shape"&&t.type==="ordinal"&&U(f1(e,"ordinal")),"ordinal";if(et(e)||Xf(e)){if(ve(["rect","bar","image","rule"],n.type)||i)return"band"}else if(n.type==="arc"&&e in Qw)return"band";const o=n[Sn(e)];return ga(o)||Gu(t)&&((r=t.axis)!=null&&r.tickBand)?"band":"point"}case"temporal":return pu(e)?"time":c1(e)==="discrete"?(U(f1(e,"temporal")),"ordinal"):j(t)&&t.timeUnit&&vt(t.timeUnit).utc?"utc":"time";case"quantitative":return pu(e)?j(t)&&Be(t.bin)?"bin-ordinal":"linear":c1(e)==="discrete"?(U(f1(e,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(MR(t.type))}function bce(e,{ignoreRange:t}={}){fL(e),eL(e);for(const n of goe)uL(e,n);t||lL(e)}function fL(e){Ve(e)?e.component.scales=xce(e):e.component.scales=Ece(e)}function xce(e){const{encoding:t,mark:n,markDef:i}=e,r={};for(const o of bm){const s=st(t[o]);if(s&&n===n6&&o===_n&&s.type===yl)continue;let a=s&&s.scale;if(s&&a!==null&&a!==!1){a??(a={});const u=A6(t,o),l=yce(a,o,s,i,u);r[o]=new nL(e.scaleName(`${o}`,!0),{value:l,explicit:a.type===l})}}return r}const wce=i4((e,t)=>pk(e)-pk(t));function Ece(e){var t;const n=e.component.scales={},i={},r=e.component.resolve;for(const o of e.children){fL(o);for(const s of B(o.component.scales))if((t=r.scale)[s]??(t[s]=U4(s,e)),r.scale[s]==="shared"){const a=i[s],u=o.component.scales[s].getWithExplicit("type");a?ooe(a.value,u.value)?i[s]=Ko(a,u,"type","scale",wce):(r.scale[s]="independent",delete i[s]):i[s]=u}}for(const o of B(i)){const s=e.scaleName(o,!0),a=i[o];n[o]=new nL(s,a);for(const u of e.children){const l=u.component.scales[o];l&&(u.renameScale(l.get("name"),s),l.merged=!0)}}return n}class x1{constructor(){this.nameMap={}}rename(t,n){this.nameMap[t]=n}has(t){return this.nameMap[t]!==void 0}get(t){for(;this.nameMap[t]&&t!==this.nameMap[t];)t=this.nameMap[t];return t}}function Ve(e){return(e==null?void 0:e.type)==="unit"}function Ln(e){return(e==null?void 0:e.type)==="facet"}function t_(e){return(e==null?void 0:e.type)==="concat"}function El(e){return(e==null?void 0:e.type)==="layer"}class n_{constructor(t,n,i,r,o,s,a){this.type=n,this.parent=i,this.config=o,this.correctDataNames=u=>{var l,c,f;return(l=u.from)!=null&&l.data&&(u.from.data=this.lookupDataSource(u.from.data)),(f=(c=u.from)==null?void 0:c.facet)!=null&&f.data&&(u.from.facet.data=this.lookupDataSource(u.from.facet.data)),u},this.parent=i,this.config=o,this.view=pn(a),this.name=t.name??r,this.title=vo(t.title)?{text:t.title}:t.title?pn(t.title):void 0,this.scaleNameMap=i?i.scaleNameMap:new x1,this.projectionNameMap=i?i.projectionNameMap:new x1,this.signalNameMap=i?i.signalNameMap:new x1,this.data=t.data,this.description=t.description,this.transforms=Fae(t.transform??[]),this.layout=n==="layer"||n==="unit"?{}:Nse(t,n,o),this.component={data:{sources:i?i.component.data.sources:[],outputNodes:i?i.component.data.outputNodes:{},outputNodeRefCounts:i?i.component.data.outputNodeRefCounts:{},isFaceted:Cm(t)||(i==null?void 0:i.component.data.isFaceted)&&t.data===void 0},layoutSize:new uo,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:{scale:{},axis:{},legend:{},...s?ae(s):{}},selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){bce(this)}parseProjection(){J4(this)}renameTopLevelLayoutSizeSignal(){this.getName("width")!=="width"&&this.renameSignal(this.getName("width"),"width"),this.getName("height")!=="height"&&this.renameSignal(this.getName("height"),"height")}parseLegends(){G4(this)}assembleEncodeFromView(t){const{style:n,...i}=t,r={};for(const o of B(i)){const s=i[o];s!==void 0&&(r[o]=je(s))}return r}assembleGroupEncodeEntry(t){let n={};return this.view&&(n=this.assembleEncodeFromView(this.view)),!t&&(this.description&&(n.description=je(this.description)),this.type==="unit"||this.type==="layer")?{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height"),...n}:Oe(n)?void 0:n}assembleLayout(){if(!this.layout)return;const{spacing:t,...n}=this.layout,{component:i,config:r}=this,o=que(i.layoutHeaders,r);return{padding:t,...this.assembleDefaultLayout(),...n,...o?{titleBand:o}:{}}}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:t}=this.component;let n=[];for(const i of Kn)t[i].title&&n.push(Pue(this,i));for(const i of GE)n=n.concat(Iue(this,i));return n}assembleAxes(){return Sue(this.component.axes,this.config)}assembleLegends(){return X4(this)}assembleProjections(){return dle(this)}assembleTitle(){const{encoding:t,...n}=this.title??{},i={...wR(this.config.title).nonMarkTitleProperties,...n,...t?{encode:{update:t}}:{}};if(i.text)return ve(["unit","layer"],this.type)?ve(["middle",void 0],i.anchor)&&(i.frame??(i.frame="group")):i.anchor??(i.anchor="start"),Oe(i)?void 0:i}assembleGroup(t=[]){const n={};t=t.concat(this.assembleSignals()),t.length>0&&(n.signals=t);const i=this.assembleLayout();i&&(n.layout=i),n.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const r=!this.parent||Ln(this.parent)?tL(this):[];r.length>0&&(n.scales=r);const o=this.assembleAxes();o.length>0&&(n.axes=o);const s=this.assembleLegends();return s.length>0&&(n.legends=s),n}getName(t){return We((this.name?`${this.name}_`:"")+t)}getDataName(t){return this.getName(ze[t].toLowerCase())}requestDataName(t){const n=this.getDataName(t),i=this.component.data.outputNodeRefCounts;return i[n]=(i[n]||0)+1,n}getSizeSignalRef(t){if(Ln(this.parent)){const n=z4(t),i=vm(n),r=this.component.scales[i];if(r&&!r.merged){const o=r.get("type"),s=r.get("range");if(bt(o)&&hs(s)){const a=r.get("name"),u=Wm(this,i),l=e_(u);if(l){const c=G({aggregate:"distinct",field:l},{expr:"datum"});return{signal:I4(a,r,c)}}else return U(tE(i)),null}}}return{signal:this.signalNameMap.get(this.getName(t))}}lookupDataSource(t){const n=this.component.data.outputNodes[t];return n?n.getSource():t}getSignalName(t){return this.signalNameMap.get(t)}renameSignal(t,n){this.signalNameMap.rename(t,n)}renameScale(t,n){this.scaleNameMap.rename(t,n)}renameProjection(t,n){this.projectionNameMap.rename(t,n)}scaleName(t,n){if(n)return this.getName(t);if(dR(t)&&so(t)&&this.component.scales[t]||this.scaleNameMap.has(this.getName(t)))return this.scaleNameMap.get(this.getName(t))}projectionName(t){if(t)return this.getName("projection");if(this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection")))return this.projectionNameMap.get(this.getName("projection"))}getScaleComponent(t){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const n=this.component.scales[t];return n&&!n.merged?n:this.parent?this.parent.getScaleComponent(t):void 0}getSelectionComponent(t,n){let i=this.component.selection[t];if(!i&&this.parent&&(i=this.parent.getSelectionComponent(t,n)),!i)throw new Error(Lie(n));return i}hasAxisOrientSignalRef(){var t,n;return((t=this.component.axes.x)==null?void 0:t.some(i=>i.hasOrientSignalRef()))||((n=this.component.axes.y)==null?void 0:n.some(i=>i.hasOrientSignalRef()))}}class dL extends n_{vgField(t,n={}){const i=this.fieldDef(t);if(i)return G(i,n)}reduceFieldDef(t,n){return use(this.getMapping(),(i,r,o)=>{const s=cr(r);return s?t(i,s,o):i},n)}forEachFieldDef(t,n){CE(this.getMapping(),(i,r)=>{const o=cr(i);o&&t(o,r)},n)}}class Hm extends Ne{clone(){return new Hm(null,ae(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=ae(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"value",i[1]??"density"]}dependentFields(){return new Set([this.transform.density,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${ye(this.transform)}`}assemble(){const{density:t,...n}=this.transform,i={type:"kde",field:t,...n};return this.transform.groupby&&(i.resolve="shared"),i}}class Gm extends Ne{clone(){return new Gm(null,ae(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=ae(n)}dependentFields(){return new Set([this.transform.extent])}producedFields(){return new Set([])}hash(){return`ExtentTransform ${ye(this.transform)}`}assemble(){const{extent:t,param:n}=this.transform;return{type:"extent",field:t,signal:n}}}class df extends Ne{clone(){return new df(null,{...this.filter})}constructor(t,n){super(t),this.filter=n}static make(t,n){const{config:i,mark:r,markDef:o}=n;if(Fe("invalid",o,i)!=="filter")return null;const a=n.reduceFieldDef((u,l,c)=>{const f=so(c)&&n.getScaleComponent(c);if(f){const d=f.get("type");Un(d)&&l.aggregate!=="count"&&!ps(r)&&(u[l.field]=l)}return u},{});return B(a).length?new df(t,a):null}dependentFields(){return new Set(B(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${ye(this.filter)}`}assemble(){const t=B(this.filter).reduce((n,i)=>{const r=this.filter[i],o=G(r,{expr:"datum"});return r!==null&&(r.type==="temporal"?n.push(`(isDate(${o}) || (isValid(${o}) && isFinite(+${o})))`):r.type==="quantitative"&&(n.push(`isValid(${o})`),n.push(`isFinite(+${o})`))),n},[]);return t.length>0?{type:"filter",expr:t.join(" && ")}:null}}class Ym extends Ne{clone(){return new Ym(this.parent,ae(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=ae(n);const{flatten:i,as:r=[]}=this.transform;this.transform.as=i.map((o,s)=>r[s]??o)}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${ye(this.transform)}`}assemble(){const{flatten:t,as:n}=this.transform;return{type:"flatten",fields:t,as:n}}}class Xm extends Ne{clone(){return new Xm(null,ae(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=ae(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"key",i[1]??"value"]}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${ye(this.transform)}`}assemble(){const{fold:t,as:n}=this.transform;return{type:"fold",fields:t,as:n}}}class yu extends Ne{clone(){return new yu(null,ae(this.fields),this.geojson,this.signal)}static parseAll(t,n){if(n.component.projection&&!n.component.projection.isFit)return t;let i=0;for(const r of[[Pi,Li],[oi,Ii]]){const o=r.map(s=>{const a=st(n.encoding[s]);return j(a)?a.field:_r(a)?{expr:`${a.datum}`}:Fi(a)?{expr:`${a.value}`}:void 0});(o[0]||o[1])&&(t=new yu(t,o,null,n.getName(`geojson_${i++}`)))}if(n.channelHasField(_n)){const r=n.typedFieldDef(_n);r.type===yl&&(t=new yu(t,null,r.field,n.getName(`geojson_${i++}`)))}return t}constructor(t,n,i,r){super(t),this.fields=n,this.geojson=i,this.signal=r}dependentFields(){const t=(this.fields??[]).filter(X);return new Set([...this.geojson?[this.geojson]:[],...t])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${ye(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],{type:"geojson",...this.fields?{fields:this.fields}:{},...this.geojson?{geojson:this.geojson}:{},signal:this.signal}]}}class hf extends Ne{clone(){return new hf(null,this.projection,ae(this.fields),ae(this.as))}constructor(t,n,i,r){super(t),this.projection=n,this.fields=i,this.as=r}static parseAll(t,n){if(!n.projectionName())return t;for(const i of[[Pi,Li],[oi,Ii]]){const r=i.map(s=>{const a=st(n.encoding[s]);return j(a)?a.field:_r(a)?{expr:`${a.datum}`}:Fi(a)?{expr:`${a.value}`}:void 0}),o=i[0]===oi?"2":"";(r[0]||r[1])&&(t=new hf(t,n.projectionName(),r,[n.getName(`x${o}`),n.getName(`y${o}`)]))}return t}dependentFields(){return new Set(this.fields.filter(X))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${ye(this.fields)} ${ye(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class Js extends Ne{clone(){return new Js(null,ae(this.transform))}constructor(t,n){super(t),this.transform=n}dependentFields(){return new Set([this.transform.impute,this.transform.key,...this.transform.groupby??[]])}producedFields(){return new Set([this.transform.impute])}processSequence(t){const{start:n=0,stop:i,step:r}=t;return{signal:`sequence(${[n,i,...r?[r]:[]].join(",")})`}}static makeFromTransform(t,n){return new Js(t,n)}static makeFromEncoding(t,n){const i=n.encoding,r=i.x,o=i.y;if(j(r)&&j(o)){const s=r.impute?r:o.impute?o:void 0;if(s===void 0)return;const a=r.impute?o:o.impute?r:void 0,{method:u,value:l,frame:c,keyvals:f}=s.impute,d=C6(n.mark,i);return new Js(t,{impute:s.field,key:a.field,...u?{method:u}:{},...l!==void 0?{value:l}:{},...c?{frame:c}:{},...f!==void 0?{keyvals:f}:{},...d.length?{groupby:d}:{}})}return null}hash(){return`Impute ${ye(this.transform)}`}assemble(){const{impute:t,key:n,keyvals:i,method:r,groupby:o,value:s,frame:a=[null,null]}=this.transform,u={type:"impute",field:t,key:n,...i?{keyvals:cae(i)?this.processSequence(i):i}:{},method:"value",...o?{groupby:o}:{},value:!r||r==="value"?s:null};if(r&&r!=="value"){const l={type:"window",as:[`imputed_${t}_value`],ops:[r],fields:[t],frame:a,ignorePeers:!1,...o?{groupby:o}:{}},c={type:"formula",expr:`datum.${t} === null ? datum.imputed_${t}_value : datum.${t}`,as:t};return[u,l,c]}else return[u]}}class Vm extends Ne{clone(){return new Vm(null,ae(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=ae(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??n.on,i[1]??n.loess]}dependentFields(){return new Set([this.transform.loess,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${ye(this.transform)}`}assemble(){const{loess:t,on:n,...i}=this.transform;return{type:"loess",x:n,y:t,...i}}}class pf extends Ne{clone(){return new pf(null,ae(this.transform),this.secondary)}constructor(t,n,i){super(t),this.transform=n,this.secondary=i}static make(t,n,i,r){const o=n.component.data.sources,{from:s}=i;let a=null;if(fae(s)){let u=gL(s.data,o);u||(u=new ba(s.data),o.push(u));const l=n.getName(`lookup_${r}`);a=new on(u,l,ze.Lookup,n.component.data.outputNodeRefCounts),n.component.data.outputNodes[l]=a}else if(dae(s)){const u=s.param;i={as:u,...i};let l;try{l=n.getSelectionComponent(We(u),u)}catch{throw new Error(Bie(u))}if(a=l.materialized,!a)throw new Error(Uie(u))}return new pf(t,i,a.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?Y(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${ye({transform:this.transform,secondary:this.secondary})}`}assemble(){let t;if(this.transform.from.fields)t={values:this.transform.from.fields,...this.transform.as?{as:Y(this.transform.as)}:{}};else{let n=this.transform.as;X(n)||(U(Vie),n="_lookup"),t={as:[n]}}return{type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup],...t,...this.transform.default?{default:this.transform.default}:{}}}}class Km extends Ne{clone(){return new Km(null,ae(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=ae(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"prob",i[1]??"value"]}dependentFields(){return new Set([this.transform.quantile,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${ye(this.transform)}`}assemble(){const{quantile:t,...n}=this.transform;return{type:"quantile",field:t,...n}}}class Jm extends Ne{clone(){return new Jm(null,ae(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=ae(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??n.on,i[1]??n.regression]}dependentFields(){return new Set([this.transform.regression,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${ye(this.transform)}`}assemble(){const{regression:t,on:n,...i}=this.transform;return{type:"regression",x:n,y:t,...i}}}class Qm extends Ne{clone(){return new Qm(null,ae(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=Ki((this.transform.groupby??[]).concat(t),n=>n)}producedFields(){}dependentFields(){return new Set([this.transform.pivot,this.transform.value,...this.transform.groupby??[]])}hash(){return`PivotTransform ${ye(this.transform)}`}assemble(){const{pivot:t,value:n,groupby:i,limit:r,op:o}=this.transform;return{type:"pivot",field:t,value:n,...r!==void 0?{limit:r}:{},...o!==void 0?{op:o}:{},...i!==void 0?{groupby:i}:{}}}}class Zm extends Ne{clone(){return new Zm(null,ae(this.transform))}constructor(t,n){super(t),this.transform=n}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${ye(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function hL(e){let t=0;function n(i,r){if(i instanceof ba&&!i.isGenerator&&!Xu(i.data)&&(e.push(r),r={name:null,source:r.name,transform:[]}),i instanceof zt&&(i.parent instanceof ba&&!r.source?(r.format={...r.format,parse:i.assembleFormatParse()},r.transform.push(...i.assembleTransforms(!0))):r.transform.push(...i.assembleTransforms())),i instanceof xl){r.name||(r.name=`data_${t++}`),!r.source||r.transform.length>0?(e.push(r),i.data=r.name):i.data=r.source,e.push(...i.assemble());return}switch((i instanceof id||i instanceof rd||i instanceof df||i instanceof bl||i instanceof Ku||i instanceof hf||i instanceof $i||i instanceof pf||i instanceof wl||i instanceof Pa||i instanceof Xm||i instanceof Ym||i instanceof Hm||i instanceof Vm||i instanceof Km||i instanceof Jm||i instanceof Zo||i instanceof Zm||i instanceof Qm||i instanceof Gm)&&r.transform.push(i.assemble()),(i instanceof nr||i instanceof tr||i instanceof Js||i instanceof Xr||i instanceof yu)&&r.transform.push(...i.assemble()),i instanceof on&&(r.source&&r.transform.length===0?i.setSource(r.source):i.parent instanceof on?i.setSource(r.name):(r.name||(r.name=`data_${t++}`),i.setSource(r.name),i.numChildren()===1&&(e.push(r),r={name:null,source:r.name,transform:[]}))),i.numChildren()){case 0:i instanceof on&&(!r.source||r.transform.length>0)&&e.push(r);break;case 1:n(i.children[0],r);break;default:{r.name||(r.name=`data_${t++}`);let o=r.name;!r.source||r.transform.length>0?e.push(r):o=r.source;for(const s of i.children)n(s,{name:null,source:o,transform:[]});break}}}return n}function _ce(e){const t=[],n=hL(t);for(const i of e.children)n(i,{source:e.name,name:null,transform:[]});return t}function Sce(e,t){const n=[],i=hL(n);let r=0;for(const s of e.sources){s.hasName()||(s.dataName=`source_${r++}`);const a=s.assemble();i(s,a)}for(const s of n)s.transform.length===0&&delete s.transform;let o=0;for(const[s,a]of n.entries())(a.transform??[]).length===0&&!a.source&&n.splice(o++,0,n.splice(s,1)[0]);for(const s of n)for(const a of s.transform??[])a.type==="lookup"&&(a.from=e.outputNodes[a.from].getSource());for(const s of n)s.name in t&&(s.values=t[s.name]);return n}function $ce(e){return e==="top"||e==="left"||Q(e)?"header":"footer"}function Ace(e){for(const t of Kn)kce(e,t);lC(e,"x"),lC(e,"y")}function kce(e,t){var s;const{facet:n,config:i,child:r,component:o}=e;if(e.channelHasField(t)){const a=n[t],u=Qu("title",null,i,t);let l=gu(a,i,{allowDisabling:!0,includeDefault:u===void 0||!!u});r.component.layoutHeaders[t].title&&(l=P(l)?l.join(", "):l,l+=` / ${r.component.layoutHeaders[t].title}`,r.component.layoutHeaders[t].title=null);const c=Qu("labelOrient",a.header,i,t),f=a.header!==null?Ze((s=a.header)==null?void 0:s.labels,i.header.labels,!0):!1,d=ve(["bottom","right"],c)?"footer":"header";o.layoutHeaders[t]={title:a.header!==null?l:null,facetFieldDef:a,[d]:t==="facet"?[]:[pL(e,t,f)]}}}function pL(e,t,n){const i=t==="row"?"height":"width";return{labels:n,sizeSignal:e.child.component.layoutSize.get(i)?e.child.getSizeSignalRef(i):void 0,axes:[]}}function lC(e,t){const{child:n}=e;if(n.component.axes[t]){const{layoutHeaders:i,resolve:r}=e.component;if(r.axis[t]=VE(r,t),r.axis[t]==="shared"){const o=t==="x"?"column":"row",s=i[o];for(const a of n.component.axes[t]){const u=$ce(a.get("orient"));s[u]??(s[u]=[pL(e,o,!1)]);const l=yc(a,"main",e.config,{header:!0});l&&s[u][0].axes.push(l),a.mainExtracted=!0}}}}function Cce(e){i_(e),Yp(e,"width"),Yp(e,"height")}function Fce(e){i_(e);const t=e.layout.columns===1?"width":"childWidth",n=e.layout.columns===void 0?"height":"childHeight";Yp(e,t),Yp(e,n)}function i_(e){for(const t of e.children)t.parseLayoutSize()}function Yp(e,t){const n=z4(t),i=vm(n),r=e.component.resolve,o=e.component.layoutSize;let s;for(const a of e.children){const u=a.component.layoutSize.getWithExplicit(n),l=r.scale[i]??U4(i,e);if(l==="independent"&&u.value==="step"){s=void 0;break}if(s){if(l==="independent"&&s.value!==u.value){s=void 0;break}s=Ko(s,u,n,"")}else s=u}if(s){for(const a of e.children)e.renameSignal(a.getName(n),e.getName(t)),a.component.layoutSize.set(n,"merged",!1);o.setWithExplicit(t,s)}else o.setWithExplicit(t,{explicit:!1,value:void 0})}function Mce(e){const{size:t,component:n}=e;for(const i of Er){const r=Sn(i);if(t[r]){const o=t[r];n.layoutSize.set(r,fr(o)?"step":o,!0)}else{const o=Tce(e,r);n.layoutSize.set(r,o,!1)}}}function Tce(e,t){const n=t==="width"?"x":"y",i=e.config,r=e.getScaleComponent(n);if(r){const o=r.get("type"),s=r.get("range");if(bt(o)){const a=qp(i.view,t);return hs(s)||fr(a)?"step":a}else return kv(i.view,t)}else{if(e.hasProjection||e.mark==="arc")return kv(i.view,t);{const o=qp(i.view,t);return fr(o)?o.step:o}}}function Uv(e,t,n){return G(t,{suffix:`by_${G(e)}`,...n})}class Nc extends dL{constructor(t,n,i,r){super(t,"facet",n,i,r,t.resolve),this.child=u_(t.spec,this,this.getName("child"),void 0,r),this.children=[this.child],this.facet=this.initFacet(t.facet)}initFacet(t){if(!Qf(t))return{facet:this.initFacetFieldDef(t,"facet")};const n=B(t),i={};for(const r of n){if(![Hr,Gr].includes(r)){U(wm(r,"facet"));break}const o=t[r];if(o.field===void 0){U(Ev(o,r));break}i[r]=this.initFacetFieldDef(o,r)}return i}initFacetFieldDef(t,n){const i=AE(t,n);return i.header?i.header=pn(i.header):i.header===null&&(i.header=null),i}channelHasField(t){return!!this.facet[t]}fieldDef(t){return this.facet[t]}parseData(){this.component.data=e0(this),this.child.parseData()}parseLayoutSize(){i_(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),Ace(this)}assembleSelectionTopLevelSignals(t){return this.child.assembleSelectionTopLevelSignals(t)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(t){return this.child.assembleSelectionData(t)}getHeaderLayoutMixins(){const t={};for(const n of Kn)for(const i of YE){const r=this.component.layoutHeaders[n],o=r[i],{facetFieldDef:s}=r;if(s){const a=Qu("titleOrient",s.header,this.config,n);if(["right","bottom"].includes(a)){const u=jm(n,a);t.titleAnchor??(t.titleAnchor={}),t.titleAnchor[u]="end"}}if(o!=null&&o[0]){const a=n==="row"?"height":"width",u=i==="header"?"headerBand":"footerBand";n!=="facet"&&!this.child.component.layoutSize.get(a)&&(t[u]??(t[u]={}),t[u][n]=.5),r.title&&(t.offset??(t.offset={}),t.offset[n==="row"?"rowTitle":"columnTitle"]=10)}}return t}assembleDefaultLayout(){const{column:t,row:n}=this.facet,i=t?this.columnDistinctSignal():n?1:void 0;let r="all";return(!n&&this.component.resolve.scale.x==="independent"||!t&&this.component.resolve.scale.y==="independent")&&(r="none"),{...this.getHeaderLayoutMixins(),...i?{columns:i}:{},bounds:"full",align:r}}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof Nc))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(t){return this.parent&&this.parent instanceof Nc?{...this.channelHasField("column")?{encode:{update:{columns:{field:G(this.facet.column,{prefix:"distinct"})}}}}:{},...super.assembleGroup(t)}:super.assembleGroup(t)}getCardinalityAggregateForChild(){const t=[],n=[],i=[];if(this.child instanceof Nc){if(this.child.channelHasField("column")){const r=G(this.child.facet.column);t.push(r),n.push("distinct"),i.push(`distinct_${r}`)}}else for(const r of Er){const o=this.child.component.scales[r];if(o&&!o.merged){const s=o.get("type"),a=o.get("range");if(bt(s)&&hs(a)){const u=Wm(this.child,r),l=e_(u);l?(t.push(l),n.push("distinct"),i.push(`distinct_${l}`)):U(tE(r))}}}return{fields:t,ops:n,as:i}}assembleFacet(){const{name:t,data:n}=this.component.data.facetRoot,{row:i,column:r}=this.facet,{fields:o,ops:s,as:a}=this.getCardinalityAggregateForChild(),u=[];for(const c of Kn){const f=this.facet[c];if(f){u.push(G(f));const{bin:d,sort:h}=f;if(Be(d)&&u.push(G(f,{binSuffix:"end"})),er(h)){const{field:p,op:g=km}=h,m=Uv(f,h);i&&r?(o.push(m),s.push("max"),a.push(m)):(o.push(p),s.push(g),a.push(m))}else if(P(h)){const p=Ju(f,c);o.push(p),s.push("max"),a.push(p)}}}const l=!!i&&!!r;return{name:t,data:n,groupby:u,...l||o.length>0?{aggregate:{...l?{cross:l}:{},...o.length?{fields:o,ops:s,as:a}:{}}}:{}}}facetSortFields(t){const{facet:n}=this,i=n[t];return i?er(i.sort)?[Uv(i,i.sort,{expr:"datum"})]:P(i.sort)?[Ju(i,t,{expr:"datum"})]:[G(i,{expr:"datum"})]:[]}facetSortOrder(t){const{facet:n}=this,i=n[t];if(i){const{sort:r}=i;return[(er(r)?r.order:!P(r)&&r)||"ascending"]}return[]}assembleLabelTitle(){var r;const{facet:t,config:n}=this;if(t.facet)return Rv(t.facet,"facet",n);const i={row:["top","bottom"],column:["left","right"]};for(const o of GE)if(t[o]){const s=Qu("labelOrient",(r=t[o])==null?void 0:r.header,n,o);if(i[o].includes(s))return Rv(t[o],o,n)}}assembleMarks(){const{child:t}=this,n=this.component.data.facetRoot,i=_ce(n),r=t.assembleGroupEncodeEntry(!1),o=this.assembleLabelTitle()||t.assembleTitle(),s=t.assembleGroupStyle();return[{name:this.getName("cell"),type:"group",...o?{title:o}:{},...s?{style:s}:{},from:{facet:this.assembleFacet()},sort:{field:Kn.map(u=>this.facetSortFields(u)).flat(),order:Kn.map(u=>this.facetSortOrder(u)).flat()},...i.length>0?{data:i}:{},...r?{encode:{update:r}}:{},...t.assembleGroup(jae(this,[]))}]}getMapping(){return this.facet}}function Dce(e,t){const{row:n,column:i}=t;if(n&&i){let r=null;for(const o of[n,i])if(er(o.sort)){const{field:s,op:a=km}=o.sort;e=r=new Pa(e,{joinaggregate:[{op:a,field:s,as:Uv(o,o.sort,{forAs:!0})}],groupby:[G(o)]})}return r}return null}function gL(e,t){var n,i,r,o;for(const s of t){const a=s.data;if(e.name&&s.hasName()&&e.name!==s.dataName)continue;const u=(n=e.format)==null?void 0:n.mesh,l=(i=a.format)==null?void 0:i.feature;if(u&&l)continue;const c=(r=e.format)==null?void 0:r.feature;if((c||l)&&c!==l)continue;const f=(o=a.format)==null?void 0:o.mesh;if(!((u||f)&&u!==f)){if(ff(e)&&ff(a)){if(Nn(e.values,a.values))return s}else if(Xu(e)&&Xu(a)){if(e.url===a.url)return s}else if(r4(e)&&e.name===s.dataName)return s}}return null}function Nce(e,t){if(e.data||!e.parent){if(e.data===null){const i=new ba({values:[]});return t.push(i),i}const n=gL(e.data,t);if(n)return Oo(e.data)||(n.data.format=eR({},e.data.format,n.data.format)),!n.hasName()&&e.data.name&&(n.dataName=e.data.name),n;{const i=new ba(e.data);return t.push(i),i}}else return e.parent.component.data.facetRoot?e.parent.component.data.facetRoot:e.parent.component.data.main}function Oce(e,t,n){let i=0;for(const r of t.transforms){let o,s;if(Eae(r))s=e=new Ku(e,r),o="derived";else if(zE(r)){const a=$le(r);s=e=zt.makeWithAncestors(e,{},a,n)??e,e=new bl(e,t,r.filter)}else if(Z6(r))s=e=nr.makeFromTransform(e,r,t),o="number";else if(Sae(r))o="date",n.getWithExplicit(r.field).value===void 0&&(e=new zt(e,{[r.field]:o}),n.set(r.field,o,!1)),s=e=tr.makeFromTransform(e,r);else if($ae(r))s=e=$i.makeFromTransform(e,r),o="number",HE(t)&&(e=new Zo(e));else if(Q6(r))s=e=pf.make(e,t,r,i++),o="derived";else if(bae(r))s=e=new wl(e,r),o="number";else if(xae(r))s=e=new Pa(e,r),o="number";else if(Aae(r))s=e=Xr.makeFromTransform(e,r),o="derived";else if(kae(r))s=e=new Xm(e,r),o="derived";else if(Cae(r))s=e=new Gm(e,r),o="derived";else if(wae(r))s=e=new Ym(e,r),o="derived";else if(hae(r))s=e=new Qm(e,r),o="derived";else if(vae(r))e=new Zm(e,r);else if(_ae(r))s=e=Js.makeFromTransform(e,r),o="derived";else if(pae(r))s=e=new Hm(e,r),o="derived";else if(gae(r))s=e=new Km(e,r),o="derived";else if(mae(r))s=e=new Jm(e,r),o="derived";else if(yae(r))s=e=new Vm(e,r),o="derived";else{U(Xie(r));continue}if(s&&o!==void 0)for(const a of s.producedFields()??[])n.set(a,o,!1)}return e}function e0(e){var g;let t=Nce(e,e.component.data.sources);const{outputNodes:n,outputNodeRefCounts:i}=e.component.data,r=e.data,s=!(r&&(Oo(r)||Xu(r)||ff(r)))&&e.parent?e.parent.component.data.ancestorParse.clone():new Bae;Oo(r)?(o4(r)?t=new rd(t,r.sequence):BE(r)&&(t=new id(t,r.graticule)),s.parseNothing=!0):((g=r==null?void 0:r.format)==null?void 0:g.parse)===null&&(s.parseNothing=!0),t=zt.makeExplicit(t,e,s)??t,t=new Zo(t);const a=e.parent&&El(e.parent);(Ve(e)||Ln(e))&&a&&(t=nr.makeFromEncoding(t,e)??t),e.transforms.length>0&&(t=Oce(t,e,s));const u=kle(e),l=Ale(e);t=zt.makeWithAncestors(t,{},{...u,...l},s)??t,Ve(e)&&(t=yu.parseAll(t,e),t=hf.parseAll(t,e)),(Ve(e)||Ln(e))&&(a||(t=nr.makeFromEncoding(t,e)??t),t=tr.makeFromEncoding(t,e)??t,t=Ku.parseAllForSortIndex(t,e));const c=e.getDataName(ze.Raw),f=new on(t,c,ze.Raw,i);if(n[c]=f,t=f,Ve(e)){const m=$i.makeFromEncoding(t,e);m&&(t=m,HE(e)&&(t=new Zo(t))),t=Js.makeFromEncoding(t,e)??t,t=Xr.makeFromEncoding(t,e)??t}Ve(e)&&(t=df.make(t,e)??t);const d=e.getDataName(ze.Main),h=new on(t,d,ze.Main,i);n[d]=h,t=h,Ve(e)&&Eue(e,h);let p=null;if(Ln(e)){const m=e.getName("facet");t=Dce(t,e.facet)??t,p=new xl(t,e,m,h.getSource()),n[m]=p}return{...e.component.data,outputNodes:n,outputNodeRefCounts:i,raw:f,main:h,facetRoot:p,ancestorParse:s}}class Rce extends n_{constructor(t,n,i,r){var o,s,a,u;super(t,"concat",n,i,r,t.resolve),(((s=(o=t.resolve)==null?void 0:o.axis)==null?void 0:s.x)==="shared"||((u=(a=t.resolve)==null?void 0:a.axis)==null?void 0:u.y)==="shared")&&U(Hie),this.children=this.getChildren(t).map((l,c)=>u_(l,this,this.getName(`concat_${c}`),void 0,r))}parseData(){this.component.data=e0(this);for(const t of this.children)t.parseData()}parseSelections(){this.component.selection={};for(const t of this.children){t.parseSelections();for(const n of B(t.component.selection))this.component.selection[n]=t.component.selection[n]}}parseMarkGroup(){for(const t of this.children)t.parseMarkGroup()}parseAxesAndHeaders(){for(const t of this.children)t.parseAxesAndHeaders()}getChildren(t){return Rm(t)?t.vconcat:PE(t)?t.hconcat:t.concat}parseLayoutSize(){Fce(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(t){return this.children.reduce((n,i)=>i.assembleSelectionTopLevelSignals(n),t)}assembleSignals(){return this.children.forEach(t=>t.assembleSignals()),[]}assembleLayoutSignals(){const t=XE(this);for(const n of this.children)t.push(...n.assembleLayoutSignals());return t}assembleSelectionData(t){return this.children.reduce((n,i)=>i.assembleSelectionData(n),t)}assembleMarks(){return this.children.map(t=>{const n=t.assembleTitle(),i=t.assembleGroupStyle(),r=t.assembleGroupEncodeEntry(!1);return{type:"group",name:t.getName("group"),...n?{title:n}:{},...i?{style:i}:{},...r?{encode:{update:r}}:{},...t.assembleGroup()}})}assembleGroupStyle(){}assembleDefaultLayout(){const t=this.layout.columns;return{...t!=null?{columns:t}:{},bounds:"full",align:"each"}}}function Lce(e){return e===!1||e===null}const Pce={disable:1,gridScale:1,scale:1,..._6,labelExpr:1,encode:1},mL=B(Pce);class r_ extends uo{constructor(t={},n={},i=!1){super(),this.explicit=t,this.implicit=n,this.mainExtracted=i}clone(){return new r_(ae(this.explicit),ae(this.implicit),this.mainExtracted)}hasAxisPart(t){return t==="axis"?!0:t==="grid"||t==="title"?!!this.get(t):!Lce(this.get(t))}hasOrientSignalRef(){return Q(this.explicit.orient)}}function Ice(e,t,n){const{encoding:i,config:r}=e,o=st(i[t])??st(i[wr(t)]),s=e.axis(t)||{},{format:a,formatType:u}=s;if(ma(u))return{text:_i({fieldOrDatumDef:o,field:"datum.value",format:a,formatType:u,config:r}),...n};if(a===void 0&&u===void 0&&r.customFormatTypes){if(Hu(o)==="quantitative"){if(Gu(o)&&o.stack==="normalize"&&r.normalizedNumberFormatType)return{text:_i({fieldOrDatumDef:o,field:"datum.value",format:r.normalizedNumberFormat,formatType:r.normalizedNumberFormatType,config:r}),...n};if(r.numberFormatType)return{text:_i({fieldOrDatumDef:o,field:"datum.value",format:r.numberFormat,formatType:r.numberFormatType,config:r}),...n}}if(Hu(o)==="temporal"&&r.timeFormatType&&j(o)&&!o.timeUnit)return{text:_i({fieldOrDatumDef:o,field:"datum.value",format:r.timeFormat,formatType:r.timeFormatType,config:r}),...n}}return n}function zce(e){return Er.reduce((t,n)=>(e.component.scales[n]&&(t[n]=[Gce(n,e)]),t),{})}const Bce={bottom:"top",top:"bottom",left:"right",right:"left"};function Uce(e){const{axes:t,resolve:n}=e.component,i={top:0,bottom:0,right:0,left:0};for(const r of e.children){r.parseAxesAndHeaders();for(const o of B(r.component.axes))n.axis[o]=VE(e.component.resolve,o),n.axis[o]==="shared"&&(t[o]=jce(t[o],r.component.axes[o]),t[o]||(n.axis[o]="independent",delete t[o]))}for(const r of Er){for(const o of e.children)if(o.component.axes[r]){if(n.axis[r]==="independent"){t[r]=(t[r]??[]).concat(o.component.axes[r]);for(const s of o.component.axes[r]){const{value:a,explicit:u}=s.getWithExplicit("orient");if(!Q(a)){if(i[a]>0&&!u){const l=Bce[a];i[a]>i[l]&&s.set("orient",l,!1)}i[a]++}}}delete o.component.axes[r]}if(n.axis[r]==="independent"&&t[r]&&t[r].length>1)for(const[o,s]of(t[r]||[]).entries())o>0&&s.get("grid")&&!s.explicit.grid&&(s.implicit.grid=!1)}}function jce(e,t){if(e){if(e.length!==t.length)return;const n=e.length;for(let i=0;in.clone());return e}function qce(e,t){for(const n of mL){const i=Ko(e.getWithExplicit(n),t.getWithExplicit(n),n,"axis",(r,o)=>{switch(n){case"title":return CR(r,o);case"gridScale":return{explicit:r.explicit,value:Ze(r.value,o.value)}}return Pm(r,o,n,"axis")});e.setWithExplicit(n,i)}return e}function Wce(e,t,n,i,r){if(t==="disable")return n!==void 0;switch(n=n||{},t){case"titleAngle":case"labelAngle":return e===(Q(n.labelAngle)?n.labelAngle:lf(n.labelAngle));case"values":return!!n.values;case"encode":return!!n.encoding||!!n.labelAngle;case"title":if(e===O4(i,r))return!0}return e===n[t]}const Hce=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function Gce(e,t){var y,v;let n=t.axis(e);const i=new r_,r=st(t.encoding[e]),{mark:o,config:s}=t,a=(n==null?void 0:n.orient)||((y=s[e==="x"?"axisX":"axisY"])==null?void 0:y.orient)||((v=s.axis)==null?void 0:v.orient)||Due(e),u=t.getScaleComponent(e).get("type"),l=$ue(e,u,a,t.config),c=n!==void 0?!n:Nv("disable",s.style,n==null?void 0:n.style,l).configValue;if(i.set("disable",c,n!==void 0),c)return i;n=n||{};const f=Fue(r,n,e,s.style,l),d=u6(n.formatType,r,u),h=a6(r,r.type,n.format,n.formatType,s,!0),p={fieldOrDatumDef:r,axis:n,channel:e,model:t,scaleType:u,orient:a,labelAngle:f,format:h,formatType:d,mark:o,config:s};for(const b of mL){const x=b in Xk?Xk[b](p):wk(b)?n[b]:void 0,w=x!==void 0,_=Wce(x,b,n,t,e);if(w&&_)i.set(b,x,_);else{const{configValue:E=void 0,configFrom:S=void 0}=wk(b)&&b!=="values"?Nv(b,s.style,n.style,l):{},$=E!==void 0;w&&!$?i.set(b,x,_):(S!=="vgAxisConfig"||Hce.has(b)&&$||td(E)||Q(E))&&i.set(b,E,!1)}}const g=n.encoding??{},m=E6.reduce((b,x)=>{if(!i.hasAxisPart(x))return b;const w=B4(g[x]??{},t),_=x==="labels"?Ice(t,e,w):w;return _!==void 0&&!Oe(_)&&(b[x]={update:_}),b},{});return Oe(m)||i.set("encode",m,!!n.encoding||n.labelAngle!==void 0),i}function Yce({encoding:e,size:t}){for(const n of Er){const i=Sn(n);fr(t[i])&&Co(e[n])&&(delete t[i],U(NR(i)))}return t}const Xce={vgMark:"arc",encodeEntry:e=>({...ui(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...It("x",e,{defaultPos:"mid"}),...It("y",e,{defaultPos:"mid"}),...Jo(e,"radius"),...Jo(e,"theta")})},Vce={vgMark:"area",encodeEntry:e=>({...ui(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"}),...Wp("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:e.markDef.orient==="horizontal"}),...Wp("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:e.markDef.orient==="vertical"}),...WE(e)})},Kce={vgMark:"rect",encodeEntry:e=>({...ui(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...Jo(e,"x"),...Jo(e,"y")})},Jce={vgMark:"shape",encodeEntry:e=>({...ui(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})}),postEncodingTransform:e=>{const{encoding:t}=e,n=t.shape;return[{type:"geoshape",projection:e.projectionName(),...n&&j(n)&&n.type===yl?{field:G(n,{expr:"datum"})}:{}}]}},Qce={vgMark:"image",encodeEntry:e=>({...ui(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"}),...Jo(e,"x"),...Jo(e,"y"),...jE(e,"url")})},Zce={vgMark:"line",encodeEntry:e=>({...ui(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...It("x",e,{defaultPos:"mid"}),...It("y",e,{defaultPos:"mid"}),...dt("size",e,{vgChannel:"strokeWidth"}),...WE(e)})},efe={vgMark:"trail",encodeEntry:e=>({...ui(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...It("x",e,{defaultPos:"mid"}),...It("y",e,{defaultPos:"mid"}),...dt("size",e),...WE(e)})};function o_(e,t){const{config:n}=e;return{...ui(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...It("x",e,{defaultPos:"mid"}),...It("y",e,{defaultPos:"mid"}),...dt("size",e),...dt("angle",e),...tfe(e,n,t)}}function tfe(e,t,n){return n?{shape:{value:n}}:dt("shape",e)}const nfe={vgMark:"symbol",encodeEntry:e=>o_(e)},ife={vgMark:"symbol",encodeEntry:e=>o_(e,"circle")},rfe={vgMark:"symbol",encodeEntry:e=>o_(e,"square")},ofe={vgMark:"rect",encodeEntry:e=>({...ui(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...Jo(e,"x"),...Jo(e,"y")})},sfe={vgMark:"rule",encodeEntry:e=>{const{markDef:t}=e,n=t.orient;return!e.encoding.x&&!e.encoding.y&&!e.encoding.latitude&&!e.encoding.longitude?{}:{...ui(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...Wp("x",e,{defaultPos:n==="horizontal"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:n!=="vertical"}),...Wp("y",e,{defaultPos:n==="vertical"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:n!=="horizontal"}),...dt("size",e,{vgChannel:"strokeWidth"})}}},afe={vgMark:"text",encodeEntry:e=>{const{config:t,encoding:n}=e;return{...ui(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"}),...It("x",e,{defaultPos:"mid"}),...It("y",e,{defaultPos:"mid"}),...jE(e),...dt("size",e,{vgChannel:"fontSize"}),...dt("angle",e),...Wk("align",ufe(e.markDef,n,t)),...Wk("baseline",lfe(e.markDef,n,t)),...It("radius",e,{defaultPos:null}),...It("theta",e,{defaultPos:null})}}};function ufe(e,t,n){if(Fe("align",e,n)===void 0)return"center"}function lfe(e,t,n){if(Fe("baseline",e,n)===void 0)return"middle"}const cfe={vgMark:"rect",encodeEntry:e=>{const{config:t,markDef:n}=e,i=n.orient,r=i==="horizontal"?"width":"height",o=i==="horizontal"?"height":"width";return{...ui(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...It("x",e,{defaultPos:"mid",vgChannel:"xc"}),...It("y",e,{defaultPos:"mid",vgChannel:"yc"}),...dt("size",e,{defaultValue:ffe(e),vgChannel:r}),[o]:je(Fe("thickness",n,t))}}};function ffe(e){const{config:t,markDef:n}=e,{orient:i}=n,r=i==="horizontal"?"width":"height",o=e.getScaleComponent(i==="horizontal"?"x":"y"),s=Fe("size",n,t,{vgChannel:r})??t.tick.bandSize;if(s!==void 0)return s;{const a=o?o.get("range"):void 0;return a&&hs(a)&&Ee(a.step)?a.step*3/4:jp(t.view,r)*3/4}}const Id={arc:Xce,area:Vce,bar:Kce,circle:ife,geoshape:Jce,image:Qce,line:Zce,point:nfe,rect:ofe,rule:sfe,square:rfe,text:afe,tick:cfe,trail:efe};function dfe(e){if(ve([$m,_m,xoe],e.mark)){const t=C6(e.mark,e.encoding);if(t.length>0)return hfe(e,t)}else if(e.mark===Sm){const t=wv.some(n=>Fe(n,e.markDef,e.config));if(e.stack&&!e.fieldDef("size")&&t)return pfe(e)}return s_(e)}const cC="faceted_path_";function hfe(e,t){return[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:cC+e.requestDataName(ze.Main),data:e.requestDataName(ze.Main),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:s_(e,{fromPrefix:cC})}]}const fC="stack_group_";function pfe(e){var l;const[t]=s_(e,{fromPrefix:fC}),n=e.scaleName(e.stack.fieldChannel),i=(c={})=>e.vgField(e.stack.fieldChannel,c),r=(c,f)=>{const d=[i({prefix:"min",suffix:"start",expr:f}),i({prefix:"max",suffix:"start",expr:f}),i({prefix:"min",suffix:"end",expr:f}),i({prefix:"max",suffix:"end",expr:f})];return`${c}(${d.map(h=>`scale('${n}',${h})`).join(",")})`};let o,s;e.stack.fieldChannel==="x"?(o={...zu(t.encode.update,["y","yc","y2","height",...wv]),x:{signal:r("min","datum")},x2:{signal:r("max","datum")},clip:{value:!0}},s={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},t.encode.update={...yn(t.encode.update,["y","yc","y2"]),height:{field:{group:"height"}}}):(o={...zu(t.encode.update,["x","xc","x2","width"]),y:{signal:r("min","datum")},y2:{signal:r("max","datum")},clip:{value:!0}},s={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},t.encode.update={...yn(t.encode.update,["x","xc","x2"]),width:{field:{group:"width"}}});for(const c of wv){const f=Zr(c,e.markDef,e.config);t.encode.update[c]?(o[c]=t.encode.update[c],delete t.encode.update[c]):f&&(o[c]=je(f)),f&&(t.encode.update[c]={value:0})}const a=[];if(((l=e.stack.groupbyChannels)==null?void 0:l.length)>0)for(const c of e.stack.groupbyChannels){const f=e.fieldDef(c),d=G(f);d&&a.push(d),(f!=null&&f.bin||f!=null&&f.timeUnit)&&a.push(G(f,{binSuffix:"end"}))}return o=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((c,f)=>{if(t.encode.update[f])return{...c,[f]:t.encode.update[f]};{const d=Zr(f,e.markDef,e.config);return d!==void 0?{...c,[f]:je(d)}:c}},o),o.stroke&&(o.strokeForeground={value:!0},o.strokeOffset={value:0}),[{type:"group",from:{facet:{data:e.requestDataName(ze.Main),name:fC+e.requestDataName(ze.Main),groupby:a,aggregate:{fields:[i({suffix:"start"}),i({suffix:"start"}),i({suffix:"end"}),i({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:o},marks:[{type:"group",encode:{update:s},marks:[t]}]}]}function gfe(e){var a;const{encoding:t,stack:n,mark:i,markDef:r,config:o}=e,s=t.order;if(!(!P(s)&&Fi(s)&&bv(s.value)||!s&&bv(Fe("order",r,o)))){if((P(s)||j(s))&&!n)return $R(s,{expr:"datum"});if(ps(i)){const u=r.orient==="horizontal"?"y":"x",l=t[u];if(j(l)){const c=l.sort;if(P(c))return{field:G(l,{prefix:u,suffix:"sort_index",expr:"datum"})};if(er(c))return{field:G({aggregate:kE(e.encoding)?c.op:void 0,field:c.field},{expr:"datum"})};if(c6(c)){const f=e.fieldDef(c.encoding);return{field:G(f,{expr:"datum"}),order:c.order}}else return c===null?void 0:{field:G(l,{binSuffix:(a=e.stack)!=null&&a.impute?"mid":void 0,expr:"datum"})}}return}}}function s_(e,t={fromPrefix:""}){const{mark:n,markDef:i,encoding:r,config:o}=e,s=Ze(i.clip,mfe(e),yfe(e)),a=_R(i),u=r.key,l=gfe(e),c=vfe(e),f=Fe("aria",i,o),d=Id[n].postEncodingTransform?Id[n].postEncodingTransform(e):null;return[{name:e.getName("marks"),type:Id[n].vgMark,...s?{clip:s}:{},...a?{style:a}:{},...u?{key:u.field}:{},...l?{sort:l}:{},...c||{},...f===!1?{aria:f}:{},from:{data:t.fromPrefix+e.requestDataName(ze.Main)},encode:{update:Id[n].encodeEntry(e)},...d?{transform:d}:{}}]}function mfe(e){const t=e.getScaleComponent("x"),n=e.getScaleComponent("y");return t!=null&&t.get("selectionExtent")||n!=null&&n.get("selectionExtent")?!0:void 0}function yfe(e){const t=e.component.projection;return t&&!t.isFit?!0:void 0}function vfe(e){if(!e.component.selection)return null;const t=B(e.component.selection).length;let n=t,i=e.parent;for(;i&&n===0;)n=B(i.component.selection).length,i=i.parent;return n?{interactive:t>0||e.mark==="geoshape"||!!e.encoding.tooltip||!!e.markDef.tooltip}:null}class yL extends dL{constructor(t,n,i,r={},o){super(t,"unit",n,i,o,void 0,_k(t)?t.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[];const s=lr(t.mark)?{...t.mark}:{type:t.mark},a=s.type;s.filled===void 0&&(s.filled=nae(s,o,{graticule:t.data&&BE(t.data)}));const u=this.encoding=sse(t.encoding||{},a,s.filled,o);this.markDef=V6(s,u,o),this.size=Yce({encoding:u,size:_k(t)?{...r,...t.width?{width:t.width}:{},...t.height?{height:t.height}:{}}:r}),this.stack=X6(this.markDef,u),this.specifiedScales=this.initScales(a,u),this.specifiedAxes=this.initAxes(u),this.specifiedLegends=this.initLegends(u),this.specifiedProjection=t.projection,this.selection=(t.params??[]).filter(l=>RE(l))}get hasProjection(){const{encoding:t}=this,n=this.mark===n6,i=t&&rie.some(r=>ue(t[r]));return n||i}scaleDomain(t){const n=this.specifiedScales[t];return n?n.domain:void 0}axis(t){return this.specifiedAxes[t]}legend(t){return this.specifiedLegends[t]}initScales(t,n){return bm.reduce((i,r)=>{const o=st(n[r]);return o&&(i[r]=this.initScale(o.scale??{})),i},{})}initScale(t){const{domain:n,range:i}=t,r=pn(t);return P(n)&&(r.domain=n.map(Mn)),P(i)&&(r.range=i.map(Mn)),r}initAxes(t){return Er.reduce((n,i)=>{const r=t[i];if(ue(r)||i===He&&ue(t.x2)||i===wt&&ue(t.y2)){const o=ue(r)?r.axis:void 0;n[i]=o&&this.initAxis({...o})}return n},{})}initAxis(t){const n=B(t),i={};for(const r of n){const o=t[r];i[r]=td(o)?ER(o):Mn(o)}return i}initLegends(t){return pie.reduce((n,i)=>{const r=st(t[i]);if(r&&mie(i)){const o=r.legend;n[i]=o&&pn(o)}return n},{})}parseData(){this.component.data=e0(this)}parseLayoutSize(){Mce(this)}parseSelections(){this.component.selection=wue(this,this.selection)}parseMarkGroup(){this.component.mark=dfe(this)}parseAxesAndHeaders(){this.component.axes=zce(this)}assembleSelectionTopLevelSignals(t){return qae(this,t)}assembleSignals(){return[...T4(this),...Uae(this,[])]}assembleSelectionData(t){return Wae(this,t)}assembleLayout(){return null}assembleLayoutSignals(){return XE(this)}assembleMarks(){let t=this.component.mark??[];return(!this.parent||!El(this.parent))&&(t=u4(this,t)),t.map(this.correctDataNames)}assembleGroupStyle(){const{style:t}=this.view||{};return t!==void 0?t:this.encoding.x||this.encoding.y?"cell":"view"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(t){return Vs(this.encoding,t)}fieldDef(t){const n=this.encoding[t];return cr(n)}typedFieldDef(t){const n=this.fieldDef(t);return un(n)?n:null}}class a_ extends n_{constructor(t,n,i,r,o){super(t,"layer",n,i,o,t.resolve,t.view);const s={...r,...t.width?{width:t.width}:{},...t.height?{height:t.height}:{}};this.children=t.layer.map((a,u)=>{if(Lm(a))return new a_(a,this,this.getName(`layer_${u}`),s,o);if(ao(a))return new yL(a,this,this.getName(`layer_${u}`),s,o);throw new Error(eE(a))})}parseData(){this.component.data=e0(this);for(const t of this.children)t.parseData()}parseLayoutSize(){Cce(this)}parseSelections(){this.component.selection={};for(const t of this.children){t.parseSelections();for(const n of B(t.component.selection))this.component.selection[n]=t.component.selection[n]}}parseMarkGroup(){for(const t of this.children)t.parseMarkGroup()}parseAxesAndHeaders(){Uce(this)}assembleSelectionTopLevelSignals(t){return this.children.reduce((n,i)=>i.assembleSelectionTopLevelSignals(n),t)}assembleSignals(){return this.children.reduce((t,n)=>t.concat(n.assembleSignals()),T4(this))}assembleLayoutSignals(){return this.children.reduce((t,n)=>t.concat(n.assembleLayoutSignals()),XE(this))}assembleSelectionData(t){return this.children.reduce((n,i)=>i.assembleSelectionData(n),t)}assembleGroupStyle(){const t=new Set;for(const i of this.children)for(const r of Y(i.assembleGroupStyle()))t.add(r);const n=Array.from(t);return n.length>1?n:n.length===1?n[0]:void 0}assembleTitle(){let t=super.assembleTitle();if(t)return t;for(const n of this.children)if(t=n.assembleTitle(),t)return t}assembleLayout(){return null}assembleMarks(){return Hae(this,this.children.flatMap(t=>t.assembleMarks()))}assembleLegends(){return this.children.reduce((t,n)=>t.concat(n.assembleLegends()),X4(this))}}function u_(e,t,n,i,r){if(Cm(e))return new Nc(e,t,n,r);if(Lm(e))return new a_(e,t,n,i,r);if(ao(e))return new yL(e,t,n,i,r);if(Mse(e))return new Rce(e,t,n,r);throw new Error(eE(e))}function bfe(e,t={}){t.logger&&Rre(t.logger),t.fieldTitle&&b6(t.fieldTitle);try{const n=Y6(el(t.config,e.config)),i=n4(e,n),r=u_(i,null,"",void 0,n);return r.parse(),qle(r.component.data,r),{spec:wfe(r,xfe(e,i.autosize,n,r),e.datasets,e.usermeta),normalized:i}}finally{t.logger&&Lre(),t.fieldTitle&&Joe()}}function xfe(e,t,n,i){const r=i.component.layoutSize.get("width"),o=i.component.layoutSize.get("height");if(t===void 0?(t={type:"pad"},i.hasAxisOrientSignalRef()&&(t.resize=!0)):X(t)&&(t={type:t}),r&&o&&Pae(t.type)){if(r==="step"&&o==="step")U(ak()),t.type="pad";else if(r==="step"||o==="step"){const s=r==="step"?"width":"height";U(ak(vm(s)));const a=s==="width"?"height":"width";t.type=Iae(a)}}return{...B(t).length===1&&t.type?t.type==="pad"?{}:{autosize:t.type}:{autosize:t},...Rk(n,!1),...Rk(e,!0)}}function wfe(e,t,n={},i){const r=e.config?Wse(e.config):void 0,o=[].concat(e.assembleSelectionData([]),Sce(e.component.data,n)),s=e.assembleProjections(),a=e.assembleTitle(),u=e.assembleGroupStyle(),l=e.assembleGroupEncodeEntry(!0);let c=e.assembleLayoutSignals();c=c.filter(h=>(h.name==="width"||h.name==="height")&&h.value!==void 0?(t[h.name]=+h.value,!1):!0);const{params:f,...d}=t;return{$schema:"https://vega.github.io/schema/vega/v5.json",...e.description?{description:e.description}:{},...d,...a?{title:a}:{},...u?{style:u}:{},...l?{encode:{update:l}}:{},data:o,...s.length>0?{projections:s}:{},...e.assembleGroup([...c,...e.assembleSelectionTopLevelSignals([]),...q6(f)]),...r?{config:r}:{},...i?{usermeta:i}:{}}}const Efe=Qne.version,_fe=Object.freeze(Object.defineProperty({__proto__:null,accessPathDepth:Bu,accessPathWithDatum:Ww,compile:bfe,contains:ve,deepEqual:Nn,deleteNestedProperty:Dp,duplicate:ae,entries:Yo,every:Uw,fieldIntersection:qw,flatAccessWithDatum:nR,getFirstDefined:Ze,hasIntersection:jw,hash:ye,internalField:oR,isBoolean:uf,isEmpty:Oe,isEqual:eie,isInternalField:sR,isNullOrFalse:bv,isNumeric:dm,keys:B,logicalExpr:Tc,mergeDeep:eR,never:ZO,normalize:n4,normalizeAngle:lf,omit:yn,pick:zu,prefixGenerator:xv,removePathFromField:Hw,replaceAll:fa,replacePathInField:ri,resetIdCounter:nie,setEqual:tR,some:ca,stringify:Re,titleCase:Hf,unique:Ki,uniqueId:rR,vals:kt,varName:We,version:Efe},Symbol.toStringTag,{value:"Module"}));function vL(e){const[t,n]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t,version:n}}var Sfe="vega-themes",$fe="2.14.0",Afe="Themes for stylized Vega and Vega-Lite visualizations.",kfe=["vega","vega-lite","themes","style"],Cfe="BSD-3-Clause",Ffe={name:"UW Interactive Data Lab",url:"https://idl.cs.washington.edu"},Mfe=[{name:"Emily Gu",url:"https://github.com/emilygu"},{name:"Arvind Satyanarayan",url:"http://arvindsatya.com"},{name:"Jeffrey Heer",url:"https://idl.cs.washington.edu"},{name:"Dominik Moritz",url:"https://www.domoritz.de"}],Tfe="build/vega-themes.js",Dfe="build/vega-themes.module.js",Nfe="build/vega-themes.min.js",Ofe="build/vega-themes.min.js",Rfe="build/vega-themes.module.d.ts",Lfe={type:"git",url:"https://github.com/vega/vega-themes.git"},Pfe=["src","build"],Ife={prebuild:"yarn clean",build:"rollup -c",clean:"rimraf build && rimraf examples/build","copy:data":"rsync -r node_modules/vega-datasets/data/* examples/data","copy:build":"rsync -r build/* examples/build","deploy:gh":"yarn build && mkdir -p examples/build && rsync -r build/* examples/build && gh-pages -d examples",preversion:"yarn lint",serve:"browser-sync start -s -f build examples --serveStatic examples",start:"yarn build && concurrently --kill-others -n Server,Rollup 'yarn serve' 'rollup -c -w'",format:"eslint . --fix",lint:"eslint .",release:"release-it"},zfe={"@babel/core":"^7.22.9","@babel/plugin-proposal-async-generator-functions":"^7.20.7","@babel/plugin-proposal-json-strings":"^7.18.6","@babel/plugin-proposal-object-rest-spread":"^7.20.7","@babel/plugin-proposal-optional-catch-binding":"^7.18.6","@babel/plugin-transform-runtime":"^7.22.9","@babel/preset-env":"^7.22.9","@babel/preset-typescript":"^7.22.5","@release-it/conventional-changelog":"^7.0.0","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.1.0","@rollup/plugin-terser":"^0.4.3","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","browser-sync":"^2.29.3",concurrently:"^8.2.0",eslint:"^8.45.0","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^5.0.0","gh-pages":"^5.0.0",prettier:"^3.0.0","release-it":"^16.1.0",rollup:"^3.26.2","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-ts":"^3.2.0",typescript:"^5.1.6",vega:"^5.25.0","vega-lite":"^5.9.3"},Bfe={vega:"*","vega-lite":"*"},Ufe={},jfe={name:Sfe,version:$fe,description:Afe,keywords:kfe,license:Cfe,author:Ffe,contributors:Mfe,main:Tfe,module:Dfe,unpkg:Nfe,jsdelivr:Ofe,types:Rfe,repository:Lfe,files:Pfe,scripts:Ife,devDependencies:zfe,peerDependencies:Bfe,dependencies:Ufe};const Ka="#fff",dC="#888",qfe={background:"#333",view:{stroke:dC},title:{color:Ka,subtitleColor:Ka},style:{"guide-label":{fill:Ka},"guide-title":{fill:Ka}},axis:{domainColor:Ka,gridColor:dC,tickColor:Ka}},ws="#4572a7",Wfe={background:"#fff",arc:{fill:ws},area:{fill:ws},line:{stroke:ws,strokeWidth:2},path:{stroke:ws},rect:{fill:ws},shape:{stroke:ws},symbol:{fill:ws,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},Es="#30a2da",w1="#cbcbcb",Hfe="#999",Gfe="#333",hC="#f0f0f0",pC="#333",Yfe={arc:{fill:Es},area:{fill:Es},axis:{domainColor:w1,grid:!0,gridColor:w1,gridWidth:1,labelColor:Hfe,labelFontSize:10,titleColor:Gfe,tickColor:w1,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:hC,group:{fill:hC},legend:{labelColor:pC,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:pC,titleFontSize:14,titlePadding:10},line:{stroke:Es,strokeWidth:2},path:{stroke:Es,strokeWidth:.5},rect:{fill:Es},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:Es},bar:{binSpacing:2,fill:Es,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},_s="#000",Xfe={group:{fill:"#e5e5e5"},arc:{fill:_s},area:{fill:_s},line:{stroke:_s},path:{stroke:_s},rect:{fill:_s},shape:{stroke:_s},symbol:{fill:_s,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},Vfe=22,Kfe="normal",gC="Benton Gothic, sans-serif",mC=11.5,Jfe="normal",Ss="#82c6df",E1="Benton Gothic Bold, sans-serif",yC="normal",vC=13,Hl={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},Qfe={background:"#ffffff",title:{anchor:"start",color:"#000000",font:E1,fontSize:Vfe,fontWeight:Kfe},arc:{fill:Ss},area:{fill:Ss},line:{stroke:Ss,strokeWidth:2},path:{stroke:Ss},rect:{fill:Ss},shape:{stroke:Ss},symbol:{fill:Ss,size:30},axis:{labelFont:gC,labelFontSize:mC,labelFontWeight:Jfe,titleFont:E1,titleFontSize:vC,titleFontWeight:yC},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:gC,labelFontSize:mC,symbolType:"square",titleFont:E1,titleFontSize:vC,titleFontWeight:yC},range:{category:Hl["category-6"],diverging:Hl["fireandice-6"],heatmap:Hl["fire-7"],ordinal:Hl["fire-7"],ramp:Hl["fire-7"]}},$s="#ab5787",zd="#979797",Zfe={background:"#f9f9f9",arc:{fill:$s},area:{fill:$s},line:{stroke:$s},path:{stroke:$s},rect:{fill:$s},shape:{stroke:$s},symbol:{fill:$s,size:30},axis:{domainColor:zd,domainWidth:.5,gridWidth:.2,labelColor:zd,tickColor:zd,tickWidth:.2,titleColor:zd},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},As="#3e5c69",ede={background:"#fff",arc:{fill:As},area:{fill:As},line:{stroke:As},path:{stroke:As},rect:{fill:As},shape:{stroke:As},symbol:{fill:As},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},Wn="#1696d2",bC="#000000",tde="#FFFFFF",Bd="Lato",_1="Lato",nde="Lato",ide="#DEDDDD",rde=18,Gl={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},ode={background:tde,title:{anchor:"start",fontSize:rde,font:Bd},axisX:{domain:!0,domainColor:bC,domainWidth:1,grid:!1,labelFontSize:12,labelFont:_1,labelAngle:0,tickColor:bC,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:Bd},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:ide,gridWidth:1,labelFontSize:12,labelFont:_1,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:Bd,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:_1,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:Bd,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:Gl["six-groups-cat-1"],diverging:Gl["diverging-colors"],heatmap:Gl["diverging-colors"],ordinal:Gl["six-groups-seq"],ramp:Gl["shades-blue"]},area:{fill:Wn},rect:{fill:Wn},line:{color:Wn,stroke:Wn,strokeWidth:5},trail:{color:Wn,stroke:Wn,strokeWidth:0,size:1},path:{stroke:Wn,strokeWidth:.5},point:{filled:!0},text:{font:nde,color:Wn,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:Wn,stroke:null}},arc:{fill:Wn},shape:{stroke:Wn},symbol:{fill:Wn,size:30}},ks="#3366CC",xC="#ccc",Ud="Arial, sans-serif",sde={arc:{fill:ks},area:{fill:ks},path:{stroke:ks},rect:{fill:ks},shape:{stroke:ks},symbol:{stroke:ks},circle:{fill:ks},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:Ud,fontSize:12},"guide-title":{font:Ud,fontSize:12},"group-title":{font:Ud,fontSize:12}},title:{font:Ud,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:xC,tickColor:xC,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},l_=e=>e*(1/3+1),wC=l_(9),EC=l_(10),_C=l_(12),Yl="Segoe UI",SC="wf_standard-font, helvetica, arial, sans-serif",$C="#252423",Xl="#605E5C",AC="transparent",ade="#C8C6C4",fi="#118DFF",ude="#12239E",lde="#E66C37",cde="#6B007B",fde="#E044A7",dde="#744EC2",hde="#D9B300",pde="#D64550",bL=fi,xL="#DEEFFF",kC=[xL,bL],gde=[xL,"#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",bL],mde={view:{stroke:AC},background:AC,font:Yl,header:{titleFont:SC,titleFontSize:_C,titleColor:$C,labelFont:Yl,labelFontSize:EC,labelColor:Xl},axis:{ticks:!1,grid:!1,domain:!1,labelColor:Xl,labelFontSize:wC,titleFont:SC,titleColor:$C,titleFontSize:_C,titleFontWeight:"normal"},axisQuantitative:{tickCount:3,grid:!0,gridColor:ade,gridDash:[1,5],labelFlush:!1},axisBand:{tickExtra:!0},axisX:{labelPadding:5},axisY:{labelPadding:10},bar:{fill:fi},line:{stroke:fi,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:Yl,fontSize:wC,fill:Xl},arc:{fill:fi},area:{fill:fi,line:!0,opacity:.6},path:{stroke:fi},rect:{fill:fi},point:{fill:fi,filled:!0,size:75},shape:{stroke:fi},symbol:{fill:fi,strokeWidth:1.5,size:50},legend:{titleFont:Yl,titleFontWeight:"bold",titleColor:Xl,labelFont:Yl,labelFontSize:EC,labelColor:Xl,symbolType:"circle",symbolSize:75},range:{category:[fi,ude,lde,cde,fde,dde,hde,pde],diverging:kC,heatmap:kC,ordinal:gde}},S1='IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,".sfnstext-regular",sans-serif',CC=400,yde=["#8a3ffc","#33b1ff","#007d79","#ff7eb6","#fa4d56","#fff1f1","#6fdc8c","#4589ff","#d12771","#d2a106","#08bdba","#bae6ff","#ba4e00","#d4bbff"],vde=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"];function t0({type:e,background:t}){const n=e==="dark"?"#161616":"#ffffff",i=e==="dark"?"#f4f4f4":"#161616",r=e==="dark"?yde:vde,o=e==="dark"?"#d4bbff":"#6929c4";return{background:t,arc:{fill:o},area:{fill:o},path:{stroke:o},rect:{fill:o},shape:{stroke:o},symbol:{stroke:o},circle:{fill:o},view:{fill:n,stroke:n},group:{fill:n},title:{color:i,anchor:"start",dy:-15,fontSize:16,font:S1,fontWeight:600},axis:{labelColor:i,labelFontSize:12,grid:!0,gridColor:"#525252",titleColor:i,labelAngle:0},style:{"guide-label":{font:S1,fill:i,fontWeight:CC},"guide-title":{font:S1,fill:i,fontWeight:CC}},range:{category:r,diverging:["#750e13","#a2191f","#da1e28","#fa4d56","#ff8389","#ffb3b8","#ffd7d9","#fff1f1","#e5f6ff","#bae6ff","#82cfff","#33b1ff","#1192e8","#0072c3","#00539a","#003a6d"],heatmap:["#f6f2ff","#e8daff","#d4bbff","#be95ff","#a56eff","#8a3ffc","#6929c4","#491d8b","#31135e","#1c0f30"]}}}const bde=t0({type:"light",background:"#ffffff"}),xde=t0({type:"light",background:"#f4f4f4"}),wde=t0({type:"dark",background:"#262626"}),Ede=t0({type:"dark",background:"#161616"}),_de=jfe.version,Sde=Object.freeze(Object.defineProperty({__proto__:null,carbong10:xde,carbong100:Ede,carbong90:wde,carbonwhite:bde,dark:qfe,excel:Wfe,fivethirtyeight:Yfe,ggplot2:Xfe,googlecharts:sde,latimes:Qfe,powerbi:mde,quartz:Zfe,urbaninstitute:ode,version:_de,vox:ede},Symbol.toStringTag,{value:"Module"}));function $de(e,t,n,i){if(P(e))return`[${e.map(r=>t(X(r)?r:FC(r,n))).join(", ")}]`;if(V(e)){let r="";const{title:o,image:s,...a}=e;o&&(r+=`

${t(o)}

`),s&&(r+=``);const u=Object.keys(a);if(u.length>0){r+="";for(const l of u){let c=a[l];c!==void 0&&(V(c)&&(c=FC(c,n)),r+=``)}r+="
${t(l)}${t(c)}
"}return r||"{}"}return t(e)}function Ade(e){const t=[];return function(n,i){if(typeof i!="object"||i===null)return i;const r=t.indexOf(this)+1;return t.length=r,t.length>e?"[Object]":t.indexOf(i)>=0?"[Circular]":(t.push(i),i)}}function FC(e,t){return JSON.stringify(e,Ade(t))}var kde=`#vg-tooltip-element { + visibility: hidden; + padding: 8px; + position: fixed; + z-index: 1000; + font-family: sans-serif; + font-size: 11px; + border-radius: 3px; + box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); + /* The default theme is the light theme. */ + background-color: rgba(255, 255, 255, 0.95); + border: 1px solid #d9d9d9; + color: black; +} +#vg-tooltip-element.visible { + visibility: visible; +} +#vg-tooltip-element h2 { + margin-top: 0; + margin-bottom: 10px; + font-size: 13px; +} +#vg-tooltip-element table { + border-spacing: 0; +} +#vg-tooltip-element table tr { + border: none; +} +#vg-tooltip-element table tr td { + overflow: hidden; + text-overflow: ellipsis; + padding-top: 2px; + padding-bottom: 2px; +} +#vg-tooltip-element table tr td.key { + color: #808080; + max-width: 150px; + text-align: right; + padding-right: 4px; +} +#vg-tooltip-element table tr td.value { + display: block; + max-width: 300px; + max-height: 7em; + text-align: left; +} +#vg-tooltip-element.dark-theme { + background-color: rgba(32, 32, 32, 0.9); + border: 1px solid #f5f5f5; + color: white; +} +#vg-tooltip-element.dark-theme td.key { + color: #bfbfbf; +} +`;const wL="vg-tooltip-element",Cde={offsetX:10,offsetY:10,id:wL,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:Fde,maxDepth:2,formatTooltip:$de,baseURL:""};function Fde(e){return String(e).replace(/&/g,"&").replace(/window.innerWidth&&(r=+e.clientX-n-t.width);let o=e.clientY+i;return o+t.height>window.innerHeight&&(o=+e.clientY-i-t.height),{x:r,y:o}}class Dde{constructor(t){this.options={...Cde,...t};const n=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const i=document.createElement("style");i.setAttribute("id",this.options.styleId),i.innerHTML=Mde(n);const r=document.head;r.childNodes.length>0?r.insertBefore(i,r.childNodes[0]):r.appendChild(i)}}tooltipHandler(t,n,i,r){if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),(document.fullscreenElement??document.body).appendChild(this.el)),r==null||r===""){this.el.classList.remove("visible",`${this.options.theme}-theme`);return}this.el.innerHTML=this.options.formatTooltip(r,this.options.sanitize,this.options.maxDepth,this.options.baseURL),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:o,y:s}=Tde(n,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY);this.el.style.top=`${s}px`,this.el.style.left=`${o}px`}}var $1={};function Nde(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var A1,MC;function Ode(){return MC||(MC=1,A1=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),A1}var Rde=ke;ke.Node=xa;ke.create=ke;function ke(e){var t=this;if(t instanceof ke||(t=new ke),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(r){t.push(r)});else if(arguments.length>0)for(var n=0,i=arguments.length;n1)n=t;else if(this.head)i=this.head.next,n=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var r=0;i!==null;r++)n=e(n,i.value,r),i=i.next;return n};ke.prototype.reduceReverse=function(e,t){var n,i=this.tail;if(arguments.length>1)n=t;else if(this.tail)i=this.tail.prev,n=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var r=this.length-1;i!==null;r--)n=e(n,i.value,r),i=i.prev;return n};ke.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;n!==null;t++)e[t]=n.value,n=n.next;return e};ke.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;n!==null;t++)e[t]=n.value,n=n.prev;return e};ke.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new ke;if(tthis.length&&(t=this.length);for(var i=0,r=this.head;r!==null&&ithis.length&&(t=this.length);for(var i=this.length,r=this.tail;r!==null&&i>t;i--)r=r.prev;for(;r!==null&&i>e;i--,r=r.prev)n.push(r.value);return n};ke.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,r=this.head;r!==null&&i1;class Bde{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[Ls]=t.max||1/0;const n=t.length||k1;if(this[Ja]=typeof n!="function"?k1:n,this[Oc]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[Us]=t.maxAge||0,this[Mr]=t.dispose,this[TC]=t.noDisposeOnSet||!1,this[EL]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[Ls]=t||1/0,Vl(this)}get max(){return this[Ls]}set allowStale(t){this[Oc]=!!t}get allowStale(){return this[Oc]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[Us]=t,Vl(this)}get maxAge(){return this[Us]}set lengthCalculator(t){typeof t!="function"&&(t=k1),t!==this[Ja]&&(this[Ja]=t,this[Nr]=0,this[ct].forEach(n=>{n.length=this[Ja](n.value,n.key),this[Nr]+=n.length})),Vl(this)}get lengthCalculator(){return this[Ja]}get length(){return this[Nr]}get itemCount(){return this[ct].length}rforEach(t,n){n=n||this;for(let i=this[ct].tail;i!==null;){const r=i.prev;DC(this,t,i,n),i=r}}forEach(t,n){n=n||this;for(let i=this[ct].head;i!==null;){const r=i.next;DC(this,t,i,n),i=r}}keys(){return this[ct].toArray().map(t=>t.key)}values(){return this[ct].toArray().map(t=>t.value)}reset(){this[Mr]&&this[ct]&&this[ct].length&&this[ct].forEach(t=>this[Mr](t.key,t.value)),this[di]=new Map,this[ct]=new zde,this[Nr]=0}dump(){return this[ct].map(t=>Xp(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[ct]}set(t,n,i){if(i=i||this[Us],i&&typeof i!="number")throw new TypeError("maxAge must be a number");const r=i?Date.now():0,o=this[Ja](n,t);if(this[di].has(t)){if(o>this[Ls])return vu(this,this[di].get(t)),!1;const u=this[di].get(t).value;return this[Mr]&&(this[TC]||this[Mr](t,u.value)),u.now=r,u.maxAge=i,u.value=n,this[Nr]+=o-u.length,u.length=o,this.get(t),Vl(this),!0}const s=new Ude(t,n,o,r,i);return s.length>this[Ls]?(this[Mr]&&this[Mr](t,n),!1):(this[Nr]+=s.length,this[ct].unshift(s),this[di].set(t,this[ct].head),Vl(this),!0)}has(t){if(!this[di].has(t))return!1;const n=this[di].get(t).value;return!Xp(this,n)}get(t){return C1(this,t,!0)}peek(t){return C1(this,t,!1)}pop(){const t=this[ct].tail;return t?(vu(this,t),t.value):null}del(t){vu(this,this[di].get(t))}load(t){this.reset();const n=Date.now();for(let i=t.length-1;i>=0;i--){const r=t[i],o=r.e||0;if(o===0)this.set(r.k,r.v);else{const s=o-n;s>0&&this.set(r.k,r.v,s)}}}prune(){this[di].forEach((t,n)=>C1(this,n,!1))}}const C1=(e,t,n)=>{const i=e[di].get(t);if(i){const r=i.value;if(Xp(e,r)){if(vu(e,i),!e[Oc])return}else n&&(e[EL]&&(i.value.now=Date.now()),e[ct].unshiftNode(i));return r.value}},Xp=(e,t)=>{if(!t||!t.maxAge&&!e[Us])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[Us]&&n>e[Us]},Vl=e=>{if(e[Nr]>e[Ls])for(let t=e[ct].tail;e[Nr]>e[Ls]&&t!==null;){const n=t.prev;vu(e,t),t=n}},vu=(e,t)=>{if(t){const n=t.value;e[Mr]&&e[Mr](n.key,n.value),e[Nr]-=n.length,e[di].delete(n.key),e[ct].removeNode(t)}};class Ude{constructor(t,n,i,r,o){this.key=t,this.value=n,this.length=i,this.now=r,this.maxAge=o||0}}const DC=(e,t,n,i)=>{let r=n.value;Xp(e,r)&&(vu(e,n),e[Oc]||(r=void 0)),r&&t.call(i,r.value,r.key,e)};var jde=Bde;const qde=Object.freeze({loose:!0}),Wde=Object.freeze({}),Hde=e=>e?typeof e!="object"?qde:e:Wde;var c_=Hde,jv={exports:{}};const Gde="2.0.0",_L=256,Yde=Number.MAX_SAFE_INTEGER||9007199254740991,Xde=16,Vde=_L-6,Kde=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var f_={MAX_LENGTH:_L,MAX_SAFE_COMPONENT_LENGTH:Xde,MAX_SAFE_BUILD_LENGTH:Vde,MAX_SAFE_INTEGER:Yde,RELEASE_TYPES:Kde,SEMVER_SPEC_VERSION:Gde,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const Jde=typeof process=="object"&&$1&&$1.NODE_DEBUG&&/\bsemver\b/i.test($1.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var n0=Jde;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:r}=f_,o=n0;t=e.exports={};const s=t.re=[],a=t.safeRe=[],u=t.src=[],l=t.t={};let c=0;const f="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",r],[f,i]],h=g=>{for(const[m,y]of d)g=g.split(`${m}*`).join(`${m}{0,${y}}`).split(`${m}+`).join(`${m}{1,${y}}`);return g},p=(g,m,y)=>{const v=h(m),b=c++;o(g,b,m),l[g]=b,u[b]=m,s[b]=new RegExp(m,y?"g":void 0),a[b]=new RegExp(v,y?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),p("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${u[l.NUMERICIDENTIFIER]}|${u[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NUMERICIDENTIFIERLOOSE]}|${u[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${f}+`),p("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`),p("FULL",`^${u[l.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`),p("LOOSE",`^${u[l.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?)?)?`),p("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`),p("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),p("COERCERTL",u[l.COERCE],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${u[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})\\s+-\\s+(${u[l.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[l.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(jv,jv.exports);var d_=jv.exports;const NC=/^[0-9]+$/,SL=(e,t)=>{const n=NC.test(e),i=NC.test(t);return n&&i&&(e=+e,t=+t),e===t?0:n&&!i?-1:i&&!n?1:eSL(t,e);var Zde={compareIdentifiers:SL,rcompareIdentifiers:Qde};const jd=n0,{MAX_LENGTH:OC,MAX_SAFE_INTEGER:qd}=f_,{safeRe:RC,t:LC}=d_,ehe=c_,{compareIdentifiers:Qa}=Zde;let the=class ji{constructor(t,n){if(n=ehe(n),t instanceof ji){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>OC)throw new TypeError(`version is longer than ${OC} characters`);jd("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const i=t.trim().match(n.loose?RC[LC.LOOSE]:RC[LC.FULL]);if(!i)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>qd||this.major<0)throw new TypeError("Invalid major version");if(this.minor>qd||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>qd||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){const o=+r;if(o>=0&&o=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(n){let o=[n,r];i===!1&&(o=[n]),Qa(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var h_=the;const PC=h_,nhe=(e,t,n)=>new PC(e,n).compare(new PC(t,n));var _l=nhe;const ihe=_l,rhe=(e,t,n)=>ihe(e,t,n)===0;var ohe=rhe;const she=_l,ahe=(e,t,n)=>she(e,t,n)!==0;var uhe=ahe;const lhe=_l,che=(e,t,n)=>lhe(e,t,n)>0;var fhe=che;const dhe=_l,hhe=(e,t,n)=>dhe(e,t,n)>=0;var phe=hhe;const ghe=_l,mhe=(e,t,n)=>ghe(e,t,n)<0;var yhe=mhe;const vhe=_l,bhe=(e,t,n)=>vhe(e,t,n)<=0;var xhe=bhe;const whe=ohe,Ehe=uhe,_he=fhe,She=phe,$he=yhe,Ahe=xhe,khe=(e,t,n,i)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return whe(e,n,i);case"!=":return Ehe(e,n,i);case">":return _he(e,n,i);case">=":return She(e,n,i);case"<":return $he(e,n,i);case"<=":return Ahe(e,n,i);default:throw new TypeError(`Invalid operator: ${t}`)}};var Che=khe,F1,IC;function Fhe(){if(IC)return F1;IC=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(c,f){if(f=n(f),c instanceof t){if(c.loose===!!f.loose)return c;c=c.value}c=c.trim().split(/\s+/).join(" "),s("comparator",c,f),this.options=f,this.loose=!!f.loose,this.parse(c),this.semver===e?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(c){const f=this.options.loose?i[r.COMPARATORLOOSE]:i[r.COMPARATOR],d=c.match(f);if(!d)throw new TypeError(`Invalid comparator: ${c}`);this.operator=d[1]!==void 0?d[1]:"",this.operator==="="&&(this.operator=""),d[2]?this.semver=new a(d[2],this.options.loose):this.semver=e}toString(){return this.value}test(c){if(s("Comparator.test",c,this.options.loose),this.semver===e||c===e)return!0;if(typeof c=="string")try{c=new a(c,this.options)}catch{return!1}return o(c,this.operator,this.semver,this.options)}intersects(c,f){if(!(c instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new u(c.value,f).test(this.value):c.operator===""?c.value===""?!0:new u(this.value,f).test(c.semver):(f=n(f),f.includePrerelease&&(this.value==="<0.0.0-0"||c.value==="<0.0.0-0")||!f.includePrerelease&&(this.value.startsWith("<0.0.0")||c.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&c.operator.startsWith(">")||this.operator.startsWith("<")&&c.operator.startsWith("<")||this.semver.version===c.semver.version&&this.operator.includes("=")&&c.operator.includes("=")||o(this.semver,"<",c.semver,f)&&this.operator.startsWith(">")&&c.operator.startsWith("<")||o(this.semver,">",c.semver,f)&&this.operator.startsWith("<")&&c.operator.startsWith(">")))}}F1=t;const n=c_,{safeRe:i,t:r}=d_,o=Che,s=n0,a=h_,u=$L();return F1}var M1,zC;function $L(){if(zC)return M1;zC=1;class e{constructor(M,C){if(C=i(C),M instanceof e)return M.loose===!!C.loose&&M.includePrerelease===!!C.includePrerelease?M:new e(M.raw,C);if(M instanceof r)return this.raw=M.value,this.set=[[M]],this.format(),this;if(this.options=C,this.loose=!!C.loose,this.includePrerelease=!!C.includePrerelease,this.raw=M.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(T=>this.parseRange(T.trim())).filter(T=>T.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const T=this.set[0];if(this.set=this.set.filter(L=>!p(L[0])),this.set.length===0)this.set=[T];else if(this.set.length>1){for(const L of this.set)if(L.length===1&&g(L[0])){this.set=[L];break}}}this.format()}format(){return this.range=this.set.map(M=>M.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(M){const T=((this.options.includePrerelease&&d)|(this.options.loose&&h))+":"+M,L=n.get(T);if(L)return L;const I=this.options.loose,z=I?a[u.HYPHENRANGELOOSE]:a[u.HYPHENRANGE];M=M.replace(z,k(this.options.includePrerelease)),o("hyphen replace",M),M=M.replace(a[u.COMPARATORTRIM],l),o("comparator trim",M),M=M.replace(a[u.TILDETRIM],c),o("tilde trim",M),M=M.replace(a[u.CARETTRIM],f),o("caret trim",M);let Z=M.split(" ").map(me=>y(me,this.options)).join(" ").split(/\s+/).map(me=>F(me,this.options));I&&(Z=Z.filter(me=>(o("loose invalid filter",me,this.options),!!me.match(a[u.COMPARATORLOOSE])))),o("range list",Z);const ee=new Map,fe=Z.map(me=>new r(me,this.options));for(const me of fe){if(p(me))return[me];ee.set(me.value,me)}ee.size>1&&ee.has("")&&ee.delete("");const _e=[...ee.values()];return n.set(T,_e),_e}intersects(M,C){if(!(M instanceof e))throw new TypeError("a Range is required");return this.set.some(T=>m(T,C)&&M.set.some(L=>m(L,C)&&T.every(I=>L.every(z=>I.intersects(z,C)))))}test(M){if(!M)return!1;if(typeof M=="string")try{M=new s(M,this.options)}catch{return!1}for(let C=0;CA.value==="<0.0.0-0",g=A=>A.value==="",m=(A,M)=>{let C=!0;const T=A.slice();let L=T.pop();for(;C&&T.length;)C=T.every(I=>L.intersects(I,M)),L=T.pop();return C},y=(A,M)=>(o("comp",A,M),A=w(A,M),o("caret",A),A=b(A,M),o("tildes",A),A=E(A,M),o("xrange",A),A=$(A,M),o("stars",A),A),v=A=>!A||A.toLowerCase()==="x"||A==="*",b=(A,M)=>A.trim().split(/\s+/).map(C=>x(C,M)).join(" "),x=(A,M)=>{const C=M.loose?a[u.TILDELOOSE]:a[u.TILDE];return A.replace(C,(T,L,I,z,Z)=>{o("tilde",A,T,L,I,z,Z);let ee;return v(L)?ee="":v(I)?ee=`>=${L}.0.0 <${+L+1}.0.0-0`:v(z)?ee=`>=${L}.${I}.0 <${L}.${+I+1}.0-0`:Z?(o("replaceTilde pr",Z),ee=`>=${L}.${I}.${z}-${Z} <${L}.${+I+1}.0-0`):ee=`>=${L}.${I}.${z} <${L}.${+I+1}.0-0`,o("tilde return",ee),ee})},w=(A,M)=>A.trim().split(/\s+/).map(C=>_(C,M)).join(" "),_=(A,M)=>{o("caret",A,M);const C=M.loose?a[u.CARETLOOSE]:a[u.CARET],T=M.includePrerelease?"-0":"";return A.replace(C,(L,I,z,Z,ee)=>{o("caret",A,L,I,z,Z,ee);let fe;return v(I)?fe="":v(z)?fe=`>=${I}.0.0${T} <${+I+1}.0.0-0`:v(Z)?I==="0"?fe=`>=${I}.${z}.0${T} <${I}.${+z+1}.0-0`:fe=`>=${I}.${z}.0${T} <${+I+1}.0.0-0`:ee?(o("replaceCaret pr",ee),I==="0"?z==="0"?fe=`>=${I}.${z}.${Z}-${ee} <${I}.${z}.${+Z+1}-0`:fe=`>=${I}.${z}.${Z}-${ee} <${I}.${+z+1}.0-0`:fe=`>=${I}.${z}.${Z}-${ee} <${+I+1}.0.0-0`):(o("no pr"),I==="0"?z==="0"?fe=`>=${I}.${z}.${Z}${T} <${I}.${z}.${+Z+1}-0`:fe=`>=${I}.${z}.${Z}${T} <${I}.${+z+1}.0-0`:fe=`>=${I}.${z}.${Z} <${+I+1}.0.0-0`),o("caret return",fe),fe})},E=(A,M)=>(o("replaceXRanges",A,M),A.split(/\s+/).map(C=>S(C,M)).join(" ")),S=(A,M)=>{A=A.trim();const C=M.loose?a[u.XRANGELOOSE]:a[u.XRANGE];return A.replace(C,(T,L,I,z,Z,ee)=>{o("xRange",A,T,L,I,z,Z,ee);const fe=v(I),_e=fe||v(z),me=_e||v(Z),Ie=me;return L==="="&&Ie&&(L=""),ee=M.includePrerelease?"-0":"",fe?L===">"||L==="<"?T="<0.0.0-0":T="*":L&&Ie?(_e&&(z=0),Z=0,L===">"?(L=">=",_e?(I=+I+1,z=0,Z=0):(z=+z+1,Z=0)):L==="<="&&(L="<",_e?I=+I+1:z=+z+1),L==="<"&&(ee="-0"),T=`${L+I}.${z}.${Z}${ee}`):_e?T=`>=${I}.0.0${ee} <${+I+1}.0.0-0`:me&&(T=`>=${I}.${z}.0${ee} <${I}.${+z+1}.0-0`),o("xRange return",T),T})},$=(A,M)=>(o("replaceStars",A,M),A.trim().replace(a[u.STAR],"")),F=(A,M)=>(o("replaceGTE0",A,M),A.trim().replace(a[M.includePrerelease?u.GTE0PRE:u.GTE0],"")),k=A=>(M,C,T,L,I,z,Z,ee,fe,_e,me,Ie,Sr)=>(v(T)?C="":v(L)?C=`>=${T}.0.0${A?"-0":""}`:v(I)?C=`>=${T}.${L}.0${A?"-0":""}`:z?C=`>=${C}`:C=`>=${C}${A?"-0":""}`,v(fe)?ee="":v(_e)?ee=`<${+fe+1}.0.0-0`:v(me)?ee=`<${fe}.${+_e+1}.0-0`:Ie?ee=`<=${fe}.${_e}.${me}-${Ie}`:A?ee=`<${fe}.${_e}.${+me+1}-0`:ee=`<=${ee}`,`${C} ${ee}`.trim()),N=(A,M,C)=>{for(let T=0;T0){const L=A[T].semver;if(L.major===M.major&&L.minor===M.minor&&L.patch===M.patch)return!0}return!1}return!0};return M1}const Mhe=$L(),The=(e,t,n)=>{try{t=new Mhe(t,n)}catch{return!1}return t.test(e)};var Dhe=The,AL=Nde(Dhe);function Nhe(e,t,n){const i=e.open(t),r=1e4,o=250,{origin:s}=new URL(t);let a=~~(r/o);function u(c){c.source===i&&(a=0,e.removeEventListener("message",u,!1))}e.addEventListener("message",u,!1);function l(){a<=0||(i.postMessage(n,s),setTimeout(l,o),a-=1)}setTimeout(l,o)}var Ohe=`.vega-embed { + position: relative; + display: inline-block; + box-sizing: border-box; +} +.vega-embed.has-actions { + padding-right: 38px; +} +.vega-embed details:not([open]) > :not(summary) { + display: none !important; +} +.vega-embed summary { + list-style: none; + position: absolute; + top: 0; + right: 0; + padding: 6px; + z-index: 1000; + background: white; + box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1); + color: #1b1e23; + border: 1px solid #aaa; + border-radius: 999px; + opacity: 0.2; + transition: opacity 0.4s ease-in; + cursor: pointer; + line-height: 0px; +} +.vega-embed summary::-webkit-details-marker { + display: none; +} +.vega-embed summary:active { + box-shadow: #aaa 0px 0px 0px 1px inset; +} +.vega-embed summary svg { + width: 14px; + height: 14px; +} +.vega-embed details[open] summary { + opacity: 0.7; +} +.vega-embed:hover summary, .vega-embed:focus-within summary { + opacity: 1 !important; + transition: opacity 0.2s ease; +} +.vega-embed .vega-actions { + position: absolute; + z-index: 1001; + top: 35px; + right: -9px; + display: flex; + flex-direction: column; + padding-bottom: 8px; + padding-top: 8px; + border-radius: 4px; + box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2); + border: 1px solid #d9d9d9; + background: white; + animation-duration: 0.15s; + animation-name: scale-in; + animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5); + text-align: left; +} +.vega-embed .vega-actions a { + padding: 8px 16px; + font-family: sans-serif; + font-size: 14px; + font-weight: 600; + white-space: nowrap; + color: #434a56; + text-decoration: none; +} +.vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus { + background-color: #f7f7f9; + color: black; +} +.vega-embed .vega-actions::before, .vega-embed .vega-actions::after { + content: ""; + display: inline-block; + position: absolute; +} +.vega-embed .vega-actions::before { + left: auto; + right: 14px; + top: -16px; + border: 8px solid rgba(0, 0, 0, 0); + border-bottom-color: #d9d9d9; +} +.vega-embed .vega-actions::after { + left: auto; + right: 15px; + top: -14px; + border: 7px solid rgba(0, 0, 0, 0); + border-bottom-color: #fff; +} +.vega-embed .chart-wrapper.fit-x { + width: 100%; +} +.vega-embed .chart-wrapper.fit-y { + height: 100%; +} + +.vega-embed-wrapper { + max-width: 100%; + overflow: auto; + padding-right: 14px; +} + +@keyframes scale-in { + from { + opacity: 0; + transform: scale(0.6); + } + to { + opacity: 1; + transform: scale(1); + } +} +`;function kL(e,...t){for(const n of t)Rhe(e,n);return e}function Rhe(e,t){for(const n of Object.keys(t))tl(e,n,t[n],!0)}const qi=bne;let gf=_fe;const Wd=typeof window<"u"?window:void 0;var qC;gf===void 0&&((qC=Wd==null?void 0:Wd.vl)!=null&&qC.compile)&&(gf=Wd.vl);const Lhe={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},Phe={CLICK_TO_VIEW_ACTIONS:"Click to view actions",COMPILED_ACTION:"View Compiled Vega",EDITOR_ACTION:"Open in Vega Editor",PNG_ACTION:"Save as PNG",SOURCE_ACTION:"View Source",SVG_ACTION:"Save as SVG"},bc={vega:"Vega","vega-lite":"Vega-Lite"},Vp={vega:qi.version,"vega-lite":gf?gf.version:"not available"},Ihe={vega:e=>e,"vega-lite":(e,t)=>gf.compile(e,{config:t}).spec},zhe=` + + + + +`,Bhe="chart-wrapper";function Uhe(e){return typeof e=="function"}function BC(e,t,n,i){const r=`${t}
`,o=`
${n}`,s=window.open("");s.document.write(r+e+o),s.document.title=`${bc[i]} JSON Source`}function jhe(e,t){if(e.$schema){const n=vL(e.$schema);t&&t!==n.library&&console.warn(`The given visualization spec is written in ${bc[n.library]}, but mode argument sets ${bc[t]??t}.`);const i=n.library;return AL(Vp[i],`^${n.version.slice(1)}`)||console.warn(`The input spec uses ${bc[i]} ${n.version}, but the current version of ${bc[i]} is v${Vp[i]}.`),i}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":t??"vega"}function CL(e){return!!(e&&"load"in e)}function UC(e){return CL(e)?e:qi.loader(e)}function qhe(e){var n;const t=((n=e.usermeta)==null?void 0:n.embedOptions)??{};return X(t.defaultStyle)&&(t.defaultStyle=!1),t}async function Whe(e,t,n={}){let i,r;X(t)?(r=UC(n.loader),i=JSON.parse(await r.load(t))):i=t;const o=qhe(i),s=o.loader;(!r||s)&&(r=UC(n.loader??s));const a=await jC(o,r),u=await jC(n,r),l={...kL(u,a),config:el(u.config??{},a.config??{})};return await Ghe(e,i,l,r)}async function jC(e,t){const n=X(e.config)?JSON.parse(await t.load(e.config)):e.config??{},i=X(e.patch)?JSON.parse(await t.load(e.patch)):e.patch;return{...e,...i?{patch:i}:{},...n?{config:n}:{}}}function Hhe(e){const t=e.getRootNode?e.getRootNode():document;return t instanceof ShadowRoot?{root:t,rootContainer:t}:{root:document,rootContainer:document.head??document.body}}async function Ghe(e,t,n={},i){const r=n.theme?el(Sde[n.theme],n.config??{}):n.config,o=es(n.actions)?n.actions:kL({},Lhe,n.actions??{}),s={...Phe,...n.i18n},a=n.renderer??"canvas",u=n.logLevel??qi.Warn,l=n.downloadFileName??"visualization",c=typeof e=="string"?document.querySelector(e):e;if(!c)throw new Error(`${e} does not exist`);if(n.defaultStyle!==!1){const w="vega-embed-style",{root:_,rootContainer:E}=Hhe(c);if(!_.getElementById(w)){const S=document.createElement("style");S.id=w,S.innerHTML=n.defaultStyle===void 0||n.defaultStyle===!0?Ohe.toString():n.defaultStyle,E.appendChild(S)}}const f=jhe(t,n.mode);let d=Ihe[f](t,r);if(f==="vega-lite"&&d.$schema){const w=vL(d.$schema);AL(Vp.vega,`^${w.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${w.version}, but current version is v${Vp.vega}.`)}c.classList.add("vega-embed"),o&&c.classList.add("has-actions"),c.innerHTML="";let h=c;if(o){const w=document.createElement("div");w.classList.add(Bhe),c.appendChild(w),h=w}const p=n.patch;if(p&&(d=p instanceof Function?p(d):Kp(d,p,!0,!1).newDocument),n.formatLocale&&qi.formatLocale(n.formatLocale),n.timeFormatLocale&&qi.timeFormatLocale(n.timeFormatLocale),n.expressionFunctions)for(const w in n.expressionFunctions){const _=n.expressionFunctions[w];"fn"in _?qi.expressionFunction(w,_.fn,_.visitor):_ instanceof Function&&qi.expressionFunction(w,_)}const{ast:g}=n,m=qi.parse(d,f==="vega-lite"?{}:r,{ast:g}),y=new(n.viewClass||qi.View)(m,{loader:i,logLevel:u,renderer:a,...g?{expr:qi.expressionInterpreter??n.expr??Fne}:{}});if(y.addSignalListener("autosize",(w,_)=>{const{type:E}=_;E=="fit-x"?(h.classList.add("fit-x"),h.classList.remove("fit-y")):E=="fit-y"?(h.classList.remove("fit-x"),h.classList.add("fit-y")):E=="fit"?h.classList.add("fit-x","fit-y"):h.classList.remove("fit-x","fit-y")}),n.tooltip!==!1){const{loader:w,tooltip:_}=n,E=w&&!CL(w)?w==null?void 0:w.baseURL:void 0,S=Uhe(_)?_:new Dde({baseURL:E,..._===!0?{}:_}).call;y.tooltip(S)}let{hover:v}=n;if(v===void 0&&(v=f==="vega"),v){const{hoverSet:w,updateSet:_}=typeof v=="boolean"?{}:v;y.hover(w,_)}n&&(n.width!=null&&y.width(n.width),n.height!=null&&y.height(n.height),n.padding!=null&&y.padding(n.padding)),await y.initialize(h,n.bind).runAsync();let b;if(o!==!1){let w=c;if(n.defaultStyle!==!1||n.forceActionsMenu){const E=document.createElement("details");E.title=s.CLICK_TO_VIEW_ACTIONS,c.append(E),w=E;const S=document.createElement("summary");S.innerHTML=zhe,E.append(S),b=$=>{E.contains($.target)||E.removeAttribute("open")},document.addEventListener("click",b)}const _=document.createElement("div");if(w.append(_),_.classList.add("vega-actions"),o===!0||o.export!==!1){for(const E of["svg","png"])if(o===!0||o.export===!0||o.export[E]){const S=s[`${E.toUpperCase()}_ACTION`],$=document.createElement("a"),F=V(n.scaleFactor)?n.scaleFactor[E]:n.scaleFactor;$.text=S,$.href="#",$.target="_blank",$.download=`${l}.${E}`,$.addEventListener("mousedown",async function(k){k.preventDefault();const N=await y.toImageURL(E,F);this.href=N}),_.append($)}}if(o===!0||o.source!==!1){const E=document.createElement("a");E.text=s.SOURCE_ACTION,E.href="#",E.addEventListener("click",function(S){BC(r0(t),n.sourceHeader??"",n.sourceFooter??"",f),S.preventDefault()}),_.append(E)}if(f==="vega-lite"&&(o===!0||o.compiled!==!1)){const E=document.createElement("a");E.text=s.COMPILED_ACTION,E.href="#",E.addEventListener("click",function(S){BC(r0(d),n.sourceHeader??"",n.sourceFooter??"","vega"),S.preventDefault()}),_.append(E)}if(o===!0||o.editor!==!1){const E=n.editorUrl??"https://vega.github.io/editor/",S=document.createElement("a");S.text=s.EDITOR_ACTION,S.href="#",S.addEventListener("click",function($){Nhe(window,E,{config:r,mode:f,renderer:a,spec:r0(t)}),$.preventDefault()}),_.append(S)}}function x(){b&&document.removeEventListener("click",b),y.finalize()}return{view:y,spec:t,vgSpec:d,finalize:x,embedOptions:n}}function Yhe(){const e=BL,t=[],n=[],i=[],r=[{id:"d05b72be-a5aa-40e4-9458-cd39a739ee5a",name:"projects"},{id:"f472c52a-6da4-4392-9f8c-464fde1ef0f2",name:"research",parent:"d05b72be-a5aa-40e4-9458-cd39a739ee5a"},{id:"e62091d9-1840-49aa-ba52-2fa18374e4fd",name:"infra",parent:"d05b72be-a5aa-40e4-9458-cd39a739ee5a"},{id:"125eeb61-6a53-4ece-9a5f-a94c6be92ea9",name:"other",parent:"d05b72be-a5aa-40e4-9458-cd39a739ee5a"},{id:"de7d562f-b513-4b00-a64d-78f9c60d77d0",name:"digital_preservation",parent:"f472c52a-6da4-4392-9f8c-464fde1ef0f2"},{id:"d17170ad-a131-4478-9d00-75231fd9a8cd",name:"tools_and_analysis",parent:"f472c52a-6da4-4392-9f8c-464fde1ef0f2"},{id:"dc646dac-666b-4734-9dbf-409576635a4a",name:"infrastructure",parent:"e62091d9-1840-49aa-ba52-2fa18374e4fd"},{id:"90886ac6-e53d-417a-960c-688a530cd4ea",name:"other",parent:"125eeb61-6a53-4ece-9a5f-a94c6be92ea9"}];for(const o of e){let s=function(c,f,d){let h;if(o[1].project.title.length<=50?h=o[1].project.title:h=o[1].project.title.slice(0,50)+"...",o[1].project.category==f){const p={id:d,name:h,parent:c,parentname:f,url:o[1].project.websites[0]};r.push(p)}},a=function(c,f,d){for(const h of l)if(h.relation_type==c){const p={source:d,target:h.uuid};f.push(p)}};const u=o[1].record_metadata.uuid,l=o[1].project.related_entities;s("90886ac6-e53d-417a-960c-688a530cd4ea","other",u),s("de7d562f-b513-4b00-a64d-78f9c60d77d0","digital_preservation",u),s("d17170ad-a131-4478-9d00-75231fd9a8cd","tools_and_analysis",u),s("dc646dac-666b-4734-9dbf-409576635a4a","infrastructure",u),a("sibling",t,u),a("child",n,u),a("cooperation",i,u)}return{projects:r,siblingDependencies:t,parentChildDependencies:n,cooperationDependencies:i}}function Xhe(e){let t,n='
';return{c(){t=NL("div"),t.innerHTML=n,this.h()},l(i){t=OL(i,"DIV",{class:!0,"data-svelte-h":!0}),RL(t)!=="svelte-un78vs"&&(t.innerHTML=n),this.h()},h(){LL(t,"class","flex justify-center px-4")},m(i,r){PL(i,t,r)},p:i0,i:i0,o:i0,d(i){i&&IL(t)}}}function Vhe(e){const{projects:t,siblingDependencies:n,parentChildDependencies:i,cooperationDependencies:r}=Yhe(),o={$schema:"https://vega.github.io/schema/vega/v5.json",description:"A network diagram of software dependencies, with edges grouped via hierarchical edge bundling.",width:1e3,height:1e3,autosize:"none",signals:[{name:"tension",value:.85},{name:"radius",value:280},{name:"extent",value:360},{name:"rotate",value:0},{name:"textSize",value:8},{name:"textOffset",value:8},{name:"layout",value:"cluster"},{name:"colorSib",value:"firebrick"},{name:"colorPar",value:"forestgreen"},{name:"colorChil",value:"orange"},{name:"colorCoop",value:"darkorchid"},{name:"originX",update:"width / 2"},{name:"originY",update:"height / 2"},{name:"active",value:null,on:[{events:"text:mouseover",update:"datum.id"},{events:"mouseover[!event.item]",update:"null"}]},{name:"innerRadius",value:281},{name:"outerRadius",value:287}],data:[{name:"tree",values:t,transform:[{type:"stratify",key:"id",parentKey:"parent"},{type:"tree",method:{signal:"layout"},size:[1,1],as:["alpha","beta","depth","children"]},{type:"formula",expr:"(rotate + extent * datum.alpha + 270) % 360",as:"angle"},{type:"formula",expr:"inrange(datum.angle, [90, 270])",as:"leftside"},{type:"formula",expr:"originX + radius * datum.beta * cos(PI * datum.angle / 180)",as:"x"},{type:"formula",expr:"originY + radius * datum.beta * sin(PI * datum.angle / 180)",as:"y"},{type:"formula",expr:"2*PI*datum.alpha",as:"rangle"}]},{name:"leaves",source:"tree",transform:[{type:"filter",expr:"!datum.children"}]},{name:"sib_dependencies",values:n,transform:[{type:"formula",expr:"treePath('tree', datum.source, datum.target)",as:"treepath",initonly:!0}]},{name:"sib_selected",source:"sib_dependencies",transform:[{type:"filter",expr:"datum.source === active || datum.target === active"}]},{name:"par_dependencies",values:i,transform:[{type:"formula",expr:"treePath('tree', datum.source, datum.target)",as:"treepath",initonly:!0}]},{name:"par_selected",source:"par_dependencies",transform:[{type:"filter",expr:"datum.source === active || datum.target === active"}]},{name:"coop_dependencies",values:r,transform:[{type:"formula",expr:"treePath('tree', datum.source, datum.target)",as:"treepath",initonly:!0}]},{name:"coop_selected",source:"coop_dependencies",transform:[{type:"filter",expr:"datum.source === active || datum.target === active"}]}],marks:[{type:"arc",from:{data:"leaves"},encode:{enter:{fill:{scale:"cat_color",field:"parentname"},fillOpacity:{value:.6},padAngle:{value:0},x:{signal:"originX"},y:{signal:"originY"},href:{field:"parenturl"}},update:{startAngle:{signal:"datum.rangle-0.075"},endAngle:{signal:"datum.rangle+0.075"},innerRadius:{signal:"innerRadius"},outerRadius:{signal:"outerRadius"},cornerRadius:{value:0},tooltip:{field:"parentname"}},hover:{cursor:{value:"pointer"}}}},{type:"text",from:{data:"leaves"},encode:{enter:{text:{field:"name"},baseline:{value:"middle"},href:{field:"url"}},update:{x:{field:"x"},y:{field:"y"},dx:{signal:"textOffset * (datum.leftside ? -1 : 1)"},angle:{signal:"datum.leftside ? datum.angle - 180 : datum.angle"},align:{signal:"datum.leftside ? 'right' : 'left'"},fontSize:{signal:"textSize"},fontWeight:[{test:"indata('sib_selected', 'source', datum.id)",value:"bold"},{test:"indata('sib_selected', 'target', datum.id)",value:"bold"},{test:"indata('par_selected', 'source', datum.id)",value:"bold"},{test:"indata('par_selected', 'target', datum.id)",value:"bold"},{test:"indata('coop_selected', 'source', datum.id)",value:"bold"},{test:"indata('coop_selected', 'target', datum.id)",value:"bold"},{value:null}],fill:[{test:"datum.id === active",value:"black"},{test:"indata('sib_selected', 'source', datum.id)",signal:"colorSib"},{test:"indata('sib_selected', 'target', datum.id)",signal:"colorSib"},{test:"indata('par_selected', 'source', datum.id)",signal:"colorPar"},{test:"indata('par_selected', 'target', datum.id)",signal:"colorChil"},{test:"indata('coop_selected', 'source', datum.id)",signal:"colorCoop"},{test:"indata('coop_selected', 'target', datum.id)",signal:"colorCoop"},{value:"black"}]},hover:{cursor:{value:"pointer"}}}},{type:"group",from:{facet:{name:"path",data:"sib_dependencies",field:"treepath"}},marks:[{type:"line",interactive:!1,from:{data:"path"},encode:{enter:{interpolate:{value:"bundle"},strokeWidth:{value:1.5}},update:{stroke:[{test:"parent.source === active",signal:"colorSib"},{test:"parent.target === active",signal:"colorSib"},{value:"steelblue"}],strokeOpacity:[{test:"parent.source === active || parent.target === active",value:1},{value:.2}],tension:{signal:"tension"},x:{field:"x"},y:{field:"y"}}}}]},{type:"group",from:{facet:{name:"path",data:"par_dependencies",field:"treepath"}},marks:[{type:"line",interactive:!1,from:{data:"path"},encode:{enter:{interpolate:{value:"bundle"},strokeWidth:{value:1.5}},update:{stroke:[{test:"parent.source === active",signal:"colorChil"},{test:"parent.target === active",signal:"colorPar"},{value:"steelblue"}],strokeOpacity:[{test:"parent.source === active || parent.target === active",value:1},{value:.2}],tension:{signal:"tension"},x:{field:"x"},y:{field:"y"}}}}]},{type:"group",from:{facet:{name:"path",data:"coop_dependencies",field:"treepath"}},marks:[{type:"line",interactive:!1,from:{data:"path"},encode:{enter:{interpolate:{value:"bundle"},strokeWidth:{value:1.5}},update:{stroke:[{test:"parent.source === active",signal:"colorCoop"},{test:"parent.target === active",signal:"colorCoop"},{value:"steelblue"}],strokeOpacity:[{test:"parent.source === active || parent.target === active",value:1},{value:.2}],tension:{signal:"tension"},x:{field:"x"},y:{field:"y"}}}}]}],scales:[{name:"color",type:"ordinal",domain:["sibling","parent","child","cooperation"],range:[{signal:"colorSib"},{signal:"colorPar"},{signal:"colorChil"},{signal:"colorCoop"}]},{name:"cat_color",type:"ordinal",domain:{data:"leaves",field:"parentname"},range:{scheme:"set1"}},{name:"opacity",type:"linear",range:[.6,.6]}],legends:[{stroke:"color",orient:"bottom-left",title:"Relations",titleFontSize:16,labelFontSize:14,symbolType:"stroke",symbolStrokeWidth:3},{stroke:"cat_color",orient:"bottom-right",title:"Categories",titleFontSize:16,labelFontSize:14,symbolType:"circle",fill:"cat_color",columns:2}]};return ML(()=>{Whe("#vega",o,{})}),[]}class Ppe extends TL{constructor(t){super(),DL(this,t,Vhe,Xhe,FL,{})}}export{Ppe as component}; diff --git a/_app/version.json b/_app/version.json index 9c02f1f05..8b4923cbf 100644 --- a/_app/version.json +++ b/_app/version.json @@ -1 +1 @@ -{"version":"1710411538828"} \ No newline at end of file +{"version":"1712398049472"} \ No newline at end of file diff --git a/about/index.html b/about/index.html index 2fdc1b574..7fec5db3e 100644 --- a/about/index.html +++ b/about/index.html @@ -17,16 +17,16 @@ - - - + + + - - + + - - + + Closing the Gap in Non-Latin-Script Data – About { - __sveltekit_4ttq2i = { + __sveltekit_4rr3dq = { base: new URL("..", location).pathname.slice(0, -1), assets: "/Closing-The-Gap-In-Non-Latin-Script-Data" }; @@ -68,8 +68,8 @@ const data = [null,null]; Promise.all([ - import("../_app/immutable/entry/start.JlUhvKjU.js"), - import("../_app/immutable/entry/app.C1vQAsRk.js") + import("../_app/immutable/entry/start.CtThyE5r.js"), + import("../_app/immutable/entry/app.B2yfCCKL.js") ]).then(([kit, app]) => { kit.start(app, element, { node_ids: [0, 3], diff --git a/contribute/index.html b/contribute/index.html index cc4769c90..28a937a02 100644 --- a/contribute/index.html +++ b/contribute/index.html @@ -17,16 +17,16 @@ - - - + + + - - + + - - + + Closing the Gap in Non-Latin-Script Data – Contribute @@ -54,7 +54,7 @@